/* Pickle Clicker Game Styles */
/* Extracted from inline HTML for better maintainability */

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

body {
    font-family: 'Press Start 2P', monospace;
    color: #05df72;
    overflow-x: hidden;
    height: 100vh;
    position: relative;
    /* Remove static background images - using dynamic synthwave background */
    /* Prevent mobile zoom on rapid tapping */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Synthwave Background Styles */
:root {
    /* Synthwave color variables */
    --sky-top: #07102f;
    --sky-mid: #7c1d1dd2;
    --sky-hot: #ff7a18;
    --horizon: #ffb24a;

    --sun-size: min(42vmin, 520px);
    --sun-x: 50%;
    --sun-y: 52%;

    --floor-height: 58vh;
    --perspective: 520px;
    --tilt: 85deg;
    --vanish-y: 0%;

    --grid-color: rgba(92, 195, 255, 0.65);
    --grid-color-soft: rgba(92, 195, 255, 0.35);
    --grid-bg: #09061b;

    --v-gap: 30px;
    --h-gap: 50px;
    --v-line: 2px;
    --h-line: 2px;
    --glow: 0 0 18px rgba(92,195,255,.25), 0 0 36px rgba(92,195,255,.18);
}

.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    isolation: isolate;
}

.sky {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 700px at 50% 60%,
            rgba(255, 160, 60, 0.28) 0%,
            rgba(255, 160, 60, 0.12) 40%,
            rgba(255, 160, 60, 0.00) 70%),
        linear-gradient(to bottom,
            var(--sky-top) 0%,
            #0a1a45 28%,
            var(--sky-mid) 52%,
            #2f264a 66%,
            #4a2844 76%,
            var(--sky-hot) 88%,
            var(--horizon) 100%);
    filter: saturate(1.08);
}

.sky::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.85) 0, rgba(255,255,255,0) 60%),
        radial-gradient(2px 2px at 16% 10%, rgba(255,255,255,0.75) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 24% 32%, rgba(255,255,255,0.75) 0, rgba(255,255,255,0) 60%),
        radial-gradient(2px 2px at 28% 22%, rgba(255,255,255,0.6) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 38% 14%, rgba(255,255,255,0.8) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1.5px 1.5px at 46% 8%, rgba(255,255,255,0.7) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 52% 26%, rgba(255,255,255,0.7) 0, rgba(255,255,255,0) 60%),
        radial-gradient(2px 2px at 60% 12%, rgba(255,255,255,0.65) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 66% 20%, rgba(255,255,255,0.85) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 74% 34%, rgba(255,255,255,0.75) 0, rgba(255,255,255,0) 60%),
        radial-gradient(2px 2px at 78% 16%, rgba(255,255,255,0.6) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 86% 22%, rgba(255,255,255,0.8) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 18% 48%, rgba(255,255,255,0.7) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1.5px 1.5px at 32% 52%, rgba(255,255,255,0.65) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 44% 46%, rgba(255,255,255,0.8) 0, rgba(255,255,255,0) 60%),
        radial-gradient(2px 2px at 52% 56%, rgba(255,255,255,0.6) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 58% 52%, rgba(255,255,255,0.75) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 72% 48%, rgba(255,255,255,0.7) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1.5px 1.5px at 76% 58%, rgba(255,255,255,0.65) 0, rgba(255,255,255,0) 60%),
        radial-gradient(1px 1px at 82% 58%, rgba(255,255,255,0.8) 0, rgba(255,255,255,0) 60%);
    opacity: 0.8;
    pointer-events: none;
}

.sun {
    position: absolute;
    width: var(--sun-size);
    height: var(--sun-size);
    left: var(--sun-x);
    top: var(--sun-y);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 28%,
            rgba(255, 255, 255, 0.35) 0%,
            rgba(255, 255, 255, 0.0) 55%),
        linear-gradient(to bottom,
            #fffad1 0%,
            #ffe876 28%,
            #ff524c 52%,
            #fc1601 66%,
            #9a1f6a 66%,
            #9a1f6a 100%);
    box-shadow:
        0 0 55px rgba(255, 180, 90, 0.35),
        0 0 120px rgba(255, 50, 160, 0.22);
    filter: saturate(1.05);
    z-index: 1;
}

.sun::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0,0,0,0.00) 0px,
            rgba(0,0,0,0.00) 18px,
            rgba(0,0,0,0.18) 18px,
            rgba(0,0,0,0.18) 28px
        );
    opacity: .55;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 40%, rgba(0,0,0,1) 100%);
}

.sun::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10%;
    width: 70%;
    height: 28%;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(255,255,255,.9), rgba(255,255,255,0));
    filter: blur(8px);
    opacity: .55;
}

.floor-wrap {
    position: absolute;
    left: 0;
    right: 0;
    top: 52%;
    bottom: -20vh; /* Extend well beyond viewport to ensure grid reaches bottom edge */
    z-index: 3;
    pointer-events: none;
}

.floor {
    position: absolute;
    inset: 0;
    transform-origin: 50% var(--vanish-y);
    transform: perspective(var(--perspective)) rotateX(var(--tilt));
    background: linear-gradient(to bottom, rgba(0,0,0,0.0), rgba(0,0,0,0.22) 30%, rgba(0,0,0,0.45) 100%),
                var(--grid-bg);
    box-shadow: inset 0 25px 80px rgba(0,0,0,0.55);
}

.gridH, .gridV {
    position: absolute;
    inset: 0;
    transform-origin: 50% var(--vanish-y);
    transform: perspective(var(--perspective)) rotateX(var(--tilt));
    filter: drop-shadow(var(--glow));
    opacity: .95;
}

.gridH {
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0 calc(var(--h-gap) - var(--h-line)),
            var(--grid-color-soft) calc(var(--h-gap) - var(--h-line)) var(--h-gap)
        );
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.9) 18%, rgba(0,0,0,1) 100%);
}

.gridV {
    background:
        repeating-linear-gradient(
            to right,
            transparent 0 calc(var(--v-gap) - var(--v-line)),
            var(--grid-color) calc(var(--v-gap) - var(--v-line)) var(--v-gap)
        );
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.9) 18%, rgba(0,0,0,1) 100%);
}

