body {
    margin: 0;
    overflow: hidden;
    height: 100vh;
    background-color: #87CEEB; /* Sky blue */
    position: relative; /* Needed for absolute positioning of bees */
    font-family: sans-serif; /* Add a default font */
}

body.dark-omen{background:#0a0a0a!important}
body.dark-omen .speech-bubble { display: none !important; }

/* New cloud styles */
.cloud {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent white */
    border-radius: 50%; /* Rounded shape */
    pointer-events: none; /* Clouds shouldn't interfere with clicks */
}

/* Different cloud sizes */
.cloud-sm {
    width: 50px;
    height: 30px;
}

.cloud-md {
    width: 80px;
    height: 40px;
}

.cloud-lg {
    width: 120px;
    height: 60px;
}

.cloud-xl {
    width: 180px;
    height: 80px;
}

/* fade helper */
.omen-fade{opacity:0;transition:opacity 2s ease}

/* rain */
.rain-drop{position:fixed;top:-10vh;width:2px;height:18vh;background:rgba(180,200,255,.7);left:var(--x);pointer-events:none;z-index:3000;animation:rain 1s linear infinite}
@keyframes rain{to{transform:translateY(120vh)}}

/* hornet king */
.hornet-king{position:fixed;left:50%;top:30%;transform:translate(-50%,-50%);z-index:3001}
.hornet-king .crown{position:absolute;left:50%;top:-36px;transform:translateX(-50%);width:70px;height:44px;background:conic-gradient(from 0,#FFD700 0 20%,#ffec8b 20% 55%,#b8860b 55% 85%,#FFD700 85% 100%);clip-path:polygon(0% 100%,10% 40%,25% 80%,40% 35%,50% 80%,60% 35%,75% 80%,90% 40%,100% 100%)}

#bee-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* pointer-events: none;  Removed to allow clicking specific bees */
}

.bee-wrapper {
    position: absolute;
    display: flex; /* Use flexbox for image and bubble */
    align-items: center; /* Vertically align image and bubble */
    will-change: transform; /* Optimize animation */
    transition: transform 0.1s linear; /* Smooth out visual updates */
    /* Set height explicitly to avoid layout shifts if image loads slow */
    height: 50px;
    cursor: default; /* Default cursor */
    pointer-events: none; /* Bees are not clickable by default */
}

.home-bee {
    cursor: pointer; /* Make home bee clickable */
    pointer-events: auto !important; /* Override container setting */
}

.game-bee {
    cursor: pointer; /* Make game bee clickable */
    pointer-events: auto !important; /* Override container setting */
}

.music-bee {
    cursor: pointer; /* Make music bee clickable */
    pointer-events: auto !important; /* Override container setting */
}

.rps-bee {
    cursor: pointer; /* Make rps bee clickable */
    pointer-events: auto !important; /* Override container setting */
}

.shop-keeper-bee {
    cursor: pointer;
    pointer-events: auto !important;
}

/* New King Bee style */
.king-bee {
    cursor: pointer;
    pointer-events: auto !important;
    z-index: 10; /* Higher z-index to be visible above other bees */
}

/* Style for the bee image */
.bee-image {
    width: 50px; /* Match beeSize in JS */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below image */
    /* Add a slight filter for effect if desired, e.g., drop-shadow */
    /* Ensure image flipping doesn't affect layout badly */
    transform-origin: center center;
}

/* King Bee image specifically */
.king-bee .bee-image {
    width: 100px; /* Make king bee larger */
    height: auto;
    filter: drop-shadow(0 0 10px gold); /* Add a golden glow */
}

.speech-bubble {
    /* Adjust margin to appear next to the image */
    margin-left: 5px; /* Default margin for right-facing bee */
    margin-right: 0;
    background: white;
    padding: 5px 10px;
    border-radius: 10px;
    border: 1px solid black;
    font-size: 12px;
    font-family: sans-serif;
    white-space: nowrap;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    /* Ensure it doesn't shrink */
    flex-shrink: 0;
    /* Transform origin for scaling/flipping */
    transform-origin: center left; /* Default origin for right-facing bee */
    /* Add transition for smoother scale changes if needed */
    /* transition: transform 0.1s linear; */
}

/* Style for the King Bee speech bubble */
.king-bee .speech-bubble {
    background-color: #FFD700; /* Gold background */
    color: #8B4513; /* Brown text */
    border: 2px solid #8B4513; /* Brown border */
    font-weight: bold;
}

/* Highlighted bee style */
.highlighted-bee {
    animation: pulse-highlight 2s infinite alternate;
    z-index: 50; /* Make sure it appears above other bees */
}

.highlighted-bee .bee-image {
    filter: drop-shadow(0 0 8px gold); /* Add gold glow to the image */
}

.highlighted-bee .speech-bubble {
    background-color: #FFD700; /* Gold background */
    color: #8B4513; /* Brown text */
    font-weight: bold;
    border: 2px solid #8B4513; /* Thicker border */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7); /* Golden glow */
}

@keyframes pulse-highlight {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

#game-overlay {
    position: fixed; /* Fixed position to stay centered */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex; /* Use flex for centering */
    justify-content: center;
    align-items: center;
    z-index: 101; /* Ensure score is above overlay */
}

#game-overlay.hidden {
    display: none; /* Hide the overlay initially */
}

/* New container for game content */
#game-content {
    display: flex; /* Arrange bee and sidebar */
    align-items: center; /* Vertically align */
    gap: 30px; /* Space between bee and sidebar */
    background-color: rgba(0, 0, 0, 0.3); /* Optional: Slight background for the content area */
    padding: 20px;
    border-radius: 10px;
    position: relative; /* Needed for absolute positioning of the minigame bee container */
    /* Ensure clicks go through to elements behind if needed, though children have higher z-index */
    /* pointer-events: none; */ /* Removed as children need events */
    z-index: 0; /* Establish stacking context */
}

#minigame-bee-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Bees inside shouldn't be clickable */
    overflow: hidden; /* Keep bees contained */
    z-index: 1; /* Behind clickable bee and sidebar, but above game-content background */
}

.minigame-bee {
    position: absolute;
    width: 25px; /* Smaller bees for the minigame */
    height: auto;
    display: block;
    will-change: transform;
    /* No pointer events needed */
    transform-origin: center center; /* For potential flipping */
}

#clickable-bee {
    width: 150px; /* Larger bee */
    height: auto;
    cursor: pointer;
    border: 3px solid gold;
    border-radius: 50%;
    transition: transform 0.1s ease-out; /* Add a little bounce effect */
    flex-shrink: 0; /* Prevent bee from shrinking */
    position: relative; /* Ensure it stays above the minigame bees */
    z-index: 2; /* Above minigame bees */
}

#clickable-bee:active {
    transform: scale(0.95); /* Shrink slightly when clicked */
}

/* Sidebar styles */
#upgrade-sidebar {
    width: 220px; /* Slightly wider */
    background-color: #8B4513; /* SaddleBrown */
    color: #F0E68C; /* Khaki */
    border: 3px solid #DAA520; /* Goldenrod */
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between elements */
    font-family: 'Arial', sans-serif;
    position: relative; /* Ensure it stays above the minigame bees */
    z-index: 2; /* Above minigame bees */
    max-height: 80vh; /* Prevent excessive height */
    overflow-y: auto; /* Allow scrolling if needed */
}

