 /* Base Styles */
        :root {
            --sky-top: #4fc3f7;
            --sky-bottom: #0288d1;
            --ground-color: #8D6E63;
            --pipe-color: #4CAF50;
            --bird-color: #FFEB3B;
            --button-bg: #f8d030;
            --button-shadow-dark: #d1b027;
            --button-shadow-light: #ffff39;
            --text-color: white;
            --shadow-color: rgba(0, 0, 0, 0.5);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            width: 100vw;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
            font-family: 'Arial Rounded MT Bold', 'Arial', sans-serif;
            overflow: hidden;
            touch-action: manipulation;
            background-attachment: fixed;
            background-size: 200% 200%;
            animation: skyAnimation 30s ease infinite;
            color: var(--text-color);
            transition: background 0.5s ease;
        }

        @keyframes skyAnimation {
            0% { background-position: 0% 50% }
            50% { background-position: 100% 50% }
            100% { background-position: 0% 50% }
        }

        /* Game Container - Responsive Aspect Ratio */
        #game-container {
            position: relative;
            width: 100%;
            height: 100%;
            max-width: 450px; /* Slightly wider than original for tablets */
            max-height: 800px; /* Slightly taller than original for tablets */
            aspect-ratio: 9/16; /* Maintain original aspect ratio */
            margin: auto;
        }

        /* Canvas - Fills container */
        #game-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: transparent;
            transform: translateZ(0);
            will-change: transform;
            backface-visibility: hidden;
            image-rendering: optimizeSpeed;
        }

        /* UI Container - Positioned over canvas */
        #ui-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            padding: 5%;
            box-sizing: border-box;
        }

        /* Responsive Typography */
        #game-title {
            font-size: clamp(2rem, 8vw, 3.5rem);
            line-height: 1.2;
            text-shadow: 
                2px 2px 4px var(--shadow-color),
                0 0 10px rgba(255, 255, 255, 0.3);
            margin-top: 10%;
            text-align: center;
            background: linear-gradient(to right, #FFEB3B, #FF9800);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: titleGlow 2s infinite alternate;
        }

        @keyframes titleGlow {
            from { text-shadow: 0 0 5px rgba(255, 235, 59, 0.5); }
            to { text-shadow: 0 0 15px rgba(255, 235, 59, 0.8); }
        }

        /* Score Display */
        #score-display {
            font-size: clamp(1.5rem, 6vw, 2.5rem);
            color: var(--text-color);
            text-shadow: 
                2px 2px 4px var(--shadow-color),
                0 0 10px rgba(255, 255, 255, 0.3);
            margin-top: 5%;
        }

        #best-score-display {
            font-size: clamp(0.9rem, 3.5vw, 1.2rem);
            color: var(--text-color);
            text-shadow: 1px 1px 2px var(--shadow-color);
            margin-top: 2%;
        }

        /* Buttons - Responsive sizing */
        .button {
            pointer-events: auto;
            padding: clamp(8px, 3vw, 12px) clamp(16px, 5vw, 24px);
            background: var(--button-bg);
            color: #000;
            border: none;
            border-radius: clamp(10px, 3vw, 15px);
            font-size: clamp(14px, 4vw, 18px);
            font-weight: bold;
            cursor: pointer;
            box-shadow: 
                clamp(4px, 1.5vw, 8px) clamp(4px, 1.5vw, 8px) clamp(8px, 3vw, 16px) var(--button-shadow-dark),
                clamp(-4px, -1.5vw, -8px) clamp(-4px, -1.5vw, -8px) clamp(8px, 3vw, 16px) var(--button-shadow-light);
            transition: 
                transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.2s ease,
                background-color 0.3s ease;
            background-image: linear-gradient(
                to bottom, 
                rgba(255, 255, 255, 0.3) 0%, 
                rgba(255, 255, 255, 0) 50%
            );
            position: relative;
            overflow: hidden;
            z-index: 1;
        }

        .button:hover {
            transform: translateY(-3px) scale(1.05);
            box-shadow: 
                clamp(2px, 1vw, 4px) clamp(2px, 1vw, 4px) clamp(4px, 2vw, 8px) var(--button-shadow-dark),
                clamp(-2px, -1vw, -4px) clamp(-2px, -1vw, -4px) clamp(4px, 2vw, 8px) var(--button-shadow-light),
                0 0 20px rgba(255, 255, 255, 0.2);
        }

        .button:active {
            transform: translateY(1px) scale(0.98);
            box-shadow: 
                clamp(1px, 0.5vw, 2px) clamp(1px, 0.5vw, 2px) clamp(2px, 1vw, 4px) var(--button-shadow-dark),
                clamp(-1px, -0.5vw, -2px) clamp(-1px, -0.5vw, -2px) clamp(2px, 1vw, 4px) var(--button-shadow-light);
            background-image: linear-gradient(
                to bottom, 
                rgba(0, 0, 0, 0.1) 0%, 
                rgba(0, 0, 0, 0) 50%
            );
        }

        /* Instructions - Responsive */
        #instructions {
            font-size: clamp(0.7rem, 3vw, 1rem);
            line-height: 1.5;
            text-align: center;
            width: 90%;
            text-shadow: 1px 1px 2px var(--shadow-color);
            margin-bottom: 15%;
            background: rgba(0, 0, 0, 0.3);
            padding: clamp(5px, 2vw, 10px) clamp(8px, 3vw, 15px);
            border-radius: clamp(5px, 2vw, 10px);
            backdrop-filter: blur(5px);
        }

        /* Theme Toggle - Responsive */
        #theme-toggle {
            pointer-events: auto;
            position: absolute;
            top: clamp(10px, 3vw, 20px);
            right: clamp(10px, 3vw, 20px);
            padding: clamp(4px, 1.5vw, 8px) clamp(6px, 2vw, 12px);
            background: rgba(255, 255, 255, 0.2);
            border-radius: clamp(10px, 3vw, 20px);
            cursor: pointer;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: clamp(12px, 3vw, 16px);
        }

        /* Night Mode Styles */
        body.night-mode {
            --sky-top: #0a0a2a;
            --sky-bottom: #1a1a4a;
            --ground-color: #5a3a20;
            --pipe-color: #2a8a2a;
            --bird-color: #FFA000;
            --button-bg: #FFA000;
            --button-shadow-dark: #d18a00;
            --button-shadow-light: #ffb633;
            --text-color: #f0f0f0;
            --shadow-color: rgba(0, 0, 0, 0.7);
        }

        .night-mode .button {
            box-shadow: 
                0 0 clamp(5px, 2vw, 10px) rgba(255, 160, 0, 0.5),
                0 0 clamp(10px, 3vw, 20px) rgba(255, 160, 0, 0.3);
            animation: pulseGlow 2s infinite alternate;
        }

        @keyframes pulseGlow {
            from { box-shadow: 0 0 clamp(5px, 2vw, 10px) rgba(255, 160, 0, 0.5); }
            to { box-shadow: 0 0 clamp(10px, 3vw, 20px) rgba(255, 160, 0, 0.8); }
        }

        /* Landscape Orientation Adjustments */
        @media (orientation: landscape) {
            #game-container {
                max-width: 90vh; /* Height-based width for landscape */
                max-height: 90vw; /* Width-based height for landscape */
            }
            
            #game-title {
                margin-top: 5%;
                font-size: clamp(1.5rem, 5vh, 2.5rem);
            }
            
            #instructions {
                margin-bottom: 5%;
                font-size: clamp(0.6rem, 2vh, 0.8rem);
            }
            
            .button {
                padding: clamp(6px, 2vh, 10px) clamp(12px, 4vh, 20px);
                font-size: clamp(12px, 3.5vh, 16px);
            }
        }

        /* Very small screens */
        @media (max-height: 500px) {
            #game-title {
                margin-top: 2%;
                font-size: 1.5rem;
            }
            
            #instructions {
                margin-bottom: 2%;
                font-size: 0.7rem;
            }
        }

        /* Reduced motion preference */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation: none !important;
                transition: none !important;
            }
            
            body {
                animation: none;
            }
        }

        /* Dark mode preference */
        @media (prefers-color-scheme: dark) {
            body:not(.day-mode) {
                --sky-top: #0a0a2a;
                --sky-bottom: #1a1a4a;
            }
        }