/*#if (SampleContent)*/
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

/*#endif*/
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcu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Q3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}

/* Loading page styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: white;
    gap: 20px;
}

.loading-image {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    animation: loading-bounce 1.5s ease-in-out infinite;
}

.loading-text {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
}

@keyframes loading-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/*playtime*/

.keyboard {
    position: relative;
    width: 21em; /* Width for 1 full octave (7 white keys * 3em) */
    max-width: 100%;
    margin: 2em auto;
    height: 12em;
    background: #f5f5f5;
    border: 0px;
    box-sizing: border-box;
}

.keyboard-two-octaves {
    width: 42em; /* Width for 2 octaves (14 white keys * 3em) */
    max-width: 100%;
}

.white-key {
    position: relative;
    display: inline-block;
    width: 3em; /* Fixed width */
    min-width: 0;
    height: 12em;
    background: white;
    border: 1px solid black;
    text-align: center;
    z-index: 1;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 5px 5px;
    transition: background-color 0.1s ease, transform 0.1s ease;
    box-sizing: border-box;
}

.white-key.key-pressed {
    background: #e0e0e0;
    transform: translateY(2px);
}

.white-key.key-correct {
    background: #90EE90 !important;
    animation: flash-green 0.3s ease;
}

.white-key.key-wrong {
    background: #FFB6C1 !important;
    animation: flash-red 0.3s ease;
}

.white-key.middle-c-key {
    position: relative;
}

