@import url('https://fonts.googleapis.com/css2?family=Boogaloo&family=Fredoka+One&family=Nunito:wght@600;700;800&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: #1a1a1a;
    display: block;
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ===== Page Layout: Ad Left + Game Right ===== */
.page-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    width: 100vw;
    height: 100vh;
}

/* ===== Ad Panel (Left) ===== */
.ad-panel {
    background: #2d5a2d;
    padding: 15px;
    overflow-y: hidden;
    border-right: 2px solid #3a7a3a;
}

.ad-placeholder {
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed #4a9e4a;
    border-radius: 10px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6a9e6a;
    font-family: 'Fredoka One', cursive;
    font-size: 14px;
    letter-spacing: 2px;
}

/* ===== Game Area (Right) ===== */
.game-area {
    display: flex;
    flex-direction: column;
    background: #3d3d3d;
    padding: 15px;
    gap: 12px;
}

/* ===== Top Bar: Scores + Sound ===== */
.top-bar {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    flex-shrink: 0;
}

.top-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-score-icon {
    font-size: 22px;
}

.top-score-value {
    font-family: 'Fredoka One', cursive;
    font-size: 22px;
    color: #ffffff;
}

.top-sound {
    margin-left: auto;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.top-sound:hover {
    opacity: 1;
}

/* ===== Profile Button ===== */
.top-profile {
    font-size: 22px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    user-select: none;
}

.top-profile:hover {
    opacity: 1;
}

/* ===== Theme Switcher ===== */
/* Note: Theme buttons should use tabindex="-1" in HTML to prevent
   keyboard focus and avoid interfering with arrow-key game controls. */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
}

.theme-switcher__label {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.theme-btn {
    padding: 4px 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none;
    user-select: none;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: #4a9e4a;
    color: #ffffff;
    box-shadow: 0 0 6px rgba(74, 158, 74, 0.5);
}

/* ===== Game Board ===== */
.board-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

#gameCanvas {
    width: min(130vh, 100%);
    height: min(85vh, calc(100vh - 100px));
    border: 5px solid #8B5E3C;
    border-radius: 8px;
    box-shadow:
        0 0 0 3px #5C3A1E,
        0 8px 32px rgba(0, 0, 0, 0.5);
    touch-action: none;
}

/* ===== Game Over Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: linear-gradient(180deg, #f5f0dc 0%, #e8e0c8 100%);
    border-radius: 20px;
    padding: 0;
    width: 380px;
    max-width: 90vw;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 4px #4a9e4a,
        0 0 0 8px #2d6b2d;
    overflow: hidden;
    animation: modalBounce 0.4s ease;
    text-align: center;
}

@keyframes modalBounce {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: linear-gradient(180deg, #6b3a1a 0%, #4a2810 100%);
    padding: 15px 30px;
    position: relative;
    border-bottom: 3px solid #3a2008;
    overflow: hidden;
}

.modal-header::before,
.modal-header::after {
    content: '🌿';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.modal-header::before { left: 15px; }
.modal-header::after { right: 15px; }

.modal-title {
    font-family: 'Fredoka One', cursive;
    font-size: 32px;
    color: #ffdd00;
    text-shadow:
        2px 2px 0 #8b6914,
        0 0 20px rgba(255, 221, 0, 0.4);
    letter-spacing: 3px;
}

.modal-skull {
    font-size: 40px;
    margin: 15px 0 5px;
}

.modal-body {
    padding: 10px 30px 20px;
}

.modal-body p {
    color: #4a4a3a;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
}

.play-again-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(180deg, #6abf4a, #4a9e2a);
    border: none;
    border-bottom: 4px solid #3a7a1a;
    border-radius: 30px;
    padding: 12px 40px;
    margin: 5px 0 25px;
    cursor: pointer;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(74, 158, 42, 0.4);
    transition: all 0.2s ease;
}

.play-again-btn:hover {
    background: linear-gradient(180deg, #7ad05a, #5aae3a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 42, 0.5);
}

.play-again-btn:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
    box-shadow: 0 2px 10px rgba(74, 158, 42, 0.3);
}

/* ===== Leaderboard Panel ===== */
#leaderboard-container {
    height: 100%;
}

.leaderboard-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
}

.leaderboard-title {
    font-family: 'Fredoka One', cursive;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 1px;
}

.leaderboard-entries {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: hidden;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 22px 24px 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}

.leaderboard-entry:hover {
    background: rgba(0, 0, 0, 0.4);
}

.leaderboard-highlight {
    background: rgba(74, 158, 74, 0.2);
    border-color: #4a9e4a;
    box-shadow: 0 0 6px rgba(74, 158, 74, 0.3);
}