.floor-glow {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 70vw;
    height: 28vh;
    transform: translateX(-50%);
    background:
        radial-gradient(closest-side at 50% 0%,
            rgba(255, 120, 190, 0.40) 0%,
            rgba(255, 120, 190, 0.12) 45%,
            rgba(0,0,0,0) 75%);
    filter: blur(10px);
    opacity: .85;
    z-index: 2;
    pointer-events: none;
}

.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% 45%,
        rgba(0,0,0,0) 30%,
        rgba(0,0,0,0.25) 65%,
        rgba(0,0,0,0.60) 100%);
    z-index: 5;
    pointer-events: none;
}

.scene.is-animating .gridV {
    animation: grid-drift 2.4s linear infinite;
    will-change: background-position;
}

@keyframes grid-drift {
    from { background-position: 0 0; }
    to { background-position: calc(var(--v-gap) * -1) 0; }
}

/* Mobile background - remove old background images */
@media (max-width: 768px) {
    body {
        /* Synthwave background works on all devices */
    }
}

/* Prevent mobile zoom and selection on all interactive elements */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button, .pickle-main, .collection-button, .gold-pot-button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100vh;
    padding: 10px;
    position: relative;
    overflow: hidden;
    z-index: 10; /* Ensure game content appears above synthwave background */
}

.header {
    text-align: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.header h1 {
    font-size: 28px;
    color: #00ff00;
    text-shadow: 
        4px 4px 0px #000,
        0 0 20px #00ff00,
        0 0 40px #00ff00;
    margin-bottom: 8px;
    line-height: 32px;
}

.header .subtitle {
    color: #ff006e;
    font-size: 10px;
    text-shadow: 
        2px 2px 0px #000,
        0 0 10px #ff006e;
    line-height: 14px;
}

.main-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin: 10px 0;
}

.pickle-main {
    width: 300px;
    height: 300px;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Prevent mobile zoom on rapid tapping */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.pickle-main img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 190, 11, 0.5));
}

.pickle-main:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(255, 190, 11, 0.8));
}

.pickle-main:active {
    transform: scale(0.95);
}

.stats-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    width: 100%;
    max-width: 800px;
}

.stats-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.stats-display {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #ff006e;
    padding: 12px 20px;
    box-shadow: 
        0 0 15px #ff006e,
        inset 0 0 15px rgba(255, 0, 110, 0.1);
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.stats-display .label {
    color: #ffbe0b;
    font-size: 8px;
    text-shadow: 
        2px 2px 0px #000,
        0 0 10px #ffbe0b;
    line-height: 12px;
    text-align: center;
    margin-bottom: 4px;
}

.stats-display .value {
    color: #ff006e;
    font-size: 16px;
    text-shadow: 
        3px 3px 0px #000,
        0 0 15px #ff006e;
    line-height: 20px;
    text-align: center;
}

/* Auto-Click Stats Specific Styles */
.auto-click-stats {
    border-color: #00FFFF !important; /* Cyan theme */
    box-shadow: 0 0 15px #00FFFF, inset 0 0 15px rgba(0, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
}

.auto-click-stats.active {
    animation: auto-click-pulse 2s infinite;
}

.auto-click-stats.inactive {
    border-color: #666 !important;
    box-shadow: 0 0 5px #666, inset 0 0 5px rgba(102, 102, 102, 0.1) !important;
}

.auto-click-stats .label {
    color: #00FFFF !important;
    text-shadow: 2px 2px 0px #000, 0 0 10px #00FFFF !important;
}

.auto-click-stats.inactive .label {
    color: #666 !important;
    text-shadow: 2px 2px 0px #000 !important;
}

.auto-click-stats .value {
    color: #00FFFF !important;
    text-shadow: 3px 3px 0px #000, 0 0 15px #00FFFF !important;
}

.auto-click-stats.inactive .value {
    color: #666 !important;
    text-shadow: 3px 3px 0px #000 !important;
}

.rarity-stats {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.rarity-box {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid;
    padding: 10px 16px;
    backdrop-filter: blur(10px);
    min-width: 80px;
}

.rarity-box.rare {
    border-color: #8338ec;
    box-shadow: 0 0 10px #8338ec;
}

.rarity-box.rate {
    border-color: #ffbe0b;
    box-shadow: 0 0 10px #ffbe0b;
}

.rarity-box .label {
    font-size: 8px;
    text-shadow: 1px 1px 0px #000;
    line-height: 12px;
    margin-bottom: 2px;
    text-align: center;
}

.rarity-box.rare .label {
    color: #8338ec;
}

.rarity-box.rate .label {
    color: #ffbe0b;
}

.rarity-box .value {
    font-size: 14px;
    text-shadow: 2px 2px 0px #000;
    line-height: 18px;
    text-align: center;
}

.rarity-box.rare .value {
    color: #8338ec;
}

.rarity-box.rate .value {
    color: #ffbe0b;
}

.game-instructions {
    max-width: 600px;
    text-align: center;
    padding: 0 10px;
    margin-top: 5px;
}

.game-instructions .text {
    color: #ffbe0b;
    font-size: 8px;
    text-shadow: 
        2px 2px 0px #000,
        0 0 10px #ffbe0b;
    line-height: 12px;
}

.collection-button {
    position: fixed;
    top: 20px;
    right: 20px; /* Align to right edge */
    width: 80px;
    height: 80px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 9999;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
}

.collection-button:focus {
    outline: 2px solid #05df72;
}

.collection-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 69, 19, 0.5));
    border-radius: 15px;
}

.collection-button:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(139, 69, 19, 0.8));
}

.collection-button:hover img {
    filter: drop-shadow(0 0 15px rgba(139, 69, 19, 0.8));
}

.collection-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fb2c36;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    z-index: 10000;
}

/* Gold Pot Button Styles */
.gold-pot-button {
    position: fixed;
    top: 20px;
    right: 110px; /* 20px + 80px (collection button width) + 10px gap */
    width: 80px;
    height: 80px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 9999;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
}

.gold-pot-button:focus {
    outline: 2px solid #FFD700;
}

.gold-pot-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    border-radius: 15px;
}

.gold-pot-button:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

.gold-pot-button:hover img {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
}