#upgrade-sidebar h3 {
    margin: 0 0 10px 0;
    text-align: center;
    color: #FFD700; /* Gold */
    border-bottom: 1px solid #DAA520; /* Goldenrod */
    padding-bottom: 5px;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Container for stats */
#stats-display {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px; /* Space below stats */
    flex-shrink: 0; /* Prevent shrinking */
}

#ppc-display, #pps-display {
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 5px;
}

.upgrade-button { /* General class for all upgrade buttons */
    background: linear-gradient(180deg, #c4921d, #a97712);
    border: 1px solid #F0E68C; /* Khaki */
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    flex-shrink: 0; /* Prevent shrinking */
    text-align: center; /* Center text */
    min-height: 40px; /* Ensure consistent height */
    display: flex; /* Center span vertically */
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upgrade-button::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-15deg);
}

.upgrade-button:hover::after {
    animation: btn-sheen 0.6s ease-out forwards;
}

@keyframes btn-sheen {
    to { left: 140%; }
}

.upgrade-button:hover:not(:disabled) {
    background-color: #DAA520; /* Goldenrod */
}

.upgrade-button:disabled {
    background-color: #A0522D; /* Sienna */
    color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.upgrade-button span {
    display: inline-block; /* Allows text wrapping if needed, though unlikely here */
}

/* Rebirth locked style */
.rebirth-locked {
    opacity: 0.5; /* Dim the button */
    /* Add maybe a border color or text color change */
    border-color: grey;
    color: #ccc;
}

.rebirth-locked:hover {
    /* Prevent hover effect when locked */
    background-color: #A0522D;
    cursor: not-allowed;
}

/* Overlay container now includes environment display */
#score-display {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: bold;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 4px;
    backdrop-filter: blur(5px);
}

#environment-display {
    font-size: 0.85em;
    font-weight: normal;
    color: #333;
    padding-top: 4px;
    border-top: 1px dashed rgba(0,0,0,0.2);
}

/* Parallax Background Layers */
#background-layers {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0; /* behind bees */
    pointer-events: none;
}

.bg-layer {
    position: absolute;
    inset: 0;
}

/* Far mountains/hills */
.layer-far {
    background: linear-gradient(to top, rgba(0,0,0,0.08), transparent 40%),
                radial-gradient(circle at 20% 100%, rgba(50,100,50,0.35) 0 30%, transparent 31%),
                radial-gradient(circle at 70% 100%, rgba(40,80,40,0.3) 0 35%, transparent 36%);
    transform: translateZ(0);
}

/* Mid trees/terrain silhouettes */
.layer-mid::before,
.layer-mid::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 160%;
    height: 40%;
    left: -30%;
    background:
      radial-gradient(100px 40px at 10% 100%, rgba(30,70,30,0.45) 0 99%, transparent 100%),
      radial-gradient(120px 45px at 30% 100%, rgba(30,80,30,0.45) 0 99%, transparent 100%),
      radial-gradient(90px 35px at 55% 100%, rgba(25,60,25,0.45) 0 99%, transparent 100%),
      radial-gradient(130px 50px at 80% 100%, rgba(35,85,35,0.45) 0 99%, transparent 100%);
    filter: blur(0.5px);
    animation: pan-mid 120s linear infinite;
}
.layer-mid::after {
    bottom: -20px;
    opacity: 0.6;
    transform: scaleY(1.05);
    animation-duration: 160s;
}

@keyframes pan-mid {
    from { transform: translateX(0); }
    to { transform: translateX(-10%); }
}

/* Near flowers/bushes */
.layer-near {
    height: 0 !important;
    pointer-events: none;
}
.layer-near::before {
    display: none !important;
}
.layer-near .flower,
.layer-near .bush,
.layer-near .tree {
    display: none !important;
}

/* Seasonal particles */
.particle {
    position: absolute;
    will-change: transform, opacity;
    pointer-events: none;
}
.particle.snow {
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: snow-fall var(--dur,10s) linear infinite;
    box-shadow: 0 0 4px rgba(255,255,255,0.6);
}
@keyframes snow-fall {
    from { transform: translateY(-10vh) translateX(0); opacity: 0.9; }
    to { transform: translateY(110vh) translateX(var(--wind, 20px)); opacity: 0.2; }
}

.particle.leaf {
    width: 9px;
    height: 5px;
    background: linear-gradient(90deg, #bf360c, #ff8f00);
    border-radius: 50% 50% 50% 0;
    transform: rotate(20deg);
    opacity: 0.85;
    animation: leaf-fall var(--dur,9s) ease-in infinite;
}
@keyframes leaf-fall {
    0% { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0.9; }
    50% { transform: translateY(50vh) translateX(40px) rotate(180deg); }
    100% { transform: translateY(110vh) translateX(80px) rotate(360deg); opacity: 0.3; }
}

.particle.butterfly {
    width: 12px;
    height: 10px;
    background: radial-gradient(circle at 30% 50%, #ff80ab 0 40%, transparent 41%),
                radial-gradient(circle at 70% 50%, #ff4081 0 40%, transparent 41%);
    border-radius: 50%;
    animation: flutter var(--dur,6s) ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 4px rgba(255,64,129,0.4));
}
@keyframes flutter {
    0% { transform: translateY(0) translateX(0) rotate(0deg); }
    50% { transform: translateY(-40px) translateX(60px) rotate(10deg); }
    100% { transform: translateY(0) translateX(120px) rotate(0deg); }
}

/* Biome tint overlay (subtle color wash that changes per biome) */
#background-layers::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--biome-tint-color, rgba(255,255,255,0.0));
    pointer-events: none;
    transition: background 0.8s ease;
    z-index: 0;
}

/* Adjust z-order: far/mid/near are beneath tint */
#background-layers .bg-layer { z-index: 0; }

/* Confetti particles and animation */
.particle.confetti {
    width: 8px;
    height: 12px;
    position: absolute;
    background: hsl(var(--confetti-hue, 0), 85%, 60%);
    transform: rotate(15deg);
    animation: confetti-fall 4s linear forwards;
    opacity: 0.95;
}
@keyframes confetti-fall {
    0%   { transform: translateY(-5vh) translateX(0) rotate(0deg); }
    50%  { transform: translateY(50vh) translateX(30px) rotate(180deg); }
    100% { transform: translateY(110vh) translateX(-40px) rotate(360deg); opacity: 0; }
}

/* TV ticker animation */
@keyframes ticker-move {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-130%); }
}

/* Fun Bee Aura */
.bee-aura {
    box-shadow: 0 0 20px 6px rgba(255,215,0,0.8);
    border-color: #ffea00 !important;
}

/* Ensure tint sits under night overlay (after is above before) */
#background-layers::after { z-index: 1; }