.leaderboard-highlight:hover {
    background: rgba(74, 158, 74, 0.3);
}

.leaderboard-rank {
    font-family: 'Fredoka One', cursive;
    font-size: 13px;
    color: #ffdd00;
    text-align: center;
}

.leaderboard-flag {
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaderboard-flag-img {
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
}

.leaderboard-name {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-score {
    font-family: 'Fredoka One', cursive;
    font-size: 12px;
    color: #ffffff;
    text-align: right;
}

/* Leaderboard Loading Skeleton */
.leaderboard-loading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
}

.leaderboard-skeleton {
    height: 32px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Leaderboard Error State */
.leaderboard-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 10px;
    padding: 20px 10px;
}

.leaderboard-error-icon {
    font-size: 28px;
}

.leaderboard-error-message {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* Leaderboard Cached Note */
.leaderboard-cached-note {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
}

/* ===== Responsive ===== */

/* ===== RESPONSIVE: Tablet & Mobile ===== */
@media (max-width: 900px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
        margin: 0;
    }

    .page-layout {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        position: relative;
    }

    /* Game area takes all available space */
    .game-area {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        min-height: 0;
    }

    /* Top bar: stays at top */
    .top-bar {
        flex-shrink: 0;
        background: rgba(0, 0, 0, 0.85);
        border-radius: 0;
        padding: 6px 12px;
        gap: 10px;
    }

    .top-score-icon { font-size: 16px; }
    .top-score-value { font-size: 16px; }
    .top-sound { font-size: 17px; margin-left: auto; }
    .top-profile { font-size: 17px; }
    .theme-switcher { margin-left: 0; padding: 2px 6px; gap: 4px; }
    .theme-switcher__label { display: none; }
    .theme-btn { padding: 3px 7px; font-size: 10px; }

    /* Game canvas: centered, keeps aspect ratio */
    .board-wrapper {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 4px;
        min-height: 0;
        overflow: hidden;
    }

    #gameCanvas {
        display: block;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        aspect-ratio: 4 / 3;
        border-width: 3px;
        border-radius: 6px;
    }

    /* Leaderboard: floating transparent overlay */
    .ad-panel {
        position: absolute;
        top: 44px;
        left: 6px;
        width: 155px;
        max-height: 35vh;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        padding: 6px;
        overflow-y: auto;
        z-index: 30;
    }

    .leaderboard-title { font-size: 11px; padding-bottom: 4px; }
    .leaderboard-entries { gap: 2px; }
    .leaderboard-entry {
        background: rgba(255, 255, 255, 0.06);
        border-radius: 4px;
        padding: 3px 5px;
        grid-template-columns: 15px 17px 1fr auto;
        gap: 3px;
    }
    .leaderboard-rank { font-size: 10px; }
    .leaderboard-flag { font-size: 10px; }
    .leaderboard-flag-img { width: 13px; height: 10px; }
    .leaderboard-name { font-size: 10px; }
    .leaderboard-score { font-size: 10px; }
    .leaderboard-cached-note { font-size: 8px; }

    /* D-pad: fixed at bottom, always visible */
    .mobile-controls {
        display: flex;
        flex-shrink: 0;
        justify-content: center;
        align-items: center;
        padding: 8px 0;
        background: #111;
    }

    .mobile-controls-grid {
        grid-template-columns: 48px 48px 48px;
        grid-template-rows: 48px 48px 48px;
        gap: 3px;
    }

    .mobile-btn {
        width: 48px;
        height: 48px;
        background: #2d5a2d;
        border: 2px solid #4a9e4a;
        border-radius: 10px;
        font-size: 18px;
        color: #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    }

    .mobile-btn:active {
        background: #4a9e4a;
        border-color: #6abf4a;
        transform: scale(0.9);
        box-shadow: 0 0 10px rgba(74, 158, 74, 0.6);
    }
}

/* Small phones */
@media (max-width: 400px) {
    .top-bar { padding: 5px 8px; gap: 6px; }
    .top-score-icon { font-size: 14px; }
    .top-score-value { font-size: 14px; }

    .ad-panel { width: 130px; top: 38px; }
    .leaderboard-title { font-size: 10px; }
    .leaderboard-entry { grid-template-columns: 13px 15px 1fr auto; padding: 2px 3px; }
    .leaderboard-rank, .leaderboard-flag, .leaderboard-name, .leaderboard-score { font-size: 8px; }

    .mobile-controls-grid { grid-template-columns: 42px 42px 42px; grid-template-rows: 42px 42px 42px; gap: 2px; }
    .mobile-btn { width: 42px; height: 42px; font-size: 16px; border-radius: 8px; }
}

/* Landscape: put controls on the right side */
@media (max-width: 900px) and (orientation: landscape) {
    .page-layout {
        flex-direction: row;
    }

    .game-area {
        flex: 1;
    }

    .mobile-controls {
        flex-direction: column;
        padding: 0 8px;
        background: #111;
    }

    .ad-panel {
        top: 44px;
        left: 6px;
        width: 130px;
        max-height: 60vh;
    }
}

/* Game over modal: fit mobile */
@media (max-width: 600px) {
    .modal { width: 85vw; max-width: 300px; }
    .modal-title { font-size: 22px; letter-spacing: 2px; }
    .modal-skull { font-size: 28px; margin: 8px 0 3px; }
    .modal-body p { font-size: 12px; }
    .play-again-btn { font-size: 14px; padding: 10px 25px; }

    .profile-modal { width: 95vw; max-height: 90vh; }
    .profile-modal-header { padding: 10px 14px; }
    .profile-modal-title { font-size: 16px; }
    .profile-modal-body { padding: 12px; }
    .country-list { max-height: 120px; }
}

/* Touch controls for mobile/tablet */
.mobile-controls {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    background: rgba(0, 0, 0, 0.4);
}

.mobile-controls-grid {
    display: grid;
    grid-template-columns: 56px 56px 56px;
    grid-template-rows: 56px 56px 56px;
    gap: 4px;
}

.mobile-btn {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 2px solid rgba(74, 158, 74, 0.5);
    background: rgba(74, 158, 74, 0.25);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.1s, transform 0.1s;
}

.mobile-btn:active {
    background: rgba(74, 158, 74, 0.6);
    border-color: #4a9e4a;
    transform: scale(0.92);
}

.mobile-btn--up { grid-column: 2; grid-row: 1; }
.mobile-btn--left { grid-column: 1; grid-row: 2; }
.mobile-btn--down { grid-column: 2; grid-row: 3; }
.mobile-btn--right { grid-column: 3; grid-row: 2; }

/* Landscape mobile: side by side */
/* ===== Profile Modal ===== */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.profile-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.profile-modal {
    background: linear-gradient(180deg, #f5f0dc 0%, #e8e0c8 100%);
    border-radius: 16px;
    width: 400px;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 4px #4a9e4a,
        0 0 0 8px #2d6b2d;
    animation: modalBounce 0.4s ease;
    display: flex;
    flex-direction: column;
}

.profile-modal-header {
    background: linear-gradient(180deg, #6b3a1a 0%, #4a2810 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #3a2008;
}

.profile-modal-title {
    font-family: 'Fredoka One', cursive;
    font-size: 22px;
    color: #ffdd00;
    text-shadow: 2px 2px 0 #8b6914;
    letter-spacing: 2px;
}

.profile-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.profile-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.profile-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: opacity 0.3s;
}

.profile-label {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #4a4a3a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-input {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #fff;
    border: 2px solid #c8c0a8;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-input:focus {
    border-color: #4a9e4a;
    box-shadow: 0 0 0 3px rgba(74, 158, 74, 0.15);
}

/* Country Selector */
.country-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.country-selected {
    padding: 8px 12px;
    background: rgba(74, 158, 74, 0.1);
    border: 2px solid #4a9e4a;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #2d6b2d;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.country-filter-input {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    background: #fff;
    border: 2px solid #c8c0a8;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.country-filter-input:focus {
    border-color: #4a9e4a;
    box-shadow: 0 0 0 3px rgba(74, 158, 74, 0.15);
}

.country-list {
    max-height: 180px;
    overflow-y: auto;
    border: 2px solid #c8c0a8;
    border-radius: 8px;
    background: #fff;
}

.country-item {
    padding: 7px 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0ece0;
}

.country-item:last-child {
    border-bottom: none;
}

.country-item:hover {
    background: rgba(74, 158, 74, 0.1);
}

.country-item--selected {
    background: rgba(74, 158, 74, 0.2);
    color: #2d6b2d;
    font-weight: 800;
}

.country-no-match {
    padding: 14px 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* Profile Buttons */
.profile-btn-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 8px;
}

.profile-save-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(180deg, #6abf4a, #4a9e2a);
    border: none;
    border-bottom: 3px solid #3a7a1a;
    border-radius: 20px;
    padding: 10px 24px;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 3px 12px rgba(74, 158, 42, 0.3);
    transition: all 0.2s ease;
}

.profile-save-btn:hover {
    background: linear-gradient(180deg, #7ad05a, #5aae3a);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(74, 158, 42, 0.4);
}

.profile-save-btn:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}

.profile-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.profile-cancel-btn {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid #c8c0a8;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.profile-cancel-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #999;
}

/* Profile Messages */
.profile-message {
    min-height: 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    padding: 0 10px;
    border-radius: 6px;
    transition: all 0.3s;
}

.profile-message--success {
    color: #2d6b2d;
    background: rgba(74, 158, 74, 0.15);
    padding: 8px 10px;
    border: 1px solid rgba(74, 158, 74, 0.3);
}

.profile-message--error {
    color: #8b2020;
    background: rgba(200, 50, 50, 0.1);
    padding: 8px 10px;
    border: 1px solid rgba(200, 50, 50, 0.25);
}

/* ===== SEO Content Section ===== */
.seo-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #e0e0e0;
    line-height: 1.8;
    font-family: 'Nunito', sans-serif;
}

.seo-content h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 28px;
    color: #ffdd00;
    text-shadow: 2px 2px 0 #8b6914;
    margin-bottom: 20px;
    text-align: center;
}