/* Shop Button Styles */
.shop-button {
    position: fixed;
    top: 20px;
    right: 200px; /* 20px + 80px + 10px + 80px + 10px */
    width: 80px;
    height: 80px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 9999;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
}

.shop-button:focus {
    outline: 2px solid #f39c12;
}

.shop-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(243, 156, 18, 0.5));
    border-radius: 15px;
}

.shop-button:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(243, 156, 18, 0.8));
}

.shop-button:hover img {
    filter: drop-shadow(0 0 15px rgba(243, 156, 18, 0.8));
}

/* Challenge Mode Button Styles */
.challenge-mode-button {
    position: fixed;
    top: 110px; /* Position below the icon buttons */
    right: 20px;
    height: 60px;
    padding: 0 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 9999;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 3px solid #ff6b6b;
    border-radius: 12px;
    outline: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
    white-space: nowrap;
}

.challenge-mode-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.8);
    border-color: #ff8787;
}

.challenge-mode-button:active {
    transform: scale(0.98);
}

.challenge-mode-button.active {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-color: #2ecc71;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.5);
}

.challenge-mode-button.active:hover {
    box-shadow: 0 6px 25px rgba(46, 204, 113, 0.8);
}

/* Challenge Mode HUD */
.challenge-hud {
    position: fixed;
    top: 440px; /* Position below active powers panel (which has max-height: 400px + 20px top + 20px padding) */
    left: 20px;
    width: 280px;
    background: rgba(231, 76, 60, 0.95);
    border: 3px solid #ff6b6b;
    border-radius: 12px;
    padding: 16px;
    z-index: 9996; /* Lower than active powers panel (9997) */
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.7);
}

.challenge-level {
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
    color: #fff;
}

.challenge-target {
    font-size: 10px;
    margin-bottom: 8px;
    text-align: center;
    color: #ffeb3b;
}

.challenge-progress {
    font-size: 12px;
    margin-bottom: 16px;
    text-align: center;
    color: #fff;
}

.challenge-timer {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
    color: #fff;
    font-weight: bold;
}

.challenge-timer.urgent {
    color: #ff0000;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Challenge Mode Progress Bar (Coins) */
.challenge-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #000;
    margin-bottom: 12px;
}

.challenge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffbe0b 0%, #ff006e 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.challenge-timer-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #000;
}

.challenge-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
    transition: width 1s linear;
}

.challenge-timer-fill.urgent {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}

/* Challenge Mode Intro Popup */
.challenge-intro-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.challenge-intro-popup.show {
    display: flex;
}

.challenge-intro-content {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 4px solid #ff6b6b;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(231, 76, 60, 0.8);
}

.challenge-intro-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 30px;
}

.challenge-intro-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    line-height: 20px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 30px;
    text-align: left;
}

.challenge-intro-text p {
    margin-bottom: 15px;
}

.challenge-intro-text strong {
    color: #ffeb3b;
}

.challenge-intro-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.challenge-intro-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 30px;
    border: 3px solid #000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 0px #000;
}

.challenge-intro-btn.cancel {
    background: #95a5a6;
    color: #fff;
}

.challenge-intro-btn.cancel:hover {
    background: #7f8c8d;
    transform: scale(1.05);
}

.challenge-intro-btn.proceed {
    background: #2ecc71;
    color: #fff;
}

.challenge-intro-btn.proceed:hover {
    background: #27ae60;
    transform: scale(1.05);
}

/* Challenge Mode Exit Warning Popup */
.challenge-exit-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.challenge-exit-popup.show {
    display: flex;
}

.challenge-exit-content {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: 4px solid #ffb84d;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(243, 156, 18, 0.8);
}

.challenge-exit-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 30px;
}

.challenge-exit-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    line-height: 20px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 30px;
    text-align: left;
}

.challenge-exit-text p {
    margin-bottom: 15px;
}

.challenge-exit-text strong {
    color: #ffeb3b;
}

.challenge-exit-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.challenge-exit-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 30px;
    border: 3px solid #000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 0px #000;
}

.challenge-exit-btn.cancel {
    background: #2ecc71;
    color: #fff;
}

.challenge-exit-btn.cancel:hover {
    background: #27ae60;
    transform: scale(1.05);
}

.challenge-exit-btn.confirm {
    background: #e74c3c;
    color: #fff;
}

.challenge-exit-btn.confirm:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Level Complete Confirmation Popup */
.level-complete-confirm-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10002;
    justify-content: center;
    align-items: center;
}

.level-complete-confirm-popup.show {
    display: flex;
}

.level-complete-confirm-content {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: 4px solid #3dff7a;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(46, 204, 113, 0.8);
}

.level-complete-confirm-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 30px;
}

.level-complete-confirm-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    line-height: 24px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 30px;
}

.level-complete-confirm-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    padding: 15px 40px;
    border: 3px solid #000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 0px #000;
    background: #ffeb3b;
    color: #000;
}

.level-complete-confirm-btn:hover {
    background: #fdd835;
    transform: scale(1.05);
}

/* Level Complete Popup */
.level-complete-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}

.level-complete-popup.show {
    display: flex;
}

.level-complete-content {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: 4px solid #3dff7a;
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(46, 204, 113, 0.8);
}

.level-complete-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 20px;
}

.level-complete-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 30px;
}

.buddy-choices {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.buddy-card {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 20px;
    width: 240px;
    cursor: pointer;
    transition: all 0.3s;
}

.buddy-card:hover {
    transform: scale(1.05);
    border-color: #ffeb3b;
    box-shadow: 0 0 20px rgba(255, 235, 59, 0.8);
}

.buddy-image {
    width: 100%;
    height: 180px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #fff;
}

.buddy-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #ffeb3b;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #000;
}

.buddy-effect {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    line-height: 14px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
}

/* Buddy Detail Popup */
.buddy-detail-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10003;
    justify-content: center;
    align-items: center;
}

.buddy-detail-popup.show {
    display: flex;
}

.buddy-detail-content {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: 4px solid #5dade2;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(52, 152, 219, 0.8);
}

.buddy-detail-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 30px;
}

.buddy-detail-image {
    width: 100%;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #fff;
}

.buddy-detail-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #ffeb3b;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #000;
}

.buddy-detail-description {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    line-height: 18px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 20px;
    font-style: italic;
}