/* Day/Night tint overlay */
#background-layers::after {
    content:'';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% 10%, transparent 0 60%, rgba(0,0,40,0.25) 61%),
                linear-gradient(to top, rgba(0,0,20,0.2), transparent 40%);
    pointer-events: none;
    transition: opacity 1s ease;
    opacity: var(--night, 0);
}

/* Shine overlay when purchasing first Ascended Royal Program */
@keyframes royal-shine-sweep {
  0% { transform: translateX(-120%) skewX(-15deg); opacity: 0; }
  20% { opacity: 0.85; }
  100% { transform: translateX(140%) skewX(-15deg); opacity: 0; }
}
.royal-shine-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 120%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 10%, rgba(255,255,210,0.65) 45%, rgba(255,255,255,0) 90%);
  filter: blur(1px);
  pointer-events: none;
  mix-blend-mode: screen;
  animation: royal-shine-sweep 1.2s ease-out forwards;
  z-index: 5;
}

/* Subtle global vignette for depth */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(120% 120% at 50% 20%, rgba(255,255,255,0) 0 60%, rgba(0,0,0,0.18) 61%),
      radial-gradient(150% 120% at 50% 105%, rgba(0,0,0,0.25), transparent 60%);
    z-index: 1;
}

/* Click feedback particles for the main bee */
.click-float {
    position: fixed;
    color: #3c2b00;
    font-weight: 900;
    font-family: "Courier New", monospace;
    pointer-events: none;
    z-index: 1000;
    text-shadow: 0 1px 0 #fff7b8, 0 0 10px rgba(255,215,0,0.6);
    animation: float-up 900ms ease-out forwards;
    will-change: transform, opacity;
}
@keyframes float-up {
    0%   { transform: translate(-50%, -10px) scale(0.9); opacity: 0; }
    12%  { opacity: 1; }
    60%  { transform: translate(-50%, -50px) scale(1.05); }
    100% { transform: translate(-50%, -80px) scale(1); opacity: 0; }
}

.click-ring {
    position: fixed;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,215,0,0.9);
    box-shadow: 0 0 12px rgba(255,215,0,0.7);
    pointer-events: none;
    z-index: 999;
    animation: ring-pop 550ms ease-out forwards;
    will-change: transform, opacity;
}
@keyframes ring-pop {
    0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 0.8; }
    60%  { opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; }
}

/* Subtle glow aura on clickable bee on hover */
#clickable-bee:hover {
    box-shadow: 0 0 0 3px rgba(255,215,0,0.4), 0 0 18px rgba(255,215,0,0.55);
}

/* Glassy panels: music menu and score tidy polish */
#music-menu,
#score-display {
    backdrop-filter: blur(5px);
}

/* Tooltip small polish */
#upgrade-tooltip {
    backdrop-filter: blur(4px);
}

/* Home button styles for PC users */
#home-button-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1002;
    pointer-events: auto;
}

.home-button {
    background-color: #FFD700;
    color: #8B4513;
    border: 3px solid #8B4513;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}

.home-button:hover {
    background-color: #FFC125;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.home-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* New styles for the upgrade containers and help buttons */
.upgrade-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 5px;
}

.help-button {
    background-color: #FFD700; /* Gold */
    color: #8B4513; /* SaddleBrown */
    border: 1px solid #8B4513;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.help-button:hover {
    background-color: #FFC125; /* Darker gold */
}

/* Mobile tweaks for environment label */
@media (max-width: 768px) {
    .gamble-button, .play-button, .home-button {
        padding: 10px 15px;
        font-size: 1em;
    }
    
    .play-button {
        top: 60px; /* Adjust position for mobile */
    }
    
    /* Stack buttons on narrow screens */
    .gamble-button { top: 140px !important; }
    .play-button { top: 190px !important; }
    /* Shop button (inline top: 120px) moved further down on mobile */
    button.gamble-button[style*="top: 120px"] { top: 240px !important; }
    
    /* Adjust minigame container for smaller screens */
    #minigame-bee-container {
        max-height: 50vh;
    }
    
    #game-content {
        flex-direction: column;
        gap: 15px;
    }
    
    #clickable-bee {
        width: 120px; /* Smaller bee for mobile */
    }
    
    #upgrade-sidebar {
        width: 100%;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .mobile-home-button{display:none;position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:300;background:#B8860B;color:#fff;border:2px solid #F0E68C;border-radius:999px;padding:14px 22px;font-weight:900;box-shadow:0 6px 18px rgba(0,0,0,0.35)}
    @media (max-width:768px){.mobile-home-button{display:block}}
}

@media (max-width: 600px) {
  #game-content { gap: 12px; padding: 12px; transform: scale(0.95); transform-origin: top center; }
  #clickable-bee { width: 96px; }
  #upgrade-sidebar { width: 92%; max-height: 55vh; }
  #score-display { font-size: 0.95em; padding: 6px 10px; }
  .gamble-button { top: 160px; }
  .play-button { top: 210px; }
}

/* Game Entrance Animation */
.game-entrance {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #FFD700, #B8860B);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fade-out 1.5s ease-out forwards;
    animation-delay: 1.5s;
    pointer-events: none;
}

.entrance-title {
    font-size: 3em;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(-50px);
    animation: title-entrance 1s ease-out forwards;
    animation-delay: 0.3s;
}

.entrance-bees-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.entrance-bee {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('/bee-poster.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    animation: bee-fly-in 1.5s forwards;
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes title-entrance {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bee-fly-in {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) scale(0.2);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translate(var(--end-x), var(--end-y)) scale(1);
    }
}

/* Gambling Button Styles */
.gamble-button {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 128, 0, 0.8); /* Green with transparency */
    color: white;
    padding: 15px 20px; /* Bigger button */
    border-radius: 8px; /* More rounded */
    font-size: 1.3em; /* Larger text */
    font-weight: bold;
    z-index: 200; /* Above everything else */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gamble-button:hover {
    background-color: rgba(0, 150, 0, 0.9); /* Darker green on hover */
}

/* Play Button Styles */
.play-button {
    position: fixed;
    top: 65px; /* Position between gamble and shop buttons */
    right: 10px;
    background-color: #00A86B; /* Bright green */
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.3em;
    font-weight: bold;
    z-index: 200; /* Above everything else */
    border: 2px solid #FFFFFF;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.play-button:hover {
    background-color: #00C985; /* Lighter green on hover */
    transform: scale(1.05);
}

/* Music Menu Styles */
#music-menu {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(139, 69, 19, 0.85); /* SaddleBrown semi-transparent */
    color: #FFD700; /* Gold */
    padding: 15px;
    border: 3px solid #DAA520; /* Goldenrod */
    border-radius: 8px;
    z-index: 200; /* Above everything else */
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Arial', sans-serif;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#music-menu.hidden {
    display: none;
}

#music-menu h3 {
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 1.1em;
    border-bottom: 1px solid #DAA520;
    padding-bottom: 5px;
}