.seo-content h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 22px;
    color: #6abf4a;
    margin: 30px 0 12px;
}

.seo-content p {
    font-size: 15px;
    margin-bottom: 16px;
    color: #ccc;
}

.seo-content strong {
    color: #fff;
}

.seo-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.seo-content li {
    font-size: 14px;
    margin-bottom: 8px;
    color: #bbb;
}

.seo-content li strong {
    color: #6abf4a;
}

@media (max-width: 900px) {
    .seo-content {
        padding: 30px 15px;
    }

    .seo-content h1 {
        font-size: 22px;
    }

    .seo-content h2 {
        font-size: 18px;
    }

    .seo-content p, .seo-content li {
        font-size: 13px;
    }
}

/* ===== FAQ Section ===== */
.faq-section {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
    padding-top: 30px;
}

.faq-section h2 {
    margin-bottom: 24px;
}

.faq-item {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: background 0.2s;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.faq-item h3 {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #6abf4a;
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 14px;
    color: #c0c0c0;
    line-height: 1.7;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .faq-item {
        padding: 12px 14px;
    }

    .faq-item h3 {
        font-size: 14px;
    }

    .faq-item p {
        font-size: 12px;
    }
}

/* ===== Legal Pages ===== */
.legal-page {
    padding-top: 40px;
    padding-bottom: 60px;
}

.legal-page h1 {
    margin-bottom: 8px;
}

.legal-page h2 {
    margin-top: 30px;
}

.legal-page h3 {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #6abf4a;
    margin-bottom: 6px;
}

.legal-page a {
    color: #6abf4a;
    text-decoration: underline;
    transition: color 0.2s;
}

.legal-page a:hover {
    color: #8ee068;
}

/* Contact Cards */
.contact-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 16px;
}

