* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#gbc-frame {
    background: linear-gradient(145deg, #8b5cf6, #6d28d9);
    border-radius: 20px 20px 40px 40px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

#screen-border {
    background: #2d1b4e;
    padding: 15px;
    border-radius: 10px;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.7);
    position: relative;
}

#gameCanvas {
    display: block;
    width: 480px;
    height: 432px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background: #0f380f;
    border-radius: 5px;
}

#ui-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    pointer-events: none;
    color: rgba(15, 56, 15, 0.8);
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}

#hud-top {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(155, 188, 15, 0.3);
    border-radius: 3px;
}

#level-indicator {
    text-align: center;
    margin-top: 5px;
    padding: 4px;
    background: rgba(155, 188, 15, 0.3);
    border-radius: 3px;
}

#bonnie-mood {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 20px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

#controls-panel {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.ctrl-btn {
    background: rgba(139, 92, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-btn:hover {
    background: rgba(139, 92, 246, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.ctrl-btn:active {
    transform: translateY(0);
}

.screen-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: rgba(15, 56, 15, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: #9bbc0f;
    border-radius: 5px;
    z-index: 10;
}

.title-logo {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    text-shadow: 3px 3px 0 #0f380f;
    line-height: 1.2;
}

.bonnie-preview {
    width: 48px;
    height: 48px;
    background: #306230;
    border-radius: 5px;
    position: relative;
}

.blink-text {
    font-size: 16px;
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.game-btn {
    background: #306230;
    border: 3px solid #9bbc0f;
    color: #9bbc0f;
    padding: 12px 24px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.game-btn:hover {
    background: #9bbc0f;
    color: #0f380f;
    transform: scale(1.05);
}

.game-btn:active {
    transform: scale(0.95);
}

.high-score {
    font-size: 12px;
    color: #8bac0f;
}

.clear-title {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 0 #0f380f;
}

.clear-stats, .final-stats {
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

footer {
    margin-top: 30px;
    text-align: center;
    color: white;
    font-size: 12px;
    opacity: 0.8;
}

footer a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

@media (max-width: 600px) {
    #gameCanvas {
        width: 320px;
        height: 288px;
    }
    
    #gbc-frame {
        padding: 20px;
    }
    
    #controls-panel {
        flex-wrap: wrap;
    }
    
    .ctrl-btn {
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .title-logo {
        font-size: 24px;
    }
}

@media (max-width: 400px) {
    #gameCanvas {
        width: 240px;
        height: 216px;
    }
    
    #ui-overlay {
        font-size: 9px;
    }
    
    .title-logo {
        font-size: 20px;
    }
}