.music-button {
    background-color: #B8860B; /* DarkGoldenrod */
    color: white;
    border: 1px solid #F0E68C; /* Khaki */
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.music-button:hover {
    background-color: #DAA520; /* Goldenrod */
}

.music-button.active {
    background-color: #DAA520; /* Goldenrod */
    border: 2px solid #FFD700; /* Gold */
}

.close-button { /* Style for modal close buttons */
    position: absolute;
    top: 5px;
    right: 5px;
    background: #8B4513;
    color: #FFD700;
    border: 1px solid #DAA520;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    padding: 0;
    font-size: 1em;
    line-height: 20px; /* Center the 'X' */
    text-align: center;
    cursor: pointer;
}

.close-button:hover {
    background: #A0522D;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.volume-control label {
    font-size: 0.9em;
}

#volume-slider {
    flex-grow: 1;
    cursor: pointer;
    height: 8px; /* Make slider a bit thicker */
    accent-color: #FFD700; /* Style the slider thumb/track */
}

/* Music controls visible now */
.music-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.music-controls-hidden {
    display: none;
}

#music-broken-message.hidden {
    display: none;
}

/* --- Rebirth Modal Styles --- */
#rebirth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500; /* Ensure it's above everything else */
}

#rebirth-modal.hidden {
    display: none;
}

#rebirth-modal .modal-content {
    background-color: #5a3a29; /* Darker SaddleBrown */
    color: #F0E68C; /* Khaki */
    border: 5px solid #FFD700; /* Gold border */
    border-radius: 10px;
    padding: 30px;
    max-width: 400px; /* Set a max width */
    width: 90%; /* Responsive width */
    max-height: 90vh; /* Limit height */
    overflow-y: auto; /* Add scroll if content overflows */
    text-align: center;
    position: relative; /* Needed for close button absolute positioning */
    display: flex; /* Flex container for layout */
    flex-direction: column;
    gap: 15px; /* Space between sections/buttons */
}

#rebirth-modal h2 {
    margin-top: 0;
    color: #FFD700; /* Gold */
}

/* Extra bee styles */
.extra-bee {
    position: absolute;
    top: 18%;
    left: 10%;
    width: 44px;
    height: auto;
    pointer-events: none;
    animation: beeFloat 4s ease-in-out infinite;
}

@keyframes beeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Mobile Support - Add at the end of the file */

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(34, 34, 34, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 2px solid #FFD700;
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-nav-btn {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}

.mobile-nav-btn:hover,
.mobile-nav-btn:active {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.mobile-nav-btn .icon {
    font-size: 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #FFD700;
    color: #222;
    border: 2px solid #222;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: #FFC125;
    transform: scale(1.1);
}

/* Mobile Home Button */
.mobile-home-button {
    display: none;
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    background: #FFD700;
    color: #222;
    border: 2px solid #222;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-home-button:hover {
    background: #FFC125;
    transform: translateX(-50%) scale(1.05);
}

/* Mobile Game Controls */
.mobile-game-controls {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999;
}

.mobile-control-btn {
    width: 60px;
    height: 60px;
    background: rgba(34, 34, 34, 0.9);
    color: #FFD700;
    border: 2px solid #FFD700;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-control-btn:hover,
.mobile-control-btn:active {
    background: rgba(255, 215, 0, 0.9);
    color: #222;
    transform: scale(1.1);
}

/* Mobile Responsive Breakpoints */
@media (max-width: 1200px) {
    .game-container {
        max-width: 90%;
        padding: 15px;
    }
    
    canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 992px) {
    .game-container {
        max-width: 95%;
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 12px;
    }
    
    .controls-bar {
        flex-direction: column;
        gap: 8px;
        margin: 6px 0 3px;
    }
    
    .controls-info {
        font-size: 0.8em;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .difficulty-label {
        font-size: 0.8em;
    }
    
    .difficulty-select {
        padding: 3px 6px;
        font-size: 0.9em;
    }
    
    .music-controls {
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
    }
    
    .music-control-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    #music-volume {
        width: 80px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding: 10px;
    }
    
    .game-container {
        width: 95%;
        padding: 10px;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.6em;
        margin-bottom: 10px;
    }
    
    #score {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    #message {
        font-size: 0.9em;
        min-height: 1.3em;
        margin-bottom: 8px;
    }
    
    .controls-bar {
        flex-direction: column;
        gap: 6px;
        margin: 5px 0 2px;
    }
    
    .controls-info {
        font-size: 0.75em;
        margin-bottom: 3px;
    }
    
    .difficulty-label {
        font-size: 0.75em;
    }
    
    .difficulty-select {
        padding: 2px 5px;
        font-size: 0.8em;
    }
    
    button, .home-button {
        padding: 8px 16px;
        font-size: 0.9em;
        border-radius: 4px;
        margin-top: 8px;
    }
    
    .music-controls {
        flex-direction: column;
        gap: 6px;
        margin-top: 6px;
    }
    
    .music-control-btn {
        padding: 5px 8px;
        font-size: 0.75em;
        border-radius: 4px;
    }
    
    #music-volume {
        width: 70px;
    }
    
    #boss-message-overlay {
        width: 90%;
        padding: 20px;
        border-radius: 8px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
    
    .boss-message-text {
        font-size: 1em;
        margin-bottom: 15px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 15px;
    }
    
    #upgrade-title {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
    
    #upgrade-options {
        width: 90%;
        max-width: 350px;
        gap: 12px;
    }
    
    .upgrade-button-pong {
        padding: 10px 16px;
        font-size: 0.9em;
        border-radius: 6px;
    }
    
    .upgrade-button-pong strong {
        font-size: 1em;
        margin-bottom: 4px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.8em;
    }
    
    #opponent-upgrades-list li {
        padding: 6px 10px;
        border-radius: 4px;
        margin-bottom: 6px;
        font-size: 0.9em;
    }
    
    #boss-hp-container {
        width: 70%;
        max-width: 350px;
        padding: 4px;
        border-radius: 4px;
    }
    
    #boss-hp-text {
        font-size: 0.8em;
        margin-bottom: 3px;
    }
    
    #boss-hp-bar-outer {
        height: 12px;
        border-radius: 2px;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .mobile-home-button {
        display: block;
    }
    
    .mobile-game-controls {
        display: block;
    }
    
    /* Hide desktop controls on mobile */
    .controls-bar {
        display: none;
    }
    
    .music-controls {
        display: none;
    }
}