.buddy-detail-effect-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #ffeb3b;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #000;
}

.buddy-detail-effect {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    line-height: 18px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
}

.buddy-detail-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.buddy-detail-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 30px;
    border: 3px solid #000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 0px #000;
    color: #fff;
}

.buddy-detail-btn.close {
    background: #95a5a6;
}

.buddy-detail-btn.close:hover {
    background: #7f8c8d;
    transform: scale(1.05);
}

.buddy-detail-btn.hire {
    background: #2ecc71;
}

.buddy-detail-btn.hire:hover {
    background: #27ae60;
    transform: scale(1.05);
}

/* Level Failure Popup */
.level-failure-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}

.level-failure-popup.show {
    display: flex;
}

.level-failure-content {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 4px solid #ff6b6b;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(231, 76, 60, 0.8);
}

.level-failure-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 20px;
}

.level-failure-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 30px;
}

.level-failure-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.level-failure-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 30px;
    border: 3px solid #000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 0px #000;
    color: #fff;
}

.level-failure-btn.retry {
    background: #f39c12;
}

.level-failure-btn.retry:hover {
    background: #e67e22;
    transform: scale(1.05);
}

.level-failure-btn.exit {
    background: #95a5a6;
}

.level-failure-btn.exit:hover {
    background: #7f8c8d;
    transform: scale(1.05);
}

/* Pickle-Buddy Panel (Right Side) */
.pickle-buddy-panel {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 280px;
    background: rgba(52, 152, 219, 0.95);
    border: 3px solid #3498db;
    border-radius: 12px;
    padding: 16px;
    z-index: 9998;
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.7);
}

.pickle-buddy-header {
    font-size: 12px;
    margin-bottom: 16px;
    text-align: center;
    color: #fff;
    border-bottom: 2px solid #fff;
    padding-bottom: 8px;
}

.pickle-buddy-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pickle-buddy-slot {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #2980b9;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
}

.pickle-buddy-slot.empty {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.3);
    justify-content: center;
    align-items: center;
}

.pickle-buddy-slot.empty .buddy-slot-text {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.buddy-slot-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.buddy-slot-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.buddy-slot-info {
    flex: 1;
    min-width: 0;
}

.buddy-slot-name {
    font-size: 9px;
    color: #ffeb3b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.buddy-slot-effect {
    font-size: 7px;
    color: #fff;
    line-height: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Responsive for Buddy Panel */
@media (max-width: 768px) {
    .pickle-buddy-panel {
        top: 50%;
        transform: translateY(-50%);
        bottom: auto;
        right: 10px;
        width: 70px;
        padding: 8px;
        background: rgba(52, 152, 219, 0.85);
    }
    
    .pickle-buddy-header {
        display: none; /* Hide header on mobile */
    }
    
    .pickle-buddy-slots {
        gap: 8px;
    }
    
    .pickle-buddy-slot {
        padding: 4px;
        gap: 0;
        min-height: 50px;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.2s;
    }
    
    .pickle-buddy-slot:active {
        transform: scale(0.95);
    }
    
    .buddy-slot-image {
        width: 50px;
        height: 50px;
    }
    
    .buddy-slot-info {
        display: none; /* Hide text on mobile - show only images */
    }
    
    .buddy-slot-text {
        font-size: 6px;
        line-height: 8px;
    }
}

/* Mobile Buddy Tooltip (shown when clicking buddy image on mobile) */
.buddy-mobile-tooltip {
    display: none;
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #3498db;
    border-radius: 12px;
    padding: 12px;
    max-width: 200px;
    z-index: 10005;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.7);
}

.buddy-tooltip-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    color: #ffeb3b;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 8px;
    text-align: center;
}

.buddy-tooltip-effect {
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    line-height: 12px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
    text-align: center;
}

/* Active Powers Display */
.active-powers-panel {
    position: fixed;
    top: 20px;
    left: 20px; /* Moved back to left side */
    width: 280px;
    max-height: 400px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #05df72;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 
        0 0 20px #05df72,
        inset 0 0 20px rgba(5, 223, 114, 0.1);
    backdrop-filter: blur(10px);
    z-index: 9997; /* Lower than collection buttons */
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.active-powers-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.active-powers-header {
    color: #05df72;
    font-size: 12px;
    text-shadow: 
        2px 2px 0px #000,
        0 0 10px #05df72;
    text-align: center;
    margin-bottom: 16px;
    border-bottom: 2px solid #05df72;
    padding-bottom: 8px;
}

.active-power-item {
    background: rgba(5, 223, 114, 0.1);
    border: 2px solid #05df72;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.active-power-item:last-child {
    margin-bottom: 0;
}

.active-power-item.expiring {
    border-color: #ff006e;
    background: rgba(255, 0, 110, 0.1);
    animation: pulse-warning 1s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.power-name {
    color: #ffbe0b;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 4px;
    text-transform: capitalize;
}

.power-effect {
    color: #05df72;
    font-size: 8px;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 6px;
}

.power-timer {
    color: #ff006e;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 0px #000;
    text-align: center;
    background: rgba(255, 0, 110, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
}

.power-timer.expiring {
    color: #ff4444;
    animation: blink-timer 0.5s infinite;
}

@keyframes blink-timer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes auto-click-pulse {
    0%, 100% { 
        box-shadow: 0 0 15px #00FFFF, inset 0 0 15px rgba(0, 255, 255, 0.1);
    }
    50% { 
        box-shadow: 0 0 25px #00FFFF, 0 0 35px #00FFFF, inset 0 0 25px rgba(0, 255, 255, 0.2);
    }
}

.no-active-powers {
    color: #888;
    font-size: 10px;
    text-align: center;
    font-style: italic;
    padding: 20px;
}

.coin-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFD700;
    border: 2px solid white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 10px;
    color: #000;
    font-weight: bold;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    z-index: 10000;
    white-space: nowrap;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(5, 223, 114, 0.9);
    color: #000;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: bold;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
    font-size: 10px;
    opacity: 0;
    visibility: hidden;
    display: none; /* Hide notifications completely */
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    display: none; /* Keep hidden even when show class is added */
}

.drop-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #05df72;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    z-index: 1001;
    transition: transform 0.3s ease;
    max-width: 500px;
    font-size: 10px;
}

.drop-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

.drop-popup .pickle-image {
    font-size: 320px;
    margin: 20px 0;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-popup .pickle-name {
    font-size: 24px;
    margin: 20px 0 15px 0;
    font-weight: bold;
    text-transform: capitalize;
    text-shadow: 3px 3px 0px #000;
    letter-spacing: 1px;
}

.drop-popup .rarity-name {
    font-size: 16px;
    margin: 10px 0;
    text-transform: uppercase;
    line-height: 20px;
}

.drop-popup #popup-description {
    font-size: 10px;
    line-height: 14px;
    margin: 15px 0;
}

.drop-popup #popup-description p {
    margin: 6px 0;
    text-align: left;
}

