/* ---------- Reset-ish ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    line-height: 1.5;
    color: #111;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hide navigation when game is playing */
body.game-playing header nav,
body.game-playing .hamburger,
body.game-playing footer .links {
    display: none !important;
}

body.game-playing .logo {
    pointer-events: none !important;
    cursor: default !important;
}

body.game-playing footer {
    justify-content: flex-start !important;
}

.description {
    display: none;
}

body.start-screen .description {
    margin: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* max-width: 400px; */
}

body.start-screen .hook-line {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
    margin-bottom: 0.75rem;
}

body.start-screen .country-count {
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 400;

}

body.start-screen .description h1 {
    font-size: 2rem;
    line-height: 1;
    font-weight: 400;
    margin-bottom: 10px;
    margin-top: 10px;
}

body.start-screen .description p {
    max-width: 480px;
    font-size: 0.8rem;
    color: grey;
}


/* ---------- Layout ---------- */
header,
footer {
    padding: 10px 20px;
}

header {
    display: flex;
    align-items: center;
    gap: 16px;
    /* border-bottom: 1px solid #eee; */
    height: auto;
    position: relative;
    padding-top: 10px;
    padding-bottom: 10px;
}

header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

footer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin-bottom: 10px;
}

header nav {
    margin-left: auto;
    display: flex;
    gap: 14px;
}

header nav a {
    font-size: 0.8rem;
    /* ~50% smaller feel relative to standard */
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 20px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000;
    margin-left: auto;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Hamburger Animation */
.hamburger.active span:first-child {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}



main {
    margin: 0 auto;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.content-container {
    padding: 0 20px;
    max-width: 800px;
}

.full-width {
    padding: 0;
    width: 100%;
}

footer {
    display: flex;
    /* border-top: 1px solid #eee; */
    gap: 15px;
    flex-wrap: wrap;
    color: #666;
    min-height: 30px;
    font-size: 11px !important;
    align-items: center;
    padding: 10px 20px;
}

footer .links {
    display: flex;
    margin-left: auto;
    gap: 15px;
}

footer a,
footer span {
    font-size: 11px !important;
}

/* ---------- Links ---------- */
/* ---------- Links ---------- */
a {
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover {
    text-decoration: none;
    color: #000;
    border-bottom: 0 #ffd700;
    /* Gold */
}

/* ---------- Logo ---------- */
.logo,
.logo:hover,
.logo:active,
.logo:focus,
.logo:visited {
    display: flex;
    align-items: center;
    border: none !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* ---------- App container ---------- */
.app-shell {
    /* border: 1px solid #eee; */
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Ensure it doesn't force scroll if content is small, but fills space */
    min-height: 0;
}

#borderline-app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ---------- Utility ---------- */
.muted {
    color: #666;
}

.image-container {

    display: flex;
    gap: 16px;
}

#easy-title {
    color: #198754;
}

#medium-title {
    color: #ffc107;
}

#hard-title {
    color: #dc3545
}

#extreme-title {
    color: rgb(111, 66, 193);
}

#no-move-title {
    color: #0dcaf0;
}

.btn-gold {
    background-color: gold;
    color: #1a1a1a;
    border-color: gold;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.btn-gold:hover {
    text-decoration: none;
}

.back-button {
    display: flex;
    margin-bottom: 20px;
}

.text-small {
    font-size: 11px;
    line-height: 1.2;
    margin: 0;
}

/* ---------- Animations ---------- */
@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes pulse-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }

    25% {
        transform: scale(1.1);
        box-shadow: 0 0 15px 0 rgba(255, 215, 0, 0);
    }

    50% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}


/* Mobile Navigation - Moved to end for proper override */
@media (max-width: 768px) {
    header {
        height: auto;
        flex-wrap: wrap;
        padding-top: 5px;
        /* Reduced from 10px */
        padding-bottom: 5px;
        /* Reduced from 10px */
    }

    .hamburger {
        display: flex;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 20px;
        left: auto;
        width: 150px;
        /* Reduced from 200px */
        flex-direction: column;
        align-items: center;
        padding: 5px 0;
        background-color: white;
        /* border: 1px solid #eee; */
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        gap: 3px;
        /* Reduced from 14px inherited */
    }

    header nav a {
        font-size: 14px;
        padding: 8px;
        width: 100%;
        text-align: center;
    }

    header nav.active {
        display: flex;
    }

    footer {
        font-size: 11px !important;
        line-height: 1.2;
        min-height: auto;
        padding: 5px 10px;
        gap: 5px;
        justify-content: center;
    }

    footer .links {
        gap: 8px;
    }

    footer a,
    footer span {
        font-size: 11px !important;
    }

    .logo img {
        height: 40px;
    }

    .text-small {
        font-size: 8px !important;
        line-height: 1.1;
    }

    .image-container img {
        width: 100px;
        /* Reduced from 200px */
        height: 100px;
        object-fit: contain;
    }



    body.start-screen .description h1 {
        font-size: 1.4rem;
    }

    body.start-screen .hook-line {
        font-size: 0.6rem;
        font-weight: 400;
        text-transform: uppercase;
    }

    body.start-screen .country-count {
        font-size: 0.4rem;
        line-height: 1;
        font-weight: 300;

    }

}