/* CSS Variables for consistent theming */
:root {
    /* Bee Colors */
    --bee-yellow: #FFD700;
    --bee-black: #2C2C2C;
    --bee-white: #FFFFFF;
    
    /* Environment */
    --grass-green: #228B22;
    --earth-brown: #8B4513;
    --sky-blue: #87CEEB;
    
    /* UI */
    --ui-black: #000000;
    --ui-highlight: #FFD700;
    --ui-background: #f5f5f5;
    --ui-border: #ddd;
    
    /* Game Colors */
    --score-color: #4CAF50;
    --lives-color: #f44336;
    --level-color: #2196F3;
    --timer-color: #FF9800;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--sky-blue) 0%, #98D8E8 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#gameContainer {
    background: var(--ui-background);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 95vw;
    max-height: 95vh;
}

/* Header Styles */
#gameHeader {
    background: linear-gradient(45deg, var(--bee-yellow), #FFA500);
    padding: 15px 20px;
    text-align: center;
    border-bottom: 3px solid var(--bee-black);
}

#gameHeader h1 {
    color: var(--bee-black);
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#gameStats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.stat {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid var(--bee-black);
    font-weight: bold;
    min-width: 100px;
}

.stat .label {
    color: var(--bee-black);
    font-size: 0.9em;
}

#score { color: var(--score-color); }
#lives { color: var(--lives-color); }
#level { color: var(--level-color); }
#timer { color: var(--timer-color); }

/* Main Game Area */
#gameMain {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--ui-background);
}

#gameCanvas {
    border: 3px solid var(--bee-black);
    border-radius: 10px;
    background: var(--sky-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    height: auto;
}

/* Controls Info */
#gameControls {
    margin-top: 20px;
    text-align: center;
}

.control-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid var(--bee-black);
}

.control-info h3 {
    color: var(--bee-black);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.control-info p {
    margin: 5px 0;
    color: var(--bee-black);
    font-size: 0.9em;
}

/* Overlay and Menus */
#gameOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.menu {
    background: var(--ui-background);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid var(--bee-yellow);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

.menu h2 {
    color: var(--bee-black);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.menu p {
    color: var(--bee-black);
    margin: 10px 0;
    font-size: 1.1em;
}

.menu button {
    background: linear-gradient(45deg, var(--bee-yellow), #FFA500);
    color: var(--bee-black);
    border: 2px solid var(--bee-black);
    padding: 12px 25px;
    margin: 10px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.menu button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #FFA500, var(--bee-yellow));
}

.menu button:active {
    transform: translateY(0);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    #gameHeader h1 {
        font-size: 2em;
    }
    
    #gameStats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }
    
    .stat {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .control-info {
        font-size: 0.9em;
    }
    
    /* Mobile controls styling - MORE AGGRESSIVE */
    #mobileControls {
        position: fixed !important;
        bottom: 5px !important;
        left: 5px !important;
        right: 5px !important;
        z-index: 1000 !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    #joystick {
        width: 60px !important;
        height: 60px !important;
        background: rgba(255, 255, 255, 0.7) !important;
        border: 1px solid var(--bee-black) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    }
    
    #joystickStick {
        width: 20px !important;
        height: 20px !important;
        background: var(--bee-yellow) !important;
        border: 1px solid var(--bee-black) !important;
    }
    
    #boostButton {
        width: 55px !important;
        height: 55px !important;
        font-size: 20px !important;
        background: rgba(255, 215, 0, 0.8) !important;
        border: 1px solid var(--bee-black) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    }
    
    #pauseButton, #restartButton, #fullscreenButton, #minimalModeToggle {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
        background: rgba(255, 215, 0, 0.8) !important;
        border: 1px solid var(--bee-black) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Hide desktop controls on mobile */
    #gameControls {
        display: none !important;
    }
    
    /* Adjust game container for mobile */
    #gameContainer {
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    
    #gameMain {
        padding: 5px !important;
    }

    /* Reduce header size on mobile */
    #gameHeader {
        padding: 8px 15px !important;
    }

    #gameHeader h1 {
        font-size: 1.8em !important;
        margin-bottom: 5px !important;
    }

    #gameStats {
        gap: 1px;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    
    .stat {
        padding: 1px 3px;
        min-width: 40px;
        max-width: 45px;
        font-size: 0.6em;
        flex: 0 0 auto;
        text-align: center;
        border-radius: 8px;
        border-width: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .stat .label {
        font-size: 0.5em;
    }
}