.contact-card h3 {
    margin-bottom: 8px;
}

.contact-card p {
    margin-bottom: 6px;
}

/* ===== Site Footer ===== */
.site-footer {
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-links a {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #6abf4a;
}

.footer-copy {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* ===== Site Navigation ===== */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: #111;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-brand {
    font-family: 'Fredoka One', cursive;
    font-size: 16px;
    color: #ffdd00;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-links a {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #6abf4a;
}

/* Challenge dropdown navigation */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    background: rgba(91, 192, 222, 0.1);
    border: 1px solid rgba(91, 192, 222, 0.3);
    color: #5bc0de;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav-dropdown-toggle:hover {
    color: #fff;
    background: rgba(91, 192, 222, 0.25);
    border-color: rgba(91, 192, 222, 0.6);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 6px;
    background: transparent;
    z-index: 100;
}

.nav-dropdown-menu-inner {
    background: #2a2a2a;
    border: 1px solid rgba(91, 192, 222, 0.3);
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 14px;
    color: #ddd;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
    background: rgba(91, 192, 222, 0.15);
    color: #fff;
}

@media (max-width: 600px) {
    .site-nav {
        padding: 6px 12px;
    }

    .nav-brand {
        font-size: 13px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 10px;
    }
}

/* ===== Hero/Landing Page ===== */
.hero-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hero-section {
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    margin: 0 0 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #aab;
    margin: 0;
}

/* Mode Cards */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    width: 100%;
}

.mode-card {
    display: block;
    background: #1e1e2e;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.mode-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 192, 222, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.mode-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}

.mode-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mode-card-body {
    padding: 20px;
}

.mode-card-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 8px;
}

.mode-card-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: #aab;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .hero-page {
        padding: 30px 15px;
    }

    .mode-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