@media (max-width: 600px) {
    .game-container {
        width: 98%;
        padding: 8px;
        border-radius: 6px;
    }
    
    h1 {
        font-size: 1.4em;
        margin-bottom: 8px;
    }
    
    #score {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
    
    #message {
        font-size: 0.8em;
        min-height: 1.2em;
        margin-bottom: 6px;
    }
    
    button, .home-button {
        padding: 6px 12px;
        font-size: 0.8em;
        border-radius: 3px;
        margin-top: 6px;
    }
    
    #boss-message-overlay {
        width: 95%;
        padding: 15px;
        border-radius: 6px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    .boss-message-text {
        font-size: 0.9em;
        margin-bottom: 12px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 12px;
    }
    
    #upgrade-title {
        font-size: 1.4em;
        margin-bottom: 12px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    #upgrade-options {
        width: 95%;
        max-width: 300px;
        gap: 10px;
    }
    
    .upgrade-button-pong {
        padding: 8px 14px;
        font-size: 0.8em;
        border-radius: 5px;
    }
    
    .upgrade-button-pong strong {
        font-size: 0.9em;
        margin-bottom: 3px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.75em;
    }
    
    #opponent-upgrades-list li {
        padding: 5px 8px;
        border-radius: 3px;
        margin-bottom: 5px;
        font-size: 0.8em;
    }
    
    #boss-hp-container {
        width: 80%;
        max-width: 300px;
        padding: 3px;
        border-radius: 3px;
    }
    
    #boss-hp-text {
        font-size: 0.75em;
        margin-bottom: 2px;
    }
    
    #boss-hp-bar-outer {
        height: 10px;
        border-radius: 2px;
    }
    
    .mobile-nav-buttons {
        max-width: 300px;
    }
    
    .mobile-nav-btn {
        font-size: 11px;
        padding: 6px;
        min-width: 50px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 18px;
    }
    
    .mobile-control-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .mobile-home-button {
        padding: 12px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .game-container {
        width: 100%;
        padding: 6px;
        border-radius: 4px;
    }
    
    h1 {
        font-size: 1.2em;
        margin-bottom: 6px;
    }
    
    #score {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    #message {
        font-size: 0.7em;
        min-height: 1.1em;
        margin-bottom: 4px;
    }
    
    button, .home-button {
        padding: 5px 10px;
        font-size: 0.7em;
        border-radius: 2px;
        margin-top: 4px;
    }
    
    #boss-message-overlay {
        width: 98%;
        padding: 12px;
        border-radius: 4px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    
    .boss-message-text {
        font-size: 0.8em;
        margin-bottom: 10px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 10px;
    }
    
    #upgrade-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    #upgrade-options {
        width: 98%;
        max-width: 250px;
        gap: 8px;
    }
    
    .upgrade-button-pong {
        padding: 6px 12px;
        font-size: 0.75em;
        border-radius: 4px;
    }
    
    .upgrade-button-pong strong {
        font-size: 0.8em;
        margin-bottom: 2px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.7em;
    }
    
    #opponent-upgrades-list li {
        padding: 4px 6px;
        border-radius: 2px;
        margin-bottom: 4px;
        font-size: 0.75em;
    }
    
    #boss-hp-container {
        width: 85%;
        max-width: 250px;
        padding: 2px;
        border-radius: 2px;
    }
    
    #boss-hp-text {
        font-size: 0.7em;
        margin-bottom: 1px;
    }
    
    #boss-hp-bar-outer {
        height: 8px;
        border-radius: 1px;
    }
    
    .mobile-nav-buttons {
        max-width: 280px;
    }
    
    .mobile-nav-btn {
        font-size: 10px;
        padding: 5px;
        min-width: 45px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 16px;
    }
    
    .mobile-control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
        right: 15px;
    }
    
    .mobile-home-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .game-container {
        width: 100%;
        padding: 4px;
        border-radius: 3px;
    }
    
    h1 {
        font-size: 1.1em;
        margin-bottom: 5px;
    }
    
    #score {
        font-size: 0.75em;
        margin-bottom: 3px;
    }
    
    #message {
        font-size: 0.65em;
        min-height: 1em;
        margin-bottom: 3px;
    }
    
    button, .home-button {
        padding: 4px 8px;
        font-size: 0.65em;
        border-radius: 2px;
        margin-top: 3px;
    }
    
    #boss-message-overlay {
        width: 99%;
        padding: 10px;
        border-radius: 3px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .boss-message-text {
        font-size: 0.75em;
        margin-bottom: 8px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 8px;
    }
    
    #upgrade-title {
        font-size: 1.2em;
        margin-bottom: 8px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    #upgrade-options {
        width: 99%;
        max-width: 200px;
        gap: 6px;
    }
    
    .upgrade-button-pong {
        padding: 4px 10px;
        font-size: 0.7em;
        border-radius: 3px;
    }
    
    .upgrade-button-pong strong {
        font-size: 0.75em;
        margin-bottom: 2px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.65em;
    }
    
    #opponent-upgrades-list li {
        padding: 3px 5px;
        border-radius: 2px;
        margin-bottom: 3px;
        font-size: 0.7em;
    }
    
    #boss-hp-container {
        width: 90%;
        max-width: 200px;
        padding: 2px;
        border-radius: 2px;
    }
    
    #boss-hp-text {
        font-size: 0.65em;
        margin-bottom: 1px;
    }
    
    #boss-hp-bar-outer {
        height: 6px;
        border-radius: 1px;
    }
    
    .mobile-nav-buttons {
        max-width: 260px;
    }
    
    .mobile-nav-btn {
        font-size: 9px;
        padding: 4px;
        min-width: 40px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 14px;
    }
    
    .mobile-control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        right: 12px;
    }
    
    .mobile-home-button {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    button:hover,
    .home-button:hover {
        background-color: #B8860B;
        transform: none;
    }
    
    button:active,
    .home-button:active {
        background-color: #DAA520;
        transform: scale(0.95);
    }
    
    .upgrade-button-pong:hover {
        background-color: #B8860B;
        transform: none;
    }
    
    .upgrade-button-pong:active {
        background-color: #DAA520;
        transform: scale(0.95);
    }
    
    .music-control-btn:hover {
        background-color: #B8860B;
    }
    
    .music-control-btn:active {
        background-color: #DAA520;
        transform: scale(0.95);
    }
    
    .mobile-nav-btn:hover,
    .mobile-control-btn:hover {
        transform: none;
    }
    
    .mobile-nav-btn:active,
    .mobile-control-btn:active {
        transform: scale(1.05);
    }
    
    .mobile-home-button:hover {
        transform: translateX(-50%);
    }
    
    .mobile-home-button:active {
        transform: translateX(-50%) scale(0.95);
    }
}

/* Mobile landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-nav {
        bottom: 5px;
        padding: 5px 0;
    }
    
    .mobile-nav-btn {
        padding: 4px;
        font-size: 10px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 16px;
    }
    
    .mobile-home-button {
        bottom: 10px;
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .mobile-game-controls {
        bottom: 80px;
        right: 15px;
    }
    
    .mobile-control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin: 5px 0;
    }
    
    .game-container {
        padding: 8px;
        margin: 3px;
    }
    
    h1 {
        font-size: 1.3em;
        margin-bottom: 6px;
    }
    
    #score {
        font-size: 0.8em;
        margin-bottom: 3px;
    }
    
    #message {
        font-size: 0.7em;
        margin-bottom: 3px;
    }
    
    button, .home-button {
        padding: 4px 8px;
        font-size: 0.7em;
        margin-top: 3px;
    }
}

/* Mobile accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .upgrade-button-pong {
        transition: none;
    }
    
    .upgrade-button-pong:hover {
        transform: none;
    }
    
    .mobile-nav-btn:hover,
    .mobile-control-btn:hover {
        transform: none;
    }
    
    .mobile-home-button:hover {
        transform: translateX(-50%);
    }
}

/* Mobile dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-nav {
        background: rgba(0, 0, 0, 0.95);
        border-top-color: #FFD700;
    }
    
    .mobile-nav-btn {
        color: #FFD700;
    }
    
    .mobile-nav-btn:hover,
    .mobile-nav-btn:active {
        background: rgba(255, 215, 0, 0.3);
    }
    
    .mobile-menu-toggle {
        background: #FFD700;
        color: #000;
        border-color: #000;
    }
    
    .mobile-menu-toggle:hover {
        background: #FFC125;
    }
}

/* Mobile high contrast mode */
@media (prefers-contrast: high) {
    .mobile-nav {
        background: #000;
        border-top-color: #fff;
    }
    
    .mobile-nav-btn {
        color: #fff;
        border: 1px solid #fff;
    }
    
    .mobile-nav-btn:hover,
    .mobile-nav-btn:active {
        background: #fff;
        color: #000;
    }
    
    .mobile-control-btn {
        background: #000;
        color: #fff;
        border-color: #fff;
    }
    
    .mobile-control-btn:hover,
    .mobile-control-btn:active {
        background: #fff;
        color: #000;
    }
}