.drop-popup .close-btn {
    background: #05df72;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    margin-top: 20px;
    font-size: 10px;
}

/* Dramatic Narrator Effect - Fancy animations for rare+ drops in Challenge Mode */
.drop-popup.dramatic-narrator-effect {
    animation: dramaticEntrance 0.8s ease-out, dramaticGlow 2s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.4);
    border-color: #ffd700;
}

@keyframes dramaticEntrance {
    0% {
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes dramaticGlow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 0 80px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.8), 0 0 120px rgba(255, 215, 0, 0.6);
    }
}

/* Eat Pickle Success Popup */
.eat-pickle-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #ff6b35;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    z-index: 1002;
    transition: transform 0.3s ease;
    max-width: 500px;
    font-size: 10px;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

.eat-pickle-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

.eat-pickle-header {
    color: #ff6b35;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.eat-pickle-message {
    color: #ffbe0b;
    font-size: 14px;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 15px;
    line-height: 18px;
}

.eat-pickle-power-info {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid #ff6b35;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    color: #05df72;
    font-size: 12px;
    text-shadow: 1px 1px 0px #000;
    line-height: 16px;
    white-space: pre-line;
}

.eat-pickle-close {
    background: #ff6b35;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    margin-top: 10px;
    font-size: 10px;
    transition: background 0.2s ease;
}

.eat-pickle-close:hover {
    background: #ff8e53;
}

/* Collection Modal Styles */
.collection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    overflow-y: auto;
}

.collection-modal.show {
    display: block;
}