.white-key.middle-c-key::before {
    content: '';
    position: absolute;
    bottom: -0.4em;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1.4em;
    height: 1.4em;
    border: 2px solid #ccc;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

@keyframes flash-green {
    0%, 100% { background: #90EE90; }
    50% { background: #7CFC00; }
}

@keyframes flash-red {
    0% { background: #F44336; }
    50% { background: #FF5252; }
    100% { background: #F44336; }
}

.black-key.key-correct {
    background: #4CAF50 !important; /* Bright green */
    animation: flash-green 0.4s ease;
}

.black-key.key-wrong {
    background: #F44336 !important; /* Bright red */
    animation: flash-red 0.4s ease;
}

/* Game UI */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.game-hud {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    font-weight: bold;
}

.game-hud-inline {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    font-weight: bold;
}

.start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
    text-align: center;
}

.start-screen h2 {
    margin-bottom: 40px;
    font-size: 2em;
    color: #333;
}

.score-display {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-value {
    font-size: 2em;
    font-weight: bold;
    color: #007bff;
}

.debug-info {
    text-align: center;
    padding: 5px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 3px;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 0.9em;
    color: #856404;
}

.game-main-area {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 20px;
}

.game-left-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.game-stave-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-middle-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-keyboard-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-right-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.game-controls {
    text-align: center;
    margin-top: 20px;
}

.audio-banner {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #ffcc00;
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
}

#music-output {
    margin: 20px auto;
    text-align: center;
}

.feedback-indicator-container {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    animation: feedback-pop 0.3s ease;
}

.feedback-correct {
    background: #4CAF50;
    color: white;
}

.feedback-wrong {
    background: #F44336;
    color: white;
}

.feedback-symbol {
    font-size: 80px;
    font-weight: bold;
    line-height: 1;
}

@keyframes feedback-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.level-selector {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.level-buttons, .mode-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: 2px solid #007bff;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    color: #007bff;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-outline-primary {
    background: white;
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background: #f0f8ff;
    border-color: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.key-label {
    position: absolute;
    bottom: 0.2em; /* Adjusted to move the text lower */
    left: 50%;
    transform: translateX(-50%);
    font-size: 1em; /* Adjust as needed */
}

.black-key {
    position: absolute;
    top: 0;
    width: 2em; /* Fixed width */
    min-width: 0;
    height: 8em; /* Shorter height than white keys */
    background: #1a1a1a;
    border: 1px solid #000;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    border-radius: 0 0 3px 3px;
    cursor: pointer;
    opacity: 1;
    transition: background-color 0.1s ease, transform 0.1s ease;
    box-sizing: border-box;
}

.black-key:hover {
    background: #2a2a2a;
}

.black-key.key-pressed {
    background: #3a3a3a;
    transform: translateY(2px);
}

.black-key.key-correct {
    background: #4CAF50 !important; /* Bright green */
    animation: flash-green 0.4s ease;
}

.black-key.key-wrong {
    background: #F44336 !important; /* Bright red */
    animation: flash-red 0.4s ease;
}
/* Selection Page */
.selection-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}

.selection-container h1 {
    margin-bottom: 40px;
    font-size: 2.5em;
    color: #333;
    font-weight: bold;
}

.level-selector, .mode-selector, .clef-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selector-label {
    font-size: 1em;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    min-width: 120px;
    flex-shrink: 0;
}

.level-buttons, .mode-buttons, .clef-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}

.btn {
    padding: 8px 14px;
    border: 2px solid #007bff;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    color: #007bff;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    width: auto;
    min-width: 80px;
    flex: 0 0 auto;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-outline-primary {
    background: white;
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background: #f0f8ff;
    border-color: #0056b3;
}

.start-button-container {
    margin-top: 30px;
    text-align: center;
}

.btn-large {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.9em;
}

.back-button-hud {
    margin-left: auto;
}

.stave-feedback-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Responsive Styles for Smaller Screens */
@media screen and (max-width: 1200px) {
    .keyboard {
        max-width: 90%;
        font-size: 0.9em;
    }
    
    .keyboard-two-octaves {
        max-width: 90%;
        font-size: 0.85em;
    }
}

@media screen and (max-width: 900px) {
    .keyboard {
        max-width: 100%;
        font-size: 0.8em;
        transform: scale(0.9);
        transform-origin: center;
    }
    
    .keyboard-two-octaves {
        max-width: 100%;
        font-size: 0.75em;
        transform: scale(0.85);
        transform-origin: center;
    }
}

/* Mobile Landscape Responsive Styles */
@media screen and (max-width: 900px) and (orientation: landscape) {
    /* Selection Page - Mobile Landscape */
    .selection-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .selection-container h1 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .level-selector, .mode-selector, .clef-selector {
        padding: 12px 15px;
        margin-bottom: 12px;
        gap: 10px;
    }
    
    .selector-label {
        font-size: 0.85em;
        min-width: 90px;
    }
    
    .level-buttons, .mode-buttons, .clef-buttons {
        gap: 6px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 0.8em;
        min-width: 60px;
        flex: 0 0 auto;
    }
    
    .start-button-container {
        margin-top: 20px;
    }
    
    .btn-large {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    /* Game Page - Mobile Landscape */
    .game-container {
        padding: 10px;
        max-width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .game-hud {
        padding: 5px;
        margin-bottom: 10px;
        font-size: 0.85em;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .game-hud > div {
        flex: 1 1 auto;
        min-width: 60px;
    }
    
    .game-hud-inline {
        padding: 5px;
        margin-top: 10px;
        font-size: 0.85em;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .start-screen {
        min-height: 300px;
        padding: 20px 10px;
    }
    
    .start-screen h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .score-display {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .score-item {
        min-width: 120px;
        padding: 15px;
    }
    
    .score-value {
        font-size: 1.5em;
    }
    
    .game-main-area {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
        display: flex !important;
        visibility: visible !important;
        flex: 1;
        min-height: 0;
    }
    
    .game-stave-section {
        order: 1;
        width: 100%;
        flex-shrink: 0;
        display: block !important;
        visibility: visible !important;
    }
    
    .game-middle-section {
        order: 2;
        width: 100%;
        display: flex !important;
        flex-direction: row;
        justify-content: flex-end;
        align-items: flex-start;
        visibility: visible !important;
        flex-shrink: 0;
        min-height: 150px;
        max-height: 200px;
    }
    
    .game-right-section {
        width: auto;
        flex-shrink: 0;
        display: block !important;
        visibility: visible !important;
        height: 100%;
    }
    
    .streak-ladder-container {
        display: flex !important;
        visibility: visible !important;
        width: 100%;
        height: 100%;
    }
    
    .ladder-wrapper {
        width: 120px !important;
        height: 180px !important;
        flex-shrink: 0;
        transform: scale(0.6);
        transform-origin: top right;
    }
    
    .ladder-svg {
        width: 100% !important;
        height: 100% !important;
    }
    
    .game-keyboard-section {
        order: 3;
        width: 100%;
        margin-top: 5px;
        display: block !important;
        visibility: visible !important;
        flex-shrink: 0;
        min-height: 120px;
        max-height: 150px;
        overflow: visible;
    }
    
    .game-left-section {
        width: 100%;
    }
    
    #music-output {
        margin: 10px auto;
        transform: scale(0.8);
        transform-origin: center;
        min-height: 100px;
        width: 100%;
        overflow: visible;
    }
    
    .game-stave-section {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Keyboard - Mobile Landscape */
    .keyboard {
        width: 100% !important;
        max-width: 100vw !important;
        height: 10em !important;
        margin: 0.5em auto;
        transform: scale(1);
        transform-origin: center;
        font-size: 1em;
        display: block !important;
        visibility: visible !important;
    }
    
    .keyboard-two-octaves {
        width: 100% !important;
        max-width: 100vw !important;
        height: 10em !important;
        margin: 0.5em auto;
        transform: scale(0.9);
        transform-origin: center;
        font-size: 0.9em;
        display: block !important;
        visibility: visible !important;
    }
    
    .white-key {
        height: 10em;
        font-size: 1em;
    }
    
    .black-key {
        height: 7em;
        font-size: 1em;
    }
    
    /* Stave and Feedback - Mobile Landscape */
    .stave-feedback-container {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    #music-output {
        margin: 10px auto;
        transform: scale(0.7);
        transform-origin: center;
    }
    
    .feedback-indicator-container {
        width: 80px;
        height: 80px;
    }
    
    .feedback-indicator {
        width: 80px;
        height: 80px;
    }
    
    .feedback-symbol {
        font-size: 50px;
    }
    
    .game-controls {
        margin-top: 10px;
    }
    
    .audio-banner {
        top: 5px;
        right: 5px;
        padding: 5px;
        font-size: 0.8em;
    }
}