/* Omen dialogue */
.omen-dialogue{position:fixed;bottom:8vh;left:50%;transform:translateX(-50%);max-width:min(800px,90vw);background:rgba(0,0,0,0.8);border:2px solid #FFD700;border-radius:10px;padding:14px 16px;color:#ffec8b;font-family:monospace;z-index:3003;box-shadow:0 10px 30px rgba(0,0,0,0.6)}

/* New styles for the upgrade containers and help buttons */
.upgrade-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 5px;
}

.help-button {
    background-color: #FFD700; /* Gold */
    color: #8B4513; /* SaddleBrown */
    border: 1px solid #8B4513;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.help-button:hover {
    background-color: #FFC125; /* Darker gold */
}

/* Mobile tweaks for environment label */
@media (max-width: 768px) {
    .gamble-button, .play-button, .home-button {
        padding: 10px 15px;
        font-size: 1em;
    }
    
    .play-button {
        top: 60px; /* Adjust position for mobile */
    }
    
    /* Stack buttons on narrow screens */
    .gamble-button { top: 140px !important; }
    .play-button { top: 190px !important; }
    /* Shop button (inline top: 120px) moved further down on mobile */
    button.gamble-button[style*="top: 120px"] { top: 240px !important; }
    
    /* Adjust minigame container for smaller screens */
    #minigame-bee-container {
        max-height: 50vh;
    }
    
    #game-content {
        flex-direction: column;
        gap: 15px;
    }
    
    #clickable-bee {
        width: 120px; /* Smaller bee for mobile */
    }
    
    #upgrade-sidebar {
        width: 100%;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .mobile-home-button{display:none;position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:300;background:#B8860B;color:#fff;border:2px solid #F0E68C;border-radius:999px;padding:14px 22px;font-weight:900;box-shadow:0 6px 18px rgba(0,0,0,0.35)}
    @media (max-width:768px){.mobile-home-button{display:block}}
}

@media (max-width: 600px) {
  #game-content { gap: 12px; padding: 12px; transform: scale(0.95); transform-origin: top center; }
  #clickable-bee { width: 96px; }
  #upgrade-sidebar { width: 92%; max-height: 55vh; }
  #score-display { font-size: 0.95em; padding: 6px 10px; }
  .gamble-button { top: 160px; }
  .play-button { top: 210px; }
}

/* Game Entrance Animation */
.game-entrance {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #FFD700, #B8860B);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fade-out 1.5s ease-out forwards;
    animation-delay: 1.5s;
    pointer-events: none;
}

.entrance-title {
    font-size: 3em;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(-50px);
    animation: title-entrance 1s ease-out forwards;
    animation-delay: 0.3s;
}

.entrance-bees-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.entrance-bee {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('/bee-poster.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    animation: bee-fly-in 1.5s forwards;
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes title-entrance {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bee-fly-in {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) scale(0.2);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translate(var(--end-x), var(--end-y)) scale(1);
    }
}

/* Gambling Button Styles */
.gamble-button {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 128, 0, 0.8); /* Green with transparency */
    color: white;
    padding: 15px 20px; /* Bigger button */
    border-radius: 8px; /* More rounded */
    font-size: 1.3em; /* Larger text */
    font-weight: bold;
    z-index: 200; /* Above everything else */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gamble-button:hover {
    background-color: rgba(0, 150, 0, 0.9); /* Darker green on hover */
}

/* Play Button Styles */
.play-button {
    position: fixed;
    top: 65px; /* Position between gamble and shop buttons */
    right: 10px;
    background-color: #00A86B; /* Bright green */
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.3em;
    font-weight: bold;
    z-index: 200; /* Above everything else */
    border: 2px solid #FFFFFF;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.play-button:hover {
    background-color: #00C985; /* Lighter green on hover */
    transform: scale(1.05);
}

/* Music Menu Styles */
#music-menu {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(139, 69, 19, 0.85); /* SaddleBrown semi-transparent */
    color: #FFD700; /* Gold */
    padding: 15px;
    border: 3px solid #DAA520; /* Goldenrod */
    border-radius: 8px;
    z-index: 200; /* Above everything else */
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Arial', sans-serif;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#music-menu.hidden {
    display: none;
}

#music-menu h3 {
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 1.1em;
    border-bottom: 1px solid #DAA520;
    padding-bottom: 5px;
}

.music-button {
    background-color: #B8860B; /* DarkGoldenrod */
    color: white;
    border: 1px solid #F0E68C; /* Khaki */
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.music-button:hover {
    background-color: #DAA520; /* Goldenrod */
}

.music-button.active {
    background-color: #DAA520; /* Goldenrod */
    border: 2px solid #FFD700; /* Gold */
}

.close-button { /* Style for modal close buttons */
    position: absolute;
    top: 5px;
    right: 5px;
    background: #8B4513;
    color: #FFD700;
    border: 1px solid #DAA520;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    padding: 0;
    font-size: 1em;
    line-height: 20px; /* Center the 'X' */
    text-align: center;
    cursor: pointer;
}

.close-button:hover {
    background: #A0522D;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.volume-control label {
    font-size: 0.9em;
}

#volume-slider {
    flex-grow: 1;
    cursor: pointer;
    height: 8px; /* Make slider a bit thicker */
    accent-color: #FFD700; /* Style the slider thumb/track */
}

/* Music controls visible now */
.music-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.music-controls-hidden {
    display: none;
}

#music-broken-message.hidden {
    display: none;
}

/* --- Rebirth Modal Styles --- */
#rebirth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500; /* Ensure it's above everything else */
}

#rebirth-modal.hidden {
    display: none;
}

#rebirth-modal .modal-content {
    background-color: #5a3a29; /* Darker SaddleBrown */
    color: #F0E68C; /* Khaki */
    border: 5px solid #FFD700; /* Gold border */
    border-radius: 10px;
    padding: 30px;
    max-width: 400px; /* Set a max width */
    width: 90%; /* Responsive width */
    max-height: 90vh; /* Limit height */
    overflow-y: auto; /* Add scroll if content overflows */
    text-align: center;
    position: relative; /* Needed for close button absolute positioning */
    display: flex; /* Flex container for layout */
    flex-direction: column;
    gap: 15px; /* Space between sections/buttons */
}

