body {
    margin: 0;
    padding: 0;
    background-color: #1a1512;
    color: #4a3424;
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    width: 100%;
    margin: 0 auto;
    padding-top: 2vh;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 2 / 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(210, 180, 140, 0.3);
    border-radius: 10px;
    overflow: hidden;
    background-color: #F8F1DF; /* Will be dynamically updated by game.js */
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#scoreDisplay {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 16px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.65);
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #4a3424;
    text-shadow: 1px 1px 0 #000;
    z-index: 10;
    text-align: right;
    line-height: 1.5;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(248, 241, 223, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    backdrop-filter: blur(3px);
}

.overlay h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #8b5a2b;
    text-shadow: 2px 2px 0 #fff;
}

.overlay p {
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #4a3424;
}

button {
    font-family: 'Press Start 2P', monospace;
    background: #8b5a2b;
    color: #fff;
    border: 4px solid #4a3424;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.1s;
}

button:hover {
    transform: scale(1.05);
    background: #a06e3b;
}

button:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}
@media (max-width: 768px) {
    body {
        padding: 0;
        overflow: hidden;
        background-color: #000;
    }
    .game-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100dvw;
        height: 100dvh;
        z-index: 9999;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        max-width: none;
    }
    #game-container {
        width: 100dvw;
        height: 100dvh;
        max-width: none;
        max-height: none;
        border: none;
        border-radius: 0;
    }
    .game-info-section, .site-footer {
        display: none !important;
    }
    .overlay h1 {
        font-size: 20px;
    }
    .overlay p {
        font-size: 10px;
    }
    button {
        padding: 10px 20px;
        font-size: 12px;
    }
    #scoreDisplay {
        font-size: 12px;
    }
}

/* Mobile Auto-Flip for Portrait */
@media (max-width: 768px) and (orientation: portrait) {
    .game-wrapper {
        transform: rotate(90deg);
        transform-origin: center center;
        width: 100dvh;
        height: 100dvw;
        position: fixed;
        top: 50%;
        left: 50%;
        margin-top: -50dvw;
        margin-left: -50dvh;
    }
    #game-container {
        width: 100%;
        height: 100%;
    }
}
/* Ko-fi Footer */
.site-footer {
    text-align: center;
    padding: 24px 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}
.kofi-footer-container {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}
.kofi-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000000 !important;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.kofi-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 26px rgba(245, 158, 11, 0.6);
    filter: brightness(1.05);
}
.kofi-icon {
    font-size: 1.2rem;
    display: inline-block;
    animation: kofi-wiggle 3.5s ease-in-out infinite;
    transform-origin: bottom center;
}
@keyframes kofi-wiggle {
    0%, 82%, 100% { transform: rotate(0deg); }
    86% { transform: rotate(-12deg); }
    90% { transform: rotate(10deg); }
    94% { transform: rotate(-6deg); }
    97% { transform: rotate(4deg); }
}