/* Hide UI elements when collection modal is open */
body:has(.collection-modal.show) .active-powers-panel,
body:has(.collection-modal.show) .collection-button,
body:has(.collection-modal.show) .gold-pot-button,
body:has(.collection-modal.show) .shop-button,
body:has(.collection-modal.show) .challenge-mode-button,
body:has(.collection-modal.show) .version-display {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Hide UI elements when shop modal is open */
body:has(.shop-modal.show) .active-powers-panel,
body:has(.shop-modal.show) .collection-button,
body:has(.shop-modal.show) .gold-pot-button,
body:has(.shop-modal.show) .shop-button,
body:has(.shop-modal.show) .challenge-mode-button,
body:has(.shop-modal.show) .version-display {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure hiding works on mobile devices */
@media (max-width: 768px) {
    body:has(.collection-modal.show) .active-powers-panel,
    body:has(.collection-modal.show) .collection-button,
    body:has(.collection-modal.show) .gold-pot-button,
    body:has(.collection-modal.show) .shop-button,
    body:has(.collection-modal.show) .challenge-mode-button,
    body:has(.collection-modal.show) .version-display {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    body:has(.shop-modal.show) .active-powers-panel,
    body:has(.shop-modal.show) .collection-button,
    body:has(.shop-modal.show) .gold-pot-button,
    body:has(.shop-modal.show) .shop-button,
    body:has(.shop-modal.show) .challenge-mode-button,
    body:has(.shop-modal.show) .version-display {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

.collection-content {
    max-width: 900px;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #05df72;
    border-radius: 20px;
    padding: 30px;
    position: relative;
}

.collection-header {
    text-align: center;
    margin-bottom: 30px;
}

.collection-header h2 {
    color: #ffbe0b;
    font-size: 24px;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 10px;
}

.collection-stats {
    color: #05df72;
    font-size: 12px;
    text-shadow: 2px 2px 0px #000;
}

.collection-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #ff006e;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pickle-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    position: relative;
    transition: transform 0.2s;
}

.pickle-card:hover {
    transform: scale(1.05);
}

.pickle-card.uncommon { border-color: #90EE90; }
.pickle-card.rare { border-color: #4169E1; }
.pickle-card.legendary { border-color: #9932CC; }
.pickle-card.epic { border-color: #FF8C00; }
.pickle-card.special { border-color: #FF1493; }

.pickle-card-image {
    width: 160px;
    height: 160px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.pickle-card-image img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 25px;
}

.pickle-card-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.pickle-card.uncommon .pickle-card-name { color: #90EE90; }
.pickle-card.rare .pickle-card-name { color: #4169E1; }
.pickle-card.legendary .pickle-card-name { color: #9932CC; }
.pickle-card.epic .pickle-card-name { color: #FF8C00; }
.pickle-card.special .pickle-card-name { color: #FF1493; }

.pickle-card-rarity {
    font-size: 10px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.pickle-card.uncommon .pickle-card-rarity { color: #90EE90; }
.pickle-card.rare .pickle-card-rarity { color: #4169E1; }
.pickle-card.legendary .pickle-card-rarity { color: #9932CC; }
.pickle-card.epic .pickle-card-rarity { color: #FF8C00; }
.pickle-card.special .pickle-card-rarity { color: #FF1493; }

.pickle-card-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff006e;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.pickle-card-actions {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.eat-button {
    background: linear-gradient(45deg, #ff6b35, #ff8e53);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
}

.eat-button:hover {
    background: linear-gradient(45deg, #ff8e53, #ffab73);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

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

.eat-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.delete-button {
    background: linear-gradient(45deg, #ff4757, #ff6b6b);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.delete-button:hover {
    background: linear-gradient(45deg, #ff6b6b, #ff8a8a);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

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

.delete-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.empty-collection {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin: 40px 0;
}

.empty-collection .empty-jar {
    font-size: 60px;
    margin-bottom: 20px;
}

/* Shop Modal Styles */
.shop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    overflow-y: auto;
}

.shop-modal.show {
    display: block;
}

.shop-content {
    max-width: 1000px;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #f39c12;
    border-radius: 20px;
    padding: 30px;
    position: relative;
}

.shop-header {
    text-align: center;
    margin-bottom: 30px;
}

.shop-header h2 {
    color: #f39c12;
    font-size: 24px;
    text-shadow: 3px 3px 0px #000, 0 0 20px rgba(243, 156, 18, 0.5);
    margin-bottom: 15px;
}

.shop-wallet {
    color: #FFD700;
    font-size: 14px;
    text-shadow: 2px 2px 0px #000;
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    border-radius: 10px;
    display: inline-block;
}

.shop-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #ff006e;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
}

.shop-close:hover {
    background: #ff4081;
    transform: scale(1.1);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-pickle-item {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.shop-pickle-item.discovered {
    cursor: pointer;
}

.shop-pickle-item.discovered:hover {
    transform: scale(1.05);
}

.shop-pickle-item.undiscovered {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-pickle-item.uncommon { border-color: #90EE90; }
.shop-pickle-item.rare { border-color: #4169E1; }
.shop-pickle-item.legendary { border-color: #9932CC; }
.shop-pickle-item.epic { border-color: #FF8C00; }
.shop-pickle-item.special { border-color: #FF1493; }

.shop-pickle-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.shop-pickle-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-pickle-image.greyed {
    filter: grayscale(100%) brightness(0.5);
}

.shop-pickle-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.shop-pickle-item.uncommon .shop-pickle-name { color: #90EE90; }
.shop-pickle-item.rare .shop-pickle-name { color: #4169E1; }
.shop-pickle-item.legendary .shop-pickle-name { color: #9932CC; }
.shop-pickle-item.epic .shop-pickle-name { color: #FF8C00; }
.shop-pickle-item.special .shop-pickle-name { color: #FF1493; }
.shop-pickle-item.undiscovered .shop-pickle-name { color: #666; }

.shop-pickle-description {
    font-size: 8px;
    color: #ccc;
    margin-bottom: 10px;
    min-height: 30px;
}

.shop-pickle-price {
    font-size: 10px;
    color: #FFD700;
    margin-bottom: 10px;
    font-weight: bold;
}

.shop-buy-button {
    background: linear-gradient(45deg, #f39c12, #f1c40f);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
}

.shop-buy-button:hover {
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

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

.shop-buy-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.sell-button {
    background: linear-gradient(45deg, #f39c12, #f1c40f);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
}

.sell-button:hover {
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

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

/* Confirmation Popup Styles */
.confirmation-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.confirmation-popup.show {
    display: flex;
}

.confirmation-content {
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #f39c12;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
}

.confirmation-message {
    color: white;
    font-size: 12px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-yes, .confirm-no {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-yes {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.confirm-yes:hover {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
}

.confirm-no {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    color: white;
}

.confirm-no:hover {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    transform: translateY(-2px);
}

/* Shop Footer Styles */
.shop-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f39c12;
    text-align: center;
}

.buy-coins-button {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.buy-coins-button:hover {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

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

/* Buy Coins Popup Styles */
.buy-coins-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3001;
    display: none;
    align-items: center;
    justify-content: center;
}

.buy-coins-popup.show {
    display: flex;
}

.buy-coins-content {
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #27ae60;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(39, 174, 96, 0.5);
}

.buy-coins-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #ff006e;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
}

.buy-coins-close:hover {
    background: #ff4081;
    transform: scale(1.1);
}

.buy-coins-message {
    color: #27ae60;
    font-size: 14px;
    line-height: 1.8;
    text-shadow: 2px 2px 0px #000;
    font-family: 'Press Start 2P', monospace;
}

.version-display {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #05df72;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 8px;
    color: #05df72;
    text-shadow: 1px 1px 0px #000;
    z-index: 100; /* Much lower than modals (2000, 3000) */
    backdrop-filter: blur(5px);
}

/* Auto-Click Stats Styles */
.auto-click-stats {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #00FFFF;
    padding: 12px 20px;
    backdrop-filter: blur(10px);
    min-width: 120px;
    transition: all 0.3s ease;
}

.auto-click-stats.active {
    box-shadow: 0 0 15px #00FFFF;
    animation: auto-click-pulse 2s infinite;
}

.auto-click-stats.inactive {
    border-color: #666;
    box-shadow: none;
}

.auto-click-stats .label {
    color: #00FFFF;
    font-size: 8px;
    text-shadow: 2px 2px 0px #000;
    line-height: 12px;
    text-align: center;
    margin-bottom: 4px;
}

.auto-click-stats.inactive .label {
    color: #666;
}

.auto-click-stats .value {
    color: #00FFFF;
    font-size: 16px;
    text-shadow: 3px 3px 0px #000;
    line-height: 20px;
    text-align: center;
}

.auto-click-stats.inactive .value {
    color: #666;
}

/* Auto-click animations */
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0px);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* Pickle Notification Styles */
.pickle-notification {
    animation: slideInFromLeft 0.3s ease-out;
}

.pickle-notification:hover {
    filter: brightness(1.1);
}

@keyframes slideInFromLeft {
    0% {
        left: -300px;
        opacity: 0;
    }
    100% {
        left: 20px;
        opacity: 1;
    }
}

/* Mobile responsiveness for notifications */
@media (max-width: 768px) {
    .pickle-notification {
        left: 10px !important;
        max-width: 250px;
        padding: 12px;
        gap: 10px;
    }
    
    .pickle-notification .notification-image img,
    .pickle-notification .notification-image .fallback-text {
        width: 35px !important;
        height: 35px !important;
    }
    
    .pickle-notification .notification-title {
        font-size: 9px !important;
    }
    
    .pickle-notification .notification-subtitle {
        font-size: 7px !important;
    }
}

@keyframes floatUpAuto {
    0% {
        opacity: 0.7;
        transform: translateY(0px) translateX(0px);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) translateX(-10px);
    }
}

@keyframes auto-click-pulse {
    0%, 100% { 
        box-shadow: 0 0 15px #00FFFF;
    }
    50% { 
        box-shadow: 0 0 25px #00FFFF, 0 0 35px #00FFFF;
    }
}

/* Pickle glow effect when auto-clicks are active */
.pickle-main.auto-clicking {
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.6));
    animation: auto-click-glow 3s infinite;
}

@keyframes auto-click-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.6));
    }
    50% { 
        filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.8));
    }
}

/* Pickle Detail Modal */
.pickle-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pickle-detail-modal.show {
    display: flex;
}

.pickle-detail-card {
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    text-align: center;
    position: relative;
}

.pickle-detail-card.uncommon { border-color: #90EE90; }
.pickle-detail-card.rare { border-color: #4169E1; }
.pickle-detail-card.legendary { border-color: #9932CC; }
.pickle-detail-card.epic { border-color: #FF8C00; }
.pickle-detail-card.special { border-color: #FF1493; }

.pickle-detail-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #ff006e;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
}

.pickle-detail-image {
    width: 400px;
    height: 400px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 150px;
}

.pickle-detail-image img {
    width: 400px;
    height: 400px;
    object-fit: contain;
    border-radius: 20px;
}

.pickle-detail-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.pickle-detail-card.uncommon .pickle-detail-name { color: #90EE90; }
.pickle-detail-card.rare .pickle-detail-name { color: #4169E1; }
.pickle-detail-card.legendary .pickle-detail-name { color: #9932CC; }
.pickle-detail-card.epic .pickle-detail-name { color: #FF8C00; }
.pickle-detail-card.special .pickle-detail-name { color: #FF1493; }

.pickle-detail-rarity {
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.pickle-detail-card.uncommon .pickle-detail-rarity { color: #90EE90; }
.pickle-detail-card.rare .pickle-detail-rarity { color: #4169E1; }
.pickle-detail-card.legendary .pickle-detail-rarity { color: #9932CC; }
.pickle-detail-card.epic .pickle-detail-rarity { color: #FF8C00; }
.pickle-detail-card.special .pickle-detail-rarity { color: #FF1493; }

.pickle-detail-description {
    font-size: 12px;
    line-height: 18px;
    color: #ccc;
    margin-bottom: 15px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pickle-detail-count {
    font-size: 14px;
    color: #ffbe0b;
    margin-bottom: 10px;
}

.pickle-detail-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.detail-eat-button {
    background: linear-gradient(45deg, #ff6b35, #ff8e53);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 0px rgba(0,0,0,0.5);
}

.detail-eat-button:hover {
    background: linear-gradient(45deg, #ff8e53, #ffab73);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .game-container {
        padding: 5px;
        justify-content: center; /* Center content vertically */
        gap: 15px;
    }
    
    .header {
        margin-top: 70px; /* Space to clear fixed elements */
        margin-bottom: 5px;
        flex-shrink: 0;
    }
    
    .header h1 {
        font-size: 16px;
        margin-bottom: 4px;
        line-height: 20px;
    }

    .header .subtitle {
        font-size: 7px;
        line-height: 10px;
    }

    .main-game {
        margin: 0;
        flex-grow: 0;
        flex-shrink: 0;
    }

    .pickle-main {
        width: 250px;
        height: 250px;
    }

    .stats-section {
        margin-top: 10px;
        margin-bottom: 20px;
        gap: 8px;
        flex-shrink: 0;
    }

    .stats-row {
        gap: 8px;
    }

    .stats-display {
        padding: 8px 12px;
        min-width: 90px;
    }
    
    .stats-display .label {
        font-size: 6px;
        line-height: 8px;
    }
    
    .stats-display .value {
        font-size: 12px;
        line-height: 16px;
    }

    /* Mobile auto-click stats */
    .auto-click-stats {
        padding: 8px 12px;
        min-width: 90px;
    }
    
    .auto-click-stats .label {
        font-size: 6px;
        line-height: 8px;
    }
    
    .auto-click-stats .value {
        font-size: 12px;
        line-height: 16px;
    }

    .rarity-stats {
        gap: 6px;
    }
    
    .rarity-box {
        padding: 6px 10px;
        min-width: 60px;
    }
    
    .rarity-box .label {
        font-size: 6px;
        line-height: 8px;
    }
    
    .rarity-box .value {
        font-size: 10px;
        line-height: 14px;
    }

    .collection-button {
        width: 50px;
        height: 50px;
        top: 10px;
        right: 10px;
    }

    .collection-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .gold-pot-button {
        width: 50px;
        height: 50px;
        top: 10px;
        right: 65px;
    }

    .shop-button {
        width: 50px;
        height: 50px;
        top: 10px;
        right: 120px;
    }

    .challenge-mode-button {
        height: 40px;
        padding: 0 8px;
        top: 70px; /* Position below jar button (10px + 50px height + 10px gap) */
        right: 10px; /* Align with jar button */
        font-size: 6px;
        border-width: 2px;
    }

    .coin-badge {
        font-size: 10px;
        padding: 3px 5px;
    }
    
    .game-instructions .text {
        font-size: 6px;
        line-height: 9px;
    }

    /* Mobile responsiveness for active powers */
    .active-powers-panel {
        width: 140px; /* Smaller width */
        top: 10px;
        left: 10px;
        max-height: 120px; /* Compact but readable */
        padding: 6px;
        font-size: 6px;
        z-index: 9997;
    }
    
    .active-powers-header {
        font-size: 6px;
        margin-bottom: 4px;
        padding-bottom: 2px;
    }
    
    .power-name {
        font-size: 5px;
    }
    
    .power-effect {
        font-size: 4px;
    }
    
    .power-timer {
        font-size: 5px;
        padding: 1px 2px;
    }
    
    .active-power-item {
        padding: 3px;
        margin-bottom: 3px;
    }
    
    .no-active-powers {
        font-size: 5px;
        padding: 6px;
    }

    /* Mobile Challenge HUD - position below active powers */
    .challenge-hud {
        top: 140px; /* Below active powers panel */
        left: 10px;
        width: 140px; /* Match active powers width */
        padding: 8px;
        font-size: 6px;
        z-index: 9996;
    }

    .challenge-level {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .challenge-target {
        font-size: 6px;
        margin-bottom: 4px;
    }

    .challenge-progress {
        font-size: 7px;
        margin-bottom: 8px;
    }

    .challenge-timer {
        font-size: 24px; /* Smaller but still visible */
        margin-bottom: 6px;
    }

    .challenge-timer-bar {
        height: 8px;
    }

    .challenge-progress-bar {
        height: 8px;
        margin-bottom: 8px;
    }

    /* Mobile Pickle-Buddy Panel - hide on mobile or make very compact */
    .pickle-buddy-panel {
        display: none; /* Hide on mobile to save space */
    }
    
    /* Mobile Level Complete Popup - Make responsive */
    .level-complete-content {
        max-width: 95%;
        margin: 10px;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .level-complete-content h2 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .level-complete-text {
        font-size: 8px;
        line-height: 14px;
        margin-bottom: 20px;
    }
    
    .buddy-choices {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }
    
    .buddy-card {
        width: 100%;
        max-width: 280px;
        padding: 15px;
    }
    
    .buddy-image {
        height: 140px;
        margin-bottom: 10px;
    }
    
    .buddy-name {
        font-size: 9px;
        margin-bottom: 8px;
    }
    
    .buddy-effect {
        font-size: 7px;
        line-height: 12px;
    }
    
    /* Sticky close buttons for scrollable modals on mobile */
    .collection-close,
    .shop-close,
    .pickle-detail-close {
        position: sticky !important;
        top: 10px;
        right: 20px !important;
        z-index: 10;
        margin-bottom: 10px;
    }
    
    /* Make modal content containers scrollable with sticky header */
    .collection-content,
    .shop-content {
        max-height: 90vh;
        overflow-y: auto;
        position: relative;
    }
}

/* Coin Details Popup Styles */
.coin-details-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3001;
    display: none;
    align-items: center;
    justify-content: center;
}

.coin-details-popup.show {
    display: flex;
}

.coin-details-content {
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #FFD700;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.coin-details-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #ff006e;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
}

.coin-details-close:hover {
    background: #ff4081;
    transform: scale(1.1);
}

.coin-details-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.coin-details-icon img {
    animation: coin-bounce 2s infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

@keyframes coin-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.coin-details-title {
    color: #FFD700;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 3px 3px 0px #000, 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 20px;
    font-family: 'Press Start 2P', monospace;
}

.coin-details-amount {
    color: #FFD700;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 4px 4px 0px #000, 0 0 30px rgba(255, 215, 0, 0.8);
    margin-bottom: 30px;
    font-family: 'Press Start 2P', monospace;
}

.coin-details-message {
    color: #05df72;
    font-size: 12px;
    line-height: 1.8;
    text-shadow: 2px 2px 0px #000;
    font-family: 'Press Start 2P', monospace;
}


/* Challenge Mode Theme - Red Sky */
.scene.challenge-mode .sky {
    background:
        radial-gradient(1200px 700px at 50% 60%,
            rgba(255, 60, 60, 0.35) 0%,
            rgba(255, 60, 60, 0.18) 40%,
            rgba(255, 60, 60, 0.00) 70%),
        linear-gradient(to bottom,
            #1a0a0a 0%,
            #450a1a 28%,
            #5a1a2a 52%,
            #4a2430 66%,
            #442828 76%,
            #5a2020 88%,
            #3a1010 100%);
    filter: saturate(1.2);
}

.scene.challenge-mode .sun {
    background: radial-gradient(circle,
        rgba(255, 80, 80, 1) 0%,
        rgba(255, 60, 60, 0.9) 20%,
        rgba(200, 40, 40, 0.6) 40%,
        rgba(150, 30, 30, 0.3) 60%,
        rgba(100, 20, 20, 0) 100%);
    box-shadow: 
        0 0 80px rgba(255, 60, 60, 0.8),
        0 0 120px rgba(255, 40, 40, 0.6),
        0 0 160px rgba(200, 30, 30, 0.4);
}

.scene.challenge-mode .floor {
    background: linear-gradient(to bottom,
        rgba(80, 20, 20, 0.3) 0%,
        rgba(60, 15, 15, 0.5) 50%,
        rgba(40, 10, 10, 0.7) 100%);
}

.scene.challenge-mode .gridH,
.scene.challenge-mode .gridV {
    background-image: linear-gradient(rgba(255, 60, 60, 0.4) 1px, transparent 1px);
}

.scene.challenge-mode .floor-glow {
    background: radial-gradient(ellipse at center,
        rgba(255, 60, 60, 0.3) 0%,
        rgba(200, 40, 40, 0.15) 40%,
        transparent 70%);
}

/* Buddy Replacement Popup - Hidden by default, only shown when all 5 slots are full */
.buddy-replacement-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10004;
    justify-content: center;
    align-items: center;
}

.buddy-replacement-popup.show {
    display: flex;
}

.buddy-replacement-content {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: 4px solid #ffb84d;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(243, 156, 18, 0.8);
}

.buddy-replacement-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #fff;
    text-shadow: 3px 3px 0px #000;
    margin-bottom: 30px;
}

.buddy-replacement-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #fff;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 30px;
}

.buddy-replacement-new {
    margin-bottom: 30px;
}

.buddy-replacement-new h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #ffeb3b;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 20px;
}

.buddy-replacement-card {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 20px;
    display: inline-block;
    min-width: 240px;
}

.buddy-replacement-card.new {
    border-color: #2ecc71;
}

.buddy-replacement-image {
    width: 100%;
    height: 180px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #fff;
}

.buddy-replacement-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #ffeb3b;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #000;
}

.buddy-replacement-effect {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    line-height: 14px;
    color: #fff;
    text-shadow: 1px 1px 0px #000;
}

.buddy-replacement-current h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #ffeb3b;
    text-shadow: 2px 2px 0px #000;
    margin-bottom: 20px;
}

.buddy-replacement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.buddy-replacement-grid .buddy-replacement-card {
    cursor: pointer;
    transition: all 0.3s;
}

.buddy-replacement-grid .buddy-replacement-card:hover {
    transform: scale(1.05);
    border-color: #e74c3c;
}

.buddy-replacement-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.buddy-replacement-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 30px;
    border: 3px solid #000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 2px 2px 0px #000;
    color: #fff;
}

.buddy-replacement-btn.decline {
    background: #95a5a6;
}

.buddy-replacement-btn.decline:hover {
    background: #7f8c8d;
    transform: scale(1.05);
}