#rebirth-modal h2 {
    margin-top: 0;
    color: #FFD700; /* Gold */
}

/* Extra bee styles */
.extra-bee {
    position: absolute;
    top: 18%;
    left: 10%;
    width: 44px;
    height: auto;
    pointer-events: none;
    animation: beeFloat 4s ease-in-out infinite;
}

@keyframes beeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Mobile Support - Add at the end of the file */

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(34, 34, 34, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 2px solid #FFD700;
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-nav-btn {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}

.mobile-nav-btn:hover,
.mobile-nav-btn:active {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.mobile-nav-btn .icon {
    font-size: 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #FFD700;
    color: #222;
    border: 2px solid #222;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: #FFC125;
    transform: scale(1.1);
}

/* Mobile Home Button */
.mobile-home-button {
    display: none;
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    background: #FFD700;
    color: #222;
    border: 2px solid #222;
    border-radius: 999px;
    padding: 14px 22px;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-home-button:hover {
    background: #FFC125;
    transform: translateX(-50%) scale(1.05);
}

/* Mobile Game Controls */
.mobile-game-controls {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 999;
}

.mobile-control-btn {
    width: 60px;
    height: 60px;
    background: rgba(34, 34, 34, 0.9);
    color: #FFD700;
    border: 2px solid #FFD700;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-control-btn:hover,
.mobile-control-btn:active {
    background: rgba(255, 215, 0, 0.9);
    color: #222;
    transform: scale(1.1);
}

/* Mobile Responsive Breakpoints */
@media (max-width: 1200px) {
    .game-container {
        max-width: 90%;
        padding: 15px;
    }
    
    canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 992px) {
    .game-container {
        max-width: 95%;
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 12px;
    }
    
    .controls-bar {
        flex-direction: column;
        gap: 8px;
        margin: 6px 0 3px;
    }
    
    .controls-info {
        font-size: 0.8em;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .difficulty-label {
        font-size: 0.8em;
    }
    
    .difficulty-select {
        padding: 3px 6px;
        font-size: 0.9em;
    }
    
    .music-controls {
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
    }
    
    .music-control-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    #music-volume {
        width: 80px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding: 10px;
    }
    
    .game-container {
        width: 95%;
        padding: 10px;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.6em;
        margin-bottom: 10px;
    }
    
    #score {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    #message {
        font-size: 0.9em;
        min-height: 1.3em;
        margin-bottom: 8px;
    }
    
    .controls-bar {
        flex-direction: column;
        gap: 6px;
        margin: 5px 0 2px;
    }
    
    .controls-info {
        font-size: 0.75em;
        margin-bottom: 3px;
    }
    
    .difficulty-label {
        font-size: 0.75em;
    }
    
    .difficulty-select {
        padding: 2px 5px;
        font-size: 0.8em;
    }
    
    button, .home-button {
        padding: 8px 16px;
        font-size: 0.9em;
        border-radius: 4px;
        margin-top: 8px;
    }
    
    .music-controls {
        flex-direction: column;
        gap: 6px;
        margin-top: 6px;
    }
    
    .music-control-btn {
        padding: 5px 8px;
        font-size: 0.75em;
        border-radius: 4px;
    }
    
    #music-volume {
        width: 70px;
    }
    
    #boss-message-overlay {
        width: 90%;
        padding: 20px;
        border-radius: 8px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
    
    .boss-message-text {
        font-size: 1em;
        margin-bottom: 15px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 15px;
    }
    
    #upgrade-title {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
    
    #upgrade-options {
        width: 90%;
        max-width: 350px;
        gap: 12px;
    }
    
    .upgrade-button-pong {
        padding: 10px 16px;
        font-size: 0.9em;
        border-radius: 6px;
    }
    
    .upgrade-button-pong strong {
        font-size: 1em;
        margin-bottom: 4px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.8em;
    }
    
    #opponent-upgrades-list li {
        padding: 6px 10px;
        border-radius: 4px;
        margin-bottom: 6px;
        font-size: 0.9em;
    }
    
    #boss-hp-container {
        width: 70%;
        max-width: 350px;
        padding: 4px;
        border-radius: 4px;
    }
    
    #boss-hp-text {
        font-size: 0.8em;
        margin-bottom: 3px;
    }
    
    #boss-hp-bar-outer {
        height: 12px;
        border-radius: 2px;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .mobile-home-button {
        display: block;
    }
    
    .mobile-game-controls {
        display: block;
    }
    
    /* Hide desktop controls on mobile */
    .controls-bar {
        display: none;
    }
    
    .music-controls {
        display: none;
    }
}