@media (max-width: 480px) {
    #gameHeader h1 {
        font-size: 1.2em;
    }
    
    .menu {
        padding: 15px;
        margin: 8px;
    }
    
    .menu button {
        padding: 8px 16px;
        font-size: 0.9em;
        min-width: 100px;
    }
    
    /* MUCH smaller controls for very small screens */
    #joystick {
        width: 65px !important;
        height: 65px !important;
    }
    
    #joystickStick {
        width: 22px !important;
        height: 22px !important;
    }
    
    #boostButton {
        width: 60px !important;
        height: 60px !important;
        font-size: 20px !important;
    }
    
    #pauseButton, #restartButton, #fullscreenButton, #minimalModeToggle {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    
    #gameStats {
        gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat {
        padding: 1px 3px;
        min-width: 40px;
        font-size: 0.6em;
        flex: 0 0 calc(50% - 2px);
        text-align: center;
        border-radius: 8px;
        border-width: 1px;
    }
    
    .stat .label {
        font-size: 0.5em;
    }
    
    /* Reduce header even more on very small screens */
    #gameHeader {
        padding: 1px 3px !important;
    }
    
    #gameHeader h1 {
        font-size: 0.9em !important;
        margin-bottom: 1px !important;
    }
    
    /* Reduce game main padding */
    #gameMain {
        padding: 1px !important;
    }
    
    /* Reduce mobile controls spacing */
    #mobileControls {
        bottom: 2px !important;
        left: 2px !important;
        right: 2px !important;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #gameContainer {
        max-height: 98vh;
    }
    
    #gameHeader {
        padding: 10px 20px;
    }
    
    #gameHeader h1 {
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    #gameStats {
        gap: 10px;
    }
    
    .stat {
        padding: 5px 10px;
        min-width: 80px;
    }
    
    /* Landscape controls - position on sides of game area */
    #mobileControls {
        position: fixed !important;
        top: 50% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 10px !important;
        pointer-events: none !important;
        z-index: 1000 !important;
    }
    
    /* Left side controls */
    #mobileControls > div:first-child {
        pointer-events: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    /* Right side controls */
    #mobileControls > div:last-child {
        pointer-events: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Larger controls for landscape */
    #joystick {
        width: 70px !important;
        height: 70px !important;
    }
    
    #joystickStick {
        width: 25px !important;
        height: 25px !important;
    }
    
    #boostButton {
        width: 65px !important;
        height: 65px !important;
        font-size: 22px !important;
    }
    
    #pauseButton, #restartButton, #fullscreenButton, #minimalModeToggle {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

/* Tablet specific styles */
@media (min-width: 769px) and (max-width: 1024px) {
    #gameHeader h1 {
        font-size: 2.2em;
    }
    
    #gameCanvas {
        max-width: 90vw;
    }
    
    /* Show mobile controls on tablets too */
    #gameControls {
        display: none !important;
    }
    
    #mobileControls {
        display: flex !important;
    }
    
    #joystick {
        width: 80px !important;
        height: 80px !important;
    }
    
    #joystickStick {
        width: 30px !important;
        height: 30px !important;
    }
    
    #boostButton, #pauseButton, #restartButton {
        width: 65px !important;
        height: 65px !important;
        font-size: 26px !important;
    }
} 

/* Ultra-compact styles for very small screens */
@media (max-width: 360px) {
    #gameHeader h1 {
        font-size: 0.8em !important;
        margin-bottom: 0px !important;
    }
    
    #gameStats {
        gap: 0px !important;
    }
    
    .stat {
        padding: 0px 2px !important;
        min-width: 30px !important;
        max-width: 35px !important;
        font-size: 0.5em !important;
        border-radius: 6px !important;
    }
    
    .stat .label {
        font-size: 0.4em !important;
    }
    
    #gameHeader {
        padding: 0px 2px !important;
    }
} 

/* Small screens in landscape */
@media (max-width: 700px) and (orientation: landscape) {
    #gameHeader h1 {
        font-size: 1.2em !important;
    }
    
    #gameStats {
        gap: 6px !important;
    }
    
    .stat {
        padding: 3px 6px !important;
        min-width: 60px !important;
        font-size: 0.7em !important;
    }
    
    /* Smaller landscape controls for small screens */
    #joystick {
        width: 60px !important;
        height: 60px !important;
    }
    
    #joystickStick {
        width: 22px !important;
        height: 22px !important;
    }
    
    #boostButton {
        width: 55px !important;
        height: 55px !important;
        font-size: 20px !important;
    }
    
    #pauseButton, #restartButton, #fullscreenButton, #minimalModeToggle {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
    
    /* Left side controls - vertical stack */
    #mobileControls > div:first-child {
        flex-direction: column !important;
        gap: 12px !important;
    }
} 