@media (max-width: 600px) {
    .game-container {
        width: 98%;
        padding: 8px;
        border-radius: 6px;
    }
    
    h1 {
        font-size: 1.4em;
        margin-bottom: 8px;
    }
    
    #score {
        font-size: 0.9em;
        margin-bottom: 6px;
    }
    
    #message {
        font-size: 0.8em;
        min-height: 1.2em;
        margin-bottom: 6px;
    }
    
    button, .home-button {
        padding: 6px 12px;
        font-size: 0.8em;
        border-radius: 3px;
        margin-top: 6px;
    }
    
    #boss-message-overlay {
        width: 95%;
        padding: 15px;
        border-radius: 6px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    .boss-message-text {
        font-size: 0.9em;
        margin-bottom: 12px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 12px;
    }
    
    #upgrade-title {
        font-size: 1.4em;
        margin-bottom: 12px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    #upgrade-options {
        width: 95%;
        max-width: 300px;
        gap: 10px;
    }
    
    .upgrade-button-pong {
        padding: 8px 14px;
        font-size: 0.8em;
        border-radius: 5px;
    }
    
    .upgrade-button-pong strong {
        font-size: 0.9em;
        margin-bottom: 3px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.75em;
    }
    
    #opponent-upgrades-list li {
        padding: 5px 8px;
        border-radius: 3px;
        margin-bottom: 5px;
        font-size: 0.8em;
    }
    
    #boss-hp-container {
        width: 80%;
        max-width: 300px;
        padding: 3px;
        border-radius: 3px;
    }
    
    #boss-hp-text {
        font-size: 0.75em;
        margin-bottom: 2px;
    }
    
    #boss-hp-bar-outer {
        height: 10px;
        border-radius: 2px;
    }
    
    .mobile-nav-buttons {
        max-width: 300px;
    }
    
    .mobile-nav-btn {
        font-size: 11px;
        padding: 6px;
        min-width: 50px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 18px;
    }
    
    .mobile-control-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .mobile-home-button {
        padding: 12px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .game-container {
        width: 100%;
        padding: 6px;
        border-radius: 4px;
    }
    
    h1 {
        font-size: 1.2em;
        margin-bottom: 6px;
    }
    
    #score {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    #message {
        font-size: 0.7em;
        min-height: 1.1em;
        margin-bottom: 4px;
    }
    
    button, .home-button {
        padding: 5px 10px;
        font-size: 0.7em;
        border-radius: 2px;
        margin-top: 4px;
    }
    
    #boss-message-overlay {
        width: 98%;
        padding: 12px;
        border-radius: 4px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    
    .boss-message-text {
        font-size: 0.8em;
        margin-bottom: 10px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 10px;
    }
    
    #upgrade-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    #upgrade-options {
        width: 98%;
        max-width: 250px;
        gap: 8px;
    }
    
    .upgrade-button-pong {
        padding: 6px 12px;
        font-size: 0.75em;
        border-radius: 4px;
    }
    
    .upgrade-button-pong strong {
        font-size: 0.8em;
        margin-bottom: 2px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.7em;
    }
    
    #opponent-upgrades-list li {
        padding: 4px 6px;
        border-radius: 2px;
        margin-bottom: 4px;
        font-size: 0.75em;
    }
    
    #boss-hp-container {
        width: 85%;
        max-width: 250px;
        padding: 2px;
        border-radius: 2px;
    }
    
    #boss-hp-text {
        font-size: 0.7em;
        margin-bottom: 1px;
    }
    
    #boss-hp-bar-outer {
        height: 8px;
        border-radius: 1px;
    }
    
    .mobile-nav-buttons {
        max-width: 280px;
    }
    
    .mobile-nav-btn {
        font-size: 10px;
        padding: 5px;
        min-width: 45px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 16px;
    }
    
    .mobile-control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
        right: 15px;
    }
    
    .mobile-home-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .game-container {
        width: 100%;
        padding: 4px;
        border-radius: 3px;
    }
    
    h1 {
        font-size: 1.1em;
        margin-bottom: 5px;
    }
    
    #score {
        font-size: 0.75em;
        margin-bottom: 3px;
    }
    
    #message {
        font-size: 0.65em;
        min-height: 1em;
        margin-bottom: 3px;
    }
    
    button, .home-button {
        padding: 4px 8px;
        font-size: 0.65em;
        border-radius: 2px;
        margin-top: 3px;
    }
    
    #boss-message-overlay {
        width: 99%;
        padding: 10px;
        border-radius: 3px;
    }
    
    #boss-message-overlay h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .boss-message-text {
        font-size: 0.75em;
        margin-bottom: 8px;
    }
    
    #upgrade-selection-overlay,
    #opponent-upgrade-log {
        padding: 8px;
    }
    
    #upgrade-title {
        font-size: 1.2em;
        margin-bottom: 8px;
    }
    
    #opponent-upgrade-log h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    #upgrade-options {
        width: 99%;
        max-width: 200px;
        gap: 6px;
    }
    
    .upgrade-button-pong {
        padding: 4px 10px;
        font-size: 0.7em;
        border-radius: 3px;
    }
    
    .upgrade-button-pong strong {
        font-size: 0.75em;
        margin-bottom: 2px;
    }
    
    .upgrade-button-pong span {
        font-size: 0.65em;
    }
    
    #opponent-upgrades-list li {
        padding: 3px 5px;
        border-radius: 2px;
        margin-bottom: 3px;
        font-size: 0.7em;
    }
    
    #boss-hp-container {
        width: 90%;
        max-width: 200px;
        padding: 2px;
        border-radius: 2px;
    }
    
    #boss-hp-text {
        font-size: 0.65em;
        margin-bottom: 1px;
    }
    
    #boss-hp-bar-outer {
        height: 6px;
        border-radius: 1px;
    }
    
    .mobile-nav-buttons {
        max-width: 260px;
    }
    
    .mobile-nav-btn {
        font-size: 9px;
        padding: 4px;
        min-width: 40px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 14px;
    }
    
    .mobile-control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        right: 12px;
    }
    
    .mobile-home-button {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    button:hover,
    .home-button:hover {
        background-color: #B8860B;
        transform: none;
    }
    
    button:active,
    .home-button:active {
        background-color: #DAA520;
        transform: scale(0.95);
    }
    
    .upgrade-button-pong:hover {
        background-color: #B8860B;
        transform: none;
    }
    
    .upgrade-button-pong:active {
        background-color: #DAA520;
        transform: scale(0.95);
    }
    
    .music-control-btn:hover {
        background-color: #B8860B;
    }
    
    .music-control-btn:active {
        background-color: #DAA520;
        transform: scale(0.95);
    }
    
    .mobile-nav-btn:hover,
    .mobile-control-btn:hover {
        transform: none;
    }
    
    .mobile-nav-btn:active,
    .mobile-control-btn:active {
        transform: scale(1.05);
    }
    
    .mobile-home-button:hover {
        transform: translateX(-50%);
    }
    
    .mobile-home-button:active {
        transform: translateX(-50%) scale(0.95);
    }
}

/* Mobile landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-nav {
        bottom: 5px;
        padding: 5px 0;
    }
    
    .mobile-nav-btn {
        padding: 4px;
        font-size: 10px;
    }
    
    .mobile-nav-btn .icon {
        font-size: 16px;
    }
    
    .mobile-home-button {
        bottom: 10px;
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .mobile-game-controls {
        bottom: 80px;
        right: 15px;
    }
    
    .mobile-control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin: 5px 0;
    }
    
    .game-container {
        padding: 8px;
        margin: 3px;
    }
    
    h1 {
        font-size: 1.3em;
        margin-bottom: 6px;
    }
    
    #score {
        font-size: 0.8em;
        margin-bottom: 3px;
    }
    
    #message {
        font-size: 0.7em;
        margin-bottom: 3px;
    }
    
    button, .home-button {
        padding: 4px 8px;
        font-size: 0.7em;
        margin-top: 3px;
    }
}

/* Mobile accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .upgrade-button-pong {
        transition: none;
    }
    
    .upgrade-button-pong:hover {
        transform: none;
    }
    
    .mobile-nav-btn:hover,
    .mobile-control-btn:hover {
        transform: none;
    }
    
    .mobile-home-button:hover {
        transform: translateX(-50%);
    }
}

/* Mobile dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-nav {
        background: rgba(0, 0, 0, 0.95);
        border-top-color: #FFD700;
    }
    
    .mobile-nav-btn {
        color: #FFD700;
    }
    
    .mobile-nav-btn:hover,
    .mobile-nav-btn:active {
        background: rgba(255, 215, 0, 0.3);
    }
    
    .mobile-menu-toggle {
        background: #FFD700;
        color: #000;
        border-color: #000;
    }
    
    .mobile-menu-toggle:hover {
        background: #FFC125;
    }
}

/* Mobile high contrast mode */
@media (prefers-contrast: high) {
    .mobile-nav {
        background: #000;
        border-top-color: #fff;
    }
    
    .mobile-nav-btn {
        color: #fff;
        border: 1px solid #fff;
    }
    
    .mobile-nav-btn:hover,
    .mobile-nav-btn:active {
        background: #fff;
        color: #000;
    }
    
    .mobile-control-btn {
        background: #000;
        color: #fff;
        border-color: #fff;
    }
    
    .mobile-control-btn:hover,
    .mobile-control-btn:active {
        background: #fff;
        color: #000;
    }
}