body {
    font-family: Arial, Helvetica, sans-serif;
    background: #111;
    color: #eee;
    text-align: center;
    margin: 0;
    padding: 20px;
    padding-top: 60px; /* Space for announcement banner */
    user-select: none;
}

/* Announcement Banner */
.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b35, #f7c531);
    color: #1a1a2e;
    padding: 12px 50px 12px 20px;
    text-align: center;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: banner-pulse 2s ease-in-out infinite;
}

.announcement-banner .banner-text {
    font-size: 1rem;
}

.announcement-banner .banner-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #1a1a2e;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.announcement-banner .banner-close:hover {
    background: rgba(0, 0, 0, 0.3);
}

@keyframes banner-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

h1 {
    color: #ffdd44;
    margin: 10px;
}
#mine-area {
    font-size: 120px;
    cursor: pointer;
    transition: transform 0.1s;
    margin: 20px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    position: relative;
}
#mine-area .rock-emoji {
    position: relative;
    z-index: 10;
    font-size: inherit;
    display: inline-block;
}
#mine-area:active {
    transform: scale(1.15);
}
.stats {
    font-size: 1.4rem;
    margin: 15px 0;
}

.stats span {
    font-variant-numeric: tabular-nums;
}

.prestige-progress {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3a4a5a;
    color: #aaccff;
    font-size: 1.1rem;
}

.prestige-progress #prestige-progress {
    color: #ffcc44;
    font-weight: 600;
}

.prestige-progress #prestige-progress.ready {
    color: #44ff88;
    animation: pulse-ready 1s ease-in-out infinite;
}

@keyframes pulse-ready {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Buy Mode Selector */
.buy-mode-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    padding: 10px 20px;
    background: #1a2a3a;
    border-radius: 10px;
    max-width: 600px;
    flex-wrap: wrap;
}

.buy-mode-label {
    color: #aaccff;
    font-weight: 600;
    margin-right: 10px;
}

.auto-buy-hint {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #44ff44;
    margin-top: 8px;
    animation: hint-pulse 2s ease-in-out infinite;
}

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

.buy-mode-btn {
    padding: 8px 16px;
    border: 2px solid #3366ff;
    background: transparent;
    color: #88aaff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.buy-mode-btn:hover {
    background: rgba(51, 102, 255, 0.2);
}

.buy-mode-btn.active {
    background: #3366ff;
    color: white;
    box-shadow: 0 0 10px rgba(51, 102, 255, 0.5);
}

.buy-mode-btn[data-mode="auto"].active {
    background: #44aa44;
    border-color: #44aa44;
    animation: auto-pulse 1.5s ease-in-out infinite;
}

@keyframes auto-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(68, 170, 68, 0.5); }
    50% { box-shadow: 0 0 20px rgba(68, 170, 68, 0.8); }
}

.upgrade-shop {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 30px auto;
}

/* Auto-buy selection mode styles */
.upgrade-shop.auto-buy-active .upgrade {
    cursor: pointer;
    position: relative;
}

.upgrade-shop.auto-buy-active .upgrade::before {
    content: "Click to select";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    color: #88aaff;
    opacity: 0.7;
}

.upgrade-shop.auto-buy-active .upgrade.auto-buy-selected {
    border-color: #44ff44 !important;
    box-shadow: 0 0 15px rgba(68, 255, 68, 0.4);
    background: linear-gradient(135deg, #1a3a2a 0%, #1a2a3a 100%);
}

.upgrade-shop.auto-buy-active .upgrade.auto-buy-selected::before {
    content: "✓ Auto-buying";
    color: #44ff44;
    opacity: 1;
}

.upgrade-shop.auto-buy-active .upgrade.auto-buy-selected::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    pointer-events: none;
    animation: auto-buy-glow 2s ease-in-out infinite;
}

@keyframes auto-buy-glow {
    0%, 100% { box-shadow: inset 0 0 10px rgba(68, 255, 68, 0.2); }
    50% { box-shadow: inset 0 0 20px rgba(68, 255, 68, 0.4); }
}

.upgrade {
    background: #1a2a3a;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s;
    position: relative;
}
.upgrade:hover {
    border-color: #88aaff;
    background: #223344;
}
.upgrade.disabled {
    opacity: 0.5;
    pointer-events: none;
    border-color: #444;
}

/* Allow clicking disabled upgrades when in auto-buy mode to select them */
.upgrade-shop.auto-buy-active .upgrade.disabled {
    pointer-events: auto;
    opacity: 0.6;
}

.upgrade.maxed {
    opacity: 0.7;
    border-color: #44ff44;
    background: linear-gradient(135deg, #1a3a2a 0%, #0a2a1a 100%);
}
.upgrade.maxed button {
    background: #44aa44;
    cursor: not-allowed;
}
button {
    background: #3366ff;
    color: white;
    border: none;
    padding: 10px 18px;
    margin: 6px;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
}
button:hover {
    background: #4477ff;
}
button:disabled {
    background: #444;
    cursor: not-allowed;
}
#prestige {
    background: #9944ff;
    font-size: 1.3rem;
    margin-top: 40px;
    padding: 15px 30px;
}
/* ADD THIS to the END of rock-miner/css/styles.css */

#mine-area {
    position: relative;
    overflow: visible;
}

.laser {
    position: absolute;
    top: -25%;
    left: 50%;
    transform-origin: bottom center;
    width: 3px;
    height: 150%;
    border-radius: 2px;
    animation: laserPulse 1.2s infinite ease-in-out;
    box-shadow: 0 0 12px currentColor;
    pointer-events: none;
    z-index: 10;
}

@keyframes laserPulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scaleY(0.9) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.3) rotate(2deg);
    }
}

#mine-area.lasered {
    filter: drop-shadow(0 0 15px #44ff44);
}

.plasma-pulse {
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #ffffff, #ff66ff, transparent);
    border-radius: 50%;
    animation: plasmaShot 0.8s infinite linear;
    box-shadow: 0 0 20px #ff44ff, 0 0 40px rgba(255, 68, 255, 0.5);
}

@keyframes plasmaPulse {
    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

.plasma-cannon.left {
    transform: scale(1);
}

.plasma-cannon.left::before {
    right: auto;
    left: -15px;
    border-radius: 10px 0 0 10px;
}

.plasma-cannon.left .plasma-pulse {
    right: auto;
    left: -25px;
    animation: plasmaShotLeft 0.8s infinite linear;
}

@keyframes plasmaShot {
    0% {
        transform: translateY(-50%) translateX(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) translateX(100px) scale(0.3);
        opacity: 0;
    }
}

@keyframes plasmaShotLeft {
    0% {
        transform: translateY(-50%) translateX(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50%) translateX(-100px) scale(0.3);
        opacity: 0;
    }
}

#mine-area.plasmed {
    filter: drop-shadow(0 0 25px #aa44ff);
}

/* Plasma Cannon */
.plasma-cannon {
    position: absolute;
    top: 35%;
    width: 60px;
    height: 30px;
    border-radius: 8px 25px 25px 8px;
    background: linear-gradient(135deg, #6622cc 0%, #aa44ff 40%, #dd88ff 60%, #aa44ff 80%, #4400aa 100%);
    box-shadow:
        0 0 25px #aa44ff,
        0 0 50px rgba(170, 68, 255, 0.5),
        inset 0 -5px 15px rgba(0, 0, 0, 0.4),
        inset 0 5px 10px rgba(255, 255, 255, 0.3);
    animation: plasmaPulse 1.5s infinite ease-in-out;
    pointer-events: none;
    z-index: 15;
}

.plasma-cannon::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 20px;
    height: 14px;
    background: linear-gradient(90deg, #aa44ff, #ff66ff, #aa44ff);
    border-radius: 0 10px 10px 0;
    box-shadow: 0 0 15px #ff66ff, 0 0 30px rgba(255, 102, 255, 0.6);
}

.plasma-cannon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(255,255,255,0.8), rgba(170, 68, 255, 0.5));
    border-radius: 50%;
    box-shadow: 0 0 8px #ffffff;
}

.plasma-cannon.left {
    left: -10px;
}

.plasma-cannon.right {
    right: -10px;
}

/* Projectile */
.plasma-projectile {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ff88ff, transparent);
    border-radius: 50%;
    box-shadow: 0 0 12px #ff88ff;
    animation: projectileFly 0.8s forwards linear;
    pointer-events: none;
    z-index: 20;
}

@keyframes projectileFly {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.4) translateY(80px);
        opacity: 0;
    }
}

/* Buff indicator (brief flash on rock) */
#mine-area.buffed {
    animation: buffFlash 0.6s ease-out;
}

@keyframes buffFlash {
    0% {
        filter: drop-shadow(0 0 25px #ff88ff);
    }
    50% {
        filter: drop-shadow(0 0 40px #ff88ff);
    }
    100% {
        filter: drop-shadow(0 0 25px #aa44ff);
    }
}

.black-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        #000 0%,
        #111 40%,
        transparent 70%
    );
    box-shadow:
        0 0 30px #4400aa,
        inset 0 0 40px rgba(0, 0, 0, 0.9);
    animation: blackHoleOrbit 8s linear infinite;
    pointer-events: none;
    z-index: 25;
    transform-origin: center center;
}

.black-hole::before {
    content: "";
    position: absolute;
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    border: 2px solid #aa00ff;
    border-radius: 50%;
    box-shadow: 0 0 20px #aa00ff;
    animation: eventHorizon 2s ease-in-out infinite alternate;
}

@keyframes blackHoleOrbit {
    0% {
        transform: rotate(0deg) translateY(-100px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateY(-100px) rotate(-360deg);
    }
}

@keyframes eventHorizon {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
}

.orbiting-bh {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, #000 0%, #222 50%, transparent 80%);
    box-shadow: 0 0 15px #6600cc;
    animation: orbit 8s linear infinite;
    z-index: 20;
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(120px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(120px) rotate(-360deg);
    }
}

#mine-area.blackholed {
    filter: drop-shadow(0 0 40px #4400aa) hue-rotate(180deg);
}

.singularity-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, #ff00ff, #4400aa, transparent);
    transform: translate(-50%, -50%);
    animation: pulseExpand 1s ease-out forwards;
    pointer-events: none;
    z-index: 30;
}

@keyframes pulseExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Galaxy Harvester Background */
.galaxy-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(138, 43, 226, 0.4) 0%,
        rgba(75, 0, 130, 0.3) 25%,
        rgba(25, 25, 112, 0.2) 50%,
        transparent 70%
    );
    animation: galaxyRotate 60s linear infinite;
    pointer-events: none;
    z-index: 15;
    --core-size: 25px;
}

.galaxy-background::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--core-size);
    height: var(--core-size);
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        #ffffff 0%,
        #ffe4b5 20%,
        #ffa500 40%,
        #8b008b 70%,
        transparent 100%
    );
    border-radius: 50%;
    box-shadow: 
        0 0 20px #ffffff,
        0 0 40px #ffa500,
        0 0 60px #8b008b;
    animation: coreGlow 3s ease-in-out infinite alternate;
}

.galaxy-arm {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 8px;
    background: linear-gradient(
        90deg,
        rgba(138, 43, 226, 0.6) 0%,
        rgba(75, 0, 130, 0.4) 50%,
        transparent 100%
    );
    border-radius: 0 50% 50% 0;
    transform-origin: left center;
    filter: blur(2px);
}

.galaxy-star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    animation: starTwinkle 2s ease-in-out infinite;
    box-shadow: 0 0 3px #ffffff;
}

@keyframes galaxyRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes coreGlow {
    0% {
        filter: brightness(1);
        box-shadow: 
            0 0 20px #ffffff,
            0 0 40px #ffa500,
            0 0 60px #8b008b;
    }
    100% {
        filter: brightness(1.3);
        box-shadow: 
            0 0 30px #ffffff,
            0 0 60px #ffa500,
            0 0 90px #8b008b;
    }
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

#mine-area.galaxy-active {
    filter: drop-shadow(0 0 30px rgba(138, 43, 226, 0.5));
}

/* Neutron Star Visual */
.neutron-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 40% 40%,
        #ffffff 0%,
        #88ccff 30%,
        #4488ff 60%,
        #2244aa 100%
    );
    box-shadow:
        0 0 20px #88ccff,
        0 0 40px #4488ff,
        0 0 60px rgba(68, 136, 255, 0.5);
    animation: neutronOrbit 8s linear infinite;
    pointer-events: none;
    z-index: 5;
    --neutron-intensity: 0.6;
}

.neutron-star-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    animation: neutronCounterRotate 10s linear infinite;
}

.neutron-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(136, 204, 255, 0.5);
    border-radius: 50%;
    animation: neutronRingPulse 1.5s ease-out infinite;
    pointer-events: none;
}

.neutron-beam {
    position: absolute;
    left: 50%;
    width: 6px;
    height: 80px;
    background: linear-gradient(
        to top,
        transparent 0%,
        rgba(136, 204, 255, 0.8) 30%,
        #ffffff 50%,
        rgba(136, 204, 255, 0.8) 70%,
        transparent 100%
    );
    transform: translateX(-50%);
    animation: neutronBeamPulse 0.3s ease-in-out infinite alternate;
    pointer-events: none;
    filter: blur(1px);
}

.neutron-beam-top {
    bottom: 100%;
}

.neutron-beam-bottom {
    top: 100%;
}

@keyframes neutronOrbit {
    0% {
        transform: rotate(0deg) translateY(130px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateY(130px) rotate(-360deg);
    }
}

@keyframes neutronCounterRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes neutronPulse {
    0% {
        filter: brightness(1);
    }
    100% {
        filter: brightness(1.3);
    }
}

@keyframes neutronRingPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
        border-color: rgba(136, 204, 255, 0.8);
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
        border-color: rgba(136, 204, 255, 0);
    }
}

@keyframes neutronBeamPulse {
    0% {
        opacity: 0.6;
        height: 70px;
    }
    100% {
        opacity: 1;
        height: 90px;
    }
}

#mine-area.neutron-active {
    filter: drop-shadow(0 0 25px rgba(136, 204, 255, 0.4));
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 3px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    max-width: 350px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    z-index: 1000;
    animation: slideInAchievement 0.4s ease-out;
    opacity: 0;
    transform: translateX(400px);
}

.achievement-notification.show {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease-out;
}

.achievement-content {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #000;
}

.achievement-icon {
    font-size: 2.5rem;
}

.achievement-text {
    text-align: left;
}

.achievement-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.9rem;
    opacity: 0.9;
}

@keyframes slideInAchievement {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Achievements Button */
#achievements-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #9944ff, #6600cc);
    font-size: 1rem;
    padding: 12px 20px;
    z-index: 500;
}

#achievements-btn:hover {
    background: linear-gradient(135deg, #aa55ff, #7711dd);
}

/* Burger Menu */
.burger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 6000;
}

.burger-menu-btn {
    background: #1a2a3a;
    border: 2px solid #446688;
    color: #eef;
    font-size: 1.4rem;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.burger-menu-btn:hover {
    background: #223344;
    border-color: #88aaff;
}

.burger-menu-dropdown {
    position: absolute;
    top: 56px;
    left: 0;
    background: #0a1a2a;
    border: 2px solid #446688;
    border-radius: 10px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 6px;
    min-width: 190px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(68, 102, 136, 0.4);
}

/* Custom scrollbar for burger menu */
.burger-menu-dropdown::-webkit-scrollbar {
    width: 8px;
}

.burger-menu-dropdown::-webkit-scrollbar-track {
    background: #0a1a2a;
    border-radius: 4px;
}

.burger-menu-dropdown::-webkit-scrollbar-thumb {
    background: #446688;
    border-radius: 4px;
}

.burger-menu-dropdown::-webkit-scrollbar-thumb:hover {
    background: #5588aa;
}

.burger-menu-dropdown.open {
    display: flex;
}

.burger-menu-item {
    background: #1a2a3a;
    border: 1px solid #334455;
    color: #eef;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
}

.burger-menu-item:hover {
    background: #223344;
    border-color: #88aaff;
}

/* Prestige Panel */
.prestige-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    background: linear-gradient(135deg, #1a2a4a 0%, #0d1a30 100%);
    border: 3px solid #ffcc44;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(255, 204, 68, 0.3);
    z-index: 1000;
    overflow-y: auto;
}

.prestige-header {
    background: linear-gradient(135deg, #ffcc44, #ff9900);
    color: #1a1a2e;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.prestige-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.prestige-content {
    padding: 20px;
}

.prestige-info {
    margin-bottom: 20px;
}

.prestige-info p {
    color: #aaccff;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.prestige-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: grid;
    gap: 10px;
}

.prestige-stats div {
    display: flex;
    justify-content: space-between;
    color: #88aacc;
}

.prestige-stats span {
    color: #ffcc44;
    font-weight: 600;
}

#prestige-your-stones {
    color: #44ff88;
}

.prestige-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffcc44, #ff9900);
    color: #1a1a2e;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.prestige-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 204, 68, 0.4);
}

.prestige-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

/* Prestige Material Requirements */
.prestige-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.prestige-requirements-title {
    font-weight: bold;
    color: #ffcc44;
    margin: 15px 0 10px;
    font-size: 1rem;
}

.prestige-requirements {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 15px;
}

.prestige-material {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(50, 50, 80, 0.5);
    border-radius: 6px;
    border-left: 3px solid #666;
    transition: all 0.2s;
}

.prestige-material.has-enough {
    border-left-color: #44ff88;
    background: rgba(68, 255, 136, 0.1);
}

.prestige-material.not-enough {
    border-left-color: #ff4466;
    background: rgba(255, 68, 102, 0.1);
}

.prestige-material .mat-emoji {
    font-size: 1.3rem;
}

.prestige-material .mat-name {
    flex: 1;
    font-weight: 500;
    color: #ddd;
}

.prestige-material .mat-count {
    font-weight: bold;
    font-family: monospace;
}

.prestige-material.has-enough .mat-count {
    color: #44ff88;
}

.prestige-material.not-enough .mat-count {
    color: #ff6666;
}

/* Rebirth Section */
.rebirth-section {
    margin-top: 20px;
    padding-top: 20px;
}

.rebirth-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #aa88ff, transparent);
    margin-bottom: 20px;
}

.rebirth-section h3 {
    color: #aa88ff;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.rebirth-info {
    text-align: center;
    margin-bottom: 15px;
}

.rebirth-info p {
    margin: 8px 0;
    color: #aaa;
    font-size: 0.9rem;
}

.rebirth-ready {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffcc44;
    animation: rebirth-glow 2s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes rebirth-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 204, 68, 0.5); }
    50% { text-shadow: 0 0 25px rgba(255, 204, 68, 0.8), 0 0 40px rgba(170, 136, 255, 0.5); }
}

.rebirth-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 10px;
}

.rebirth-icon {
    font-size: 1.5rem;
}

.rebirth-reward {
    color: #ffcc44;
    font-weight: bold;
}

.rebirth-current {
    color: #aa88ff;
    font-weight: bold;
}

.rebirth-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #aa88ff, #8855dd);
    color: #fff;
    border: 2px solid #aa88ff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.rebirth-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 5px 25px rgba(170, 136, 255, 0.5);
    background: linear-gradient(135deg, #bb99ff, #9966ee);
}

.rebirth-btn:disabled {
    background: #333;
    color: #666;
    border-color: #444;
    cursor: not-allowed;
}

/* Rebirth Progress Bar */
.rebirth-progress-container {
    margin: 15px 0;
}

.rebirth-progress-bar {
    height: 20px;
    background: #1a1a2e;
    border-radius: 10px;
    border: 2px solid #444;
    overflow: hidden;
    margin-bottom: 8px;
}

.rebirth-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6644aa, #aa88ff);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.rebirth-progress-text {
    font-size: 0.9rem;
    color: #aa88ff;
    font-weight: 600;
}

/* Rebirth Unlocks Preview */
.rebirth-unlocks {
    margin-top: 15px;
    padding: 12px;
    background: rgba(170, 136, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(170, 136, 255, 0.3);
}

.rebirth-unlocks-title {
    font-weight: bold;
    color: #aa88ff;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1rem;
}

.rebirth-unlock-item {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    margin: 5px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-left: 3px solid #666;
    color: #888;
    font-size: 0.9rem;
}

.rebirth-unlock-item.unlocked {
    border-left-color: #44ff88;
    color: #44ff88;
    background: rgba(68, 255, 136, 0.1);
}

.rebirth-unlock-item .unlock-req {
    font-weight: bold;
    color: #aa88ff;
    min-width: 90px;
}

.rebirth-unlock-item.unlocked .unlock-req {
    color: #44ff88;
}

/* Achievements Panel */
.achievements-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    border-left: 3px solid #9944ff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    transform: translateX(500px);
    transition: transform 0.3s ease-out;
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.achievements-panel.open {
    transform: translateX(0);
}

.achievements-header {
    background: linear-gradient(135deg, #9944ff, #6600cc);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #9944ff;
    flex-shrink: 0;
}

.achievements-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 5px;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.achievements-list {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.achievement-item {
    background: #223344;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: all 0.2s;
}

.achievement-item.unlocked {
    background: #2a4a3a;
    border-color: #66cc66;
    box-shadow: 0 0 15px rgba(102, 204, 102, 0.3);
}

.achievement-item:hover {
    border-color: #88aaff;
}

.achievement-item-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.achievement-item-content {
    flex: 1;
    text-align: left;
}

.achievement-item-name {
    font-weight: bold;
    color: #ffdd44;
    margin-bottom: 5px;
}

.achievement-item-desc {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 8px;
}

.achievement-item-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievement-progress-bar {
    flex: 1;
    height: 8px;
    background: #1a1a2e;
    border-radius: 4px;
    overflow: hidden;
}

.achievement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #66cc66, #88ff88);
    transition: width 0.3s ease;
}

.achievement-progress-text {
    font-size: 0.85rem;
    color: #aaa;
    min-width: 35px;
}

.achievement-item.unlocked .achievement-progress-fill {
    background: linear-gradient(90deg, #ffdd44, #ffff88);
    box-shadow: 0 0 10px rgba(255, 221, 68, 0.5);
}

@media (max-width: 768px) {
    .achievements-panel {
        width: 100%;
        max-width: 100vw;
        left: 0;
        right: 0;
        transform: translateY(100%);
        bottom: 0;
        top: auto;
        height: auto;
        max-height: 80vh;
        border-left: none;
        border-top: 3px solid #9944ff;
        border-radius: 15px 15px 0 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .achievements-panel.open {
        transform: translateY(0);
    }
    
    .achievements-list {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .achievement-item {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    #achievements-btn {
        top: auto;
        bottom: 20px;
    }
}

/* Activity Log Panel */
.activity-log-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 350px;
    height: 400px;
    background: #0a1a2a;
    border: 2px solid #4477ff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    z-index: 9998;
    box-shadow: 0 0 20px rgba(68, 119, 255, 0.3);
}

.activity-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 2px solid #4477ff;
    background: #0f2540;
}

.activity-log-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #4477ff;
}

.activity-log-header .close-btn {
    background: none;
    border: none;
    color: #4477ff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.activity-log-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    font-size: 0.85rem;
}

.activity-entry {
    padding: 8px 12px;
    border-bottom: 1px solid #1a3a5a;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: background 0.2s;
}

.activity-entry:hover {
    background: #1a3a5a;
}

.activity-time {
    color: #88aaff;
    font-weight: bold;
    min-width: 75px;
}

.activity-message {
    color: #ddd;
    flex: 1;
    text-align: left;
}

.activity-click {
    background: rgba(136, 170, 255, 0.05);
}

.activity-purchase {
    background: rgba(102, 204, 102, 0.05);
}

.activity-purchase .activity-message {
    color: #66cc66;
}

.activity-achievement {
    background: rgba(255, 221, 68, 0.05);
}

.activity-achievement .activity-message {
    color: #ffdd44;
}

.activity-dev {
    background: rgba(255, 102, 102, 0.05);
}

.activity-dev .activity-message {
    color: #ff6666;
}

.activity-action {
    background: rgba(136, 170, 255, 0.05);
}

/* Active Players Panel (Dev) */
.active-players-panel {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 380px;
    max-height: 500px;
    background: linear-gradient(135deg, #0a1a2a 0%, #0d2520 100%);
    border: 2px solid #66cc66;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 9998;
    box-shadow: 0 0 25px rgba(102, 204, 102, 0.4);
    overflow: hidden;
}

.active-players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 2px solid #66cc66;
    background: linear-gradient(135deg, #132a1a 0%, #1a3a2a 100%);
}

.active-players-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #66cc66;
}

.active-players-header .close-btn {
    background: none;
    border: none;
    color: #66cc66;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: transform 0.2s;
}

.active-players-header .close-btn:hover {
    transform: scale(1.2);
}

.active-players-content {
    flex: 1;
    overflow-y: auto;
    font-size: 0.9rem;
}

/* Summary Stats */
.active-players-summary {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background: rgba(102, 204, 102, 0.1);
    border-bottom: 1px solid #2a4a3a;
}

.active-players-summary.error {
    justify-content: center;
    color: #ff6666;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.summary-label {
    font-size: 0.75rem;
    color: #88aa88;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #66cc66;
}

.summary-value.active-count {
    color: #88ff88;
    text-shadow: 0 0 10px rgba(136, 255, 136, 0.5);
}

/* Players List */
.active-players-list {
    padding: 8px 0;
}

.active-player-entry {
    padding: 10px 12px;
    border-bottom: 1px solid #1a3a2a;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.active-player-entry:hover {
    background: rgba(102, 204, 102, 0.1);
}

.active-player-entry.empty {
    justify-content: center;
    color: #666;
    padding: 20px;
}

.player-rank {
    font-size: 0.8rem;
    font-weight: bold;
    color: #66cc66;
    min-width: 28px;
    text-align: center;
}

.player-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.player-status.status-active {
    background: #44ff44;
    box-shadow: 0 0 8px rgba(68, 255, 68, 0.8);
    animation: pulse-active 1.5s ease-in-out infinite;
}

.player-status.status-idle {
    background: #ffaa44;
    box-shadow: 0 0 5px rgba(255, 170, 68, 0.5);
}

@keyframes pulse-active {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.player-details {
    flex: 1;
    min-width: 0;
}

.player-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.active-player-name {
    font-weight: bold;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-prestige {
    font-size: 0.75rem;
    color: #ffcc44;
    background: rgba(255, 204, 68, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.player-stats-row {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: #888;
    flex-wrap: wrap;
}

.player-stat {
    white-space: nowrap;
}

.player-activity {
    font-size: 0.7rem;
    color: #666;
    margin-top: 3px;
}

.active-player-name {
    color: #ddd;
    text-align: left;
    font-family: monospace;
}

.active-players-summary {
    padding: 8px 12px;
    border-bottom: 1px solid #1a3a5a;
    color: #66cc66;
    font-weight: bold;
    text-align: left;
}

@media (max-width: 768px) {
    .activity-log-panel {
        width: 100%;
        height: 250px;
        right: 0;
        bottom: 0;
        border-radius: 10px 10px 0 0;
    }
}

/* Leaderboard Panel */
.leaderboard-panel {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    max-height: 80vh;
    background: #0a1a2a;
    border: 2px solid #ffdd44;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    z-index: 9998;
    box-shadow: 0 0 20px rgba(255, 221, 68, 0.3);
    overflow: hidden;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 2px solid #ffdd44;
    background: #1a3a2a;
}

.leaderboard-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #ffdd44;
}

.leaderboard-header .close-btn {
    background: none;
    border: none;
    color: #ffdd44;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.leaderboard-tabs {
    display: flex;
    background: #0d2818;
    border-bottom: 2px solid #1a3a2a;
}

.leaderboard-tab {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: #1a3a2a;
    color: #88aa88;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.leaderboard-tab:first-child {
    border-right: 1px solid #0d2818;
}

.leaderboard-tab:hover {
    background: #2a4a3a;
    color: #aaccaa;
}

.leaderboard-tab.active {
    background: #2a5a3a;
    color: #ffdd44;
    border-bottom: 2px solid #ffdd44;
    margin-bottom: -2px;
}

.leaderboard-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.leaderboard-player-rank {
    padding: 12px 15px;
    background: linear-gradient(135deg, #3a5a3a 0%, #2a4a2a 100%);
    border-bottom: 1px solid #4a6a4a;
    text-align: center;
    color: #aaffaa;
    font-size: 0.95rem;
}

.leaderboard-player-rank strong {
    color: #ffdd44;
    font-size: 1.1rem;
}

.leaderboard-reset-timer {
    padding: 10px 15px;
    background: linear-gradient(135deg, #2a4a6a 0%, #1a3a5a 100%);
    border-bottom: 1px solid #3a5a7a;
    text-align: center;
    color: #aaccff;
    font-size: 0.9rem;
}

.leaderboard-reset-timer strong {
    color: #ffdd44;
}

.leaderboard-entry {
    padding: 12px 15px;
    border-bottom: 1px solid #1a3a5a;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.leaderboard-entry:hover {
    background: #1a3a5a;
}

.leaderboard-entry.current-player {
    background: rgba(255, 221, 68, 0.1);
    border-left: 3px solid #ffdd44;
    padding-left: 12px;
}

.leaderboard-entry.gold {
    background: rgba(255, 215, 0, 0.05);
}

.leaderboard-entry.silver {
    background: rgba(192, 192, 192, 0.05);
}

.leaderboard-entry.bronze {
    background: rgba(205, 127, 50, 0.05);
}

.leaderboard-rank {
    font-weight: bold;
    min-width: 35px;
    color: #ffdd44;
    font-size: 0.9rem;
}

.leaderboard-rank.rank-1, .leaderboard-rank.gold { color: #ffd700; font-size: 1.1rem; }
.leaderboard-rank.rank-2, .leaderboard-rank.silver { color: #c0c0c0; }
.leaderboard-rank.rank-3, .leaderboard-rank.bronze { color: #cd7f32; }

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

.leaderboard-name {
    font-weight: bold;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.leaderboard-stats {
    font-size: 0.75rem;
    color: #88aaff;
    white-space: nowrap;
}

.leaderboard-score {
    text-align: right;
    color: #66cc66;
    font-weight: bold;
    min-width: 96px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.leaderboard-empty {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* Aggregate stats for all-time leaderboard */
.leaderboard-aggregate-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #1a2a4a, #0a1a2a);
    border-bottom: 1px solid #2a4a6a;
    font-size: 0.85rem;
    color: #aaccff;
}

.leaderboard-aggregate-stats span {
    cursor: help;
}

/* Hall of Fame styling for top 3 in all-time */
.leaderboard-entry.hall-of-fame {
    position: relative;
    padding: 14px 15px;
}

.leaderboard-entry.hall-of-fame.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    margin: 4px 0;
}

.leaderboard-entry.hall-of-fame.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12), rgba(192, 192, 192, 0.04));
    border: 1px solid rgba(192, 192, 192, 0.25);
    border-radius: 6px;
    margin: 3px 0;
}

.leaderboard-entry.hall-of-fame.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.03));
    border: 1px solid rgba(205, 127, 50, 0.2);
    border-radius: 5px;
    margin: 2px 0;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 4px;
}

.tier-badge.tier-0 { background: #333; color: #888; }
.tier-badge.tier-1 { background: #3a3a2a; color: #998; }
.tier-badge.tier-2 { background: #2a3a2a; color: #8a8; }
.tier-badge.tier-3 { background: #3a2a1a; color: #c85; }
.tier-badge.tier-4 { background: #2a2a3a; color: #88a; }
.tier-badge.tier-5 { background: #4a3a1a; color: #db7; }
.tier-badge.tier-6 { background: #3a3a4a; color: #aab; }
.tier-badge.tier-7 { background: #1a3a4a; color: #4cc; }
.tier-badge.tier-8 { background: #3a2a4a; color: #a8f; }
.tier-badge.tier-9 { background: #2a1a3a; color: #f8a; }
.tier-badge.tier-10 { 
    background: linear-gradient(135deg, #2a1a4a, #1a2a4a); 
    color: #fff; 
    animation: cosmic-glow 2s ease-in-out infinite;
}

@keyframes cosmic-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(138, 43, 226, 0.5); }
    50% { box-shadow: 0 0 10px rgba(138, 43, 226, 0.8), 0 0 15px rgba(0, 191, 255, 0.4); }
}

@media (max-width: 768px) {
    .leaderboard-panel {
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 80px;
        transform: none;
        width: auto;
        max-height: 300px;
    }
}

/* ===============================
   NEW UPGRADE MECHANICS STYLES
   =============================== */

/* Critical Hit Animation */
@keyframes critPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -80%) scale(1);
        opacity: 0;
    }
}

/* Gem Found Animation */
@keyframes gemPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.4) rotate(15deg);
    }
    100% {
        transform: translate(-50%, -100%) scale(1) rotate(-5deg);
        opacity: 0;
    }
}

/* Offline Earnings Notification */
.offline-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #2a1a4a, #1a2a3a);
    border: 3px solid #9944ff;
    border-radius: 15px;
    padding: 25px;
    max-width: 400px;
    box-shadow: 0 0 40px rgba(153, 68, 255, 0.6);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease-out;
}

.offline-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.offline-content {
    display: flex;
    gap: 20px;
    align-items: center;
    color: #fff;
}

.offline-icon {
    font-size: 3rem;
}

.offline-text {
    text-align: left;
}

.offline-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffdd44;
    margin-bottom: 8px;
}

.offline-amount {
    font-size: 1.1rem;
    color: #66cc66;
}

/* Combo Display */
#combo-display {
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
}

/* Time Warp Button States */
#time-warp-btn:hover {
    box-shadow: 0 0 20px rgba(153, 68, 255, 0.5);
}

#time-warp-btn:active {
    box-shadow: 0 0 10px rgba(153, 68, 255, 0.3);
}

/* Category badges for upgrades */
.upgrade-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 5px;
}

.upgrade-category.power { background: #ff4444; }
.upgrade-category.production { background: #44ff44; color: #000; }
.upgrade-category.crit { background: #ff8800; }
.upgrade-category.combo { background: #ffaa00; color: #000; }
.upgrade-category.gem { background: #00ccff; color: #000; }
.upgrade-category.synergy { background: #aa44ff; }
.upgrade-category.offline { background: #4477ff; }
.upgrade-category.amplifier { background: #ff44aa; }
.upgrade-category.auto { background: #44ffaa; color: #000; }
.upgrade-category.timewarp { background: #9944ff; }
.upgrade-category.prestige { background: #ffdd44; color: #000; }
.upgrade-category.rare { 
    background: linear-gradient(135deg, #ff4444, #ffaa00, #44ff44, #00ccff, #aa44ff);
    animation: rareShine 2s infinite;
}

@keyframes rareShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* Time Warp active screen effect */
.time-warp-active {
    animation: timeWarpPulse 0.5s infinite alternate;
}

@keyframes timeWarpPulse {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(30deg); }
}

/* ============ GEM SHOP ============ */
.gem-shop-panel {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #00d4ff;
    border-radius: 15px;
    padding: 20px;
    z-index: 10000;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.gem-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00d4ff;
}

.gem-shop-header h2 {
    margin: 0;
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
}

.gem-balance {
    background: linear-gradient(135deg, #9933ff, #6600cc);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
}

.gem-shop-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gem-shop-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #444;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s;
}

.gem-shop-item:hover {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.gem-item-icon {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
}

.gem-item-info {
    flex: 1;
    text-align: left;
}

.gem-item-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.gem-item-desc {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 6px;
}

.gem-item-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.gem-item-type.permanent {
    background: #44ff44;
    color: #000;
}

.gem-item-type.temporary {
    background: #ffaa00;
    color: #000;
}

.gem-item-type.instant {
    background: #00d4ff;
    color: #000;
}

.gem-item-type.nextPrestige {
    background: #aa55ff;
    color: #fff;
}

.gem-item-pending {
    color: #aa88ff;
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 600;
}

.gem-item-buy {
    background: linear-gradient(135deg, #9933ff, #6600cc);
    border: 2px solid #aa55ff;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.gem-item-buy:hover:not(.disabled) {
    background: linear-gradient(135deg, #aa44ff, #7700dd);
    transform: scale(1.05);
}

.gem-item-buy.disabled {
    background: #444;
    border-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============ MOBILE RESPONSIVE FIXES ============ */
@media (max-width: 768px) {
    /* Prevent horizontal scroll and overflow issues */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Gem Shop mobile fixes */
    .gem-shop-panel {
        width: 95%;
        max-width: none;
        max-height: 75vh;
        top: auto;
        bottom: 0;
        left: 2.5%;
        right: 2.5%;
        transform: translateX(0);
        margin: 0;
        border-radius: 15px 15px 0 0;
        position: fixed;
        width: 95%;
    }

    .gem-shop-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .gem-shop-header h2 {
        font-size: 1.2rem;
    }

    .gem-balance {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .gem-shop-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .gem-item-icon {
        font-size: 2rem;
        min-width: 50px;
    }

    .gem-item-info {
        flex: 1 1 60%;
        min-width: 150px;
    }

    .gem-item-buy {
        width: 100%;
        margin-top: 5px;
    }

    /* Time warp button mobile fix */
    #time-warp-btn {
        bottom: 70px !important;
        right: 10px !important;
        left: auto !important;
        top: auto !important;
        padding: 10px 15px !important;
        font-size: 0.85rem !important;
        position: fixed !important;
        transform: none !important;
    }
    
    #time-warp-btn:hover,
    #time-warp-btn:active {
        transform: none !important;
    }

    /* Leaderboard panel mobile fix */
    .leaderboard-panel {
        width: 95% !important;
        max-width: none !important;
        left: 2.5% !important;
        right: 2.5% !important;
        top: auto !important;
        bottom: 0 !important;
        transform: none !important;
        max-height: 70vh !important;
        border-radius: 15px 15px 0 0 !important;
    }

    /* Activity log mobile fix */
    .activity-log-panel {
        width: calc(100% - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        height: 300px !important;
    }

    /* Active players panel mobile fix */
    .active-players-panel {
        width: 95% !important;
        left: 2.5% !important;
        right: 2.5% !important;
    }

    /* Burger menu positioning */
    .burger-menu {
        top: 10px;
        right: 10px;
    }

    /* Stats layout */
    .stats {
        font-size: 1.1rem;
    }

    /* Upgrade shop grid */
    .upgrade-shop {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #time-warp-btn {
        bottom: 60px !important;
        right: 5px !important;
        left: auto !important;
        top: auto !important;
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        transform: none !important;
    }
    
    #time-warp-btn:hover,
    #time-warp-btn:active {
        transform: none !important;
    }

    .gem-shop-panel {
        max-height: 70vh;
        padding: 15px;
    }

    .gem-item-name {
        font-size: 1rem;
    }

    .gem-item-desc {
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    #mine-area {
        font-size: 80px;
    }
}

/* ===== AUTH MODAL STYLES ===== */
.burger-menu-divider {
    border: none;
    border-top: 1px solid #444;
    margin: 8px 0;
}

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: #1a2a3a;
    border: 2px solid #3366ff;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.auth-modal-content .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #333;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #888;
    padding: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: #fff;
}

.auth-tab.active {
    color: #3366ff;
    border-bottom: 2px solid #3366ff;
    margin-bottom: -2px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    margin-bottom: 5px;
    color: #aaa;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px;
    border: 2px solid #333;
    border-radius: 6px;
    background: #0a1520;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3366ff;
}

.auth-submit {
    background: #3366ff;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.auth-submit:hover {
    background: #4477ff;
}

.auth-error {
    background: #441111;
    border: 1px solid #ff4444;
    color: #ff6666;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.auth-success {
    background: #114411;
    border: 1px solid #44ff44;
    color: #66ff66;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.logged-in-view {
    text-align: center;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.user-avatar {
    font-size: 2rem;
}

.user-name {
    font-size: 1.3rem;
    color: #ffdd44;
    font-weight: bold;
}

.cloud-save-status {
    color: #66ff66;
    margin-bottom: 20px;
}

.logout-btn {
    background: #cc3333;
}

.logout-btn:hover {
    background: #dd4444;
}

.register-info {
    background: linear-gradient(135deg, #2a3a5a 0%, #1a2a4a 100%);
    border: 1px solid #4466aa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    color: #88aaff;
    font-size: 1rem;
}

/* Mobile auth modal */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Dev menu items */
.burger-menu-item.dev-item {
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.burger-menu-item.dev-item:hover {
    background: rgba(255, 170, 0, 0.2);
}

.burger-menu-item.dev-item.dev-danger {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border-top: 1px solid rgba(255, 68, 68, 0.3);
    margin-top: 5px;
}

.burger-menu-item.dev-item.dev-danger:hover {
    background: rgba(255, 68, 68, 0.25);
}

.dev-divider {
    border-color: #ffaa00;
}

/* ============ QUESTS PANEL ============ */
.quests-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a2a3a 0%, #0a1520 100%);
    border: 3px solid #ffaa00;
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    z-index: 10000;
    box-shadow: 0 0 40px rgba(255, 170, 0, 0.4);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.quests-header {
    background: linear-gradient(135deg, #ffaa00, #ff6600);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ffaa00;
}

.quests-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.quests-rock-info {
    background: linear-gradient(135deg, #2a3a4a 0%, #1a2530 100%);
    padding: 15px;
    border-bottom: 2px solid #334455;
}

.current-rock {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.rock-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px var(--rock-glow, #888));
}

.rock-details {
    flex: 1;
}

.rock-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffdd44;
}

.rock-mult {
    color: #88ff88;
    font-size: 1rem;
}

.next-rock-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 170, 0, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    color: #ffaa00;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.next-rock-info.max-reached {
    justify-content: center;
    color: #ffdd44;
    background: rgba(255, 221, 68, 0.15);
}

.quests-needed {
    color: #88aaff;
}

.quests-completed {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.quests-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.quest-card {
    background: #223344;
    border: 2px solid #445566;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: all 0.2s;
}

.quest-card:hover {
    border-color: #ffaa00;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.2);
}

.quest-icon {
    font-size: 2rem;
    min-width: 40px;
    text-align: center;
}

.quest-info {
    flex: 1;
}

.quest-name {
    font-weight: bold;
    color: #ffdd44;
    font-size: 1rem;
    margin-bottom: 3px;
}

.quest-desc {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.quest-progress-bar {
    height: 8px;
    background: #111;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffaa00, #ff6600);
    border-radius: 4px;
    transition: width 0.3s;
}

.quest-progress-text {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
}

.no-quests {
    text-align: center;
    color: #888;
    padding: 30px;
}

/* Quest complete notification */
.quest-complete-notification {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #2a4a3a 0%, #1a3a2a 100%);
    border: 3px solid #44ff44;
    border-radius: 15px;
    padding: 15px 25px;
    z-index: 20000;
    box-shadow: 0 0 30px rgba(68, 255, 68, 0.4);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.quest-complete-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.quest-complete-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quest-complete-icon {
    font-size: 2.5rem;
}

.quest-complete-title {
    font-size: 1rem;
    color: #44ff44;
    font-weight: bold;
}

.quest-complete-name {
    font-size: 1.2rem;
    color: #ffffff;
}

/* Rock upgrade notification */
.rock-upgrade-notification {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: linear-gradient(135deg, #3a2a1a 0%, #2a1a0a 100%);
    border: 4px solid #ffaa00;
    border-radius: 20px;
    padding: 25px 35px;
    z-index: 20000;
    box-shadow: 0 0 50px rgba(255, 170, 0, 0.6);
    opacity: 0;
    transition: all 0.4s ease-out;
}

.rock-upgrade-notification.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.rock-upgrade-content {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.rock-upgrade-icon {
    font-size: 4rem;
    animation: rockPulse 1s ease-in-out infinite;
}

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

.rock-upgrade-title {
    font-size: 1.1rem;
    color: #ffaa00;
    font-weight: bold;
}

.rock-upgrade-name {
    font-size: 1.6rem;
    color: #ffffff;
    font-weight: bold;
}

.rock-upgrade-bonus {
    font-size: 1.2rem;
    color: #88ff88;
}

/* Mine area rock glow based on current rock */
#mine-area[data-rock="granite"] { text-shadow: 0 0 30px #666; }
#mine-area[data-rock="marble"] { text-shadow: 0 0 30px #eee; }
#mine-area[data-rock="obsidian"] { text-shadow: 0 0 30px #444, 0 0 60px #222; }
#mine-area[data-rock="crystal"] { text-shadow: 0 0 40px #88ffff, 0 0 80px #44aaaa; }
#mine-area[data-rock="ruby"] { text-shadow: 0 0 40px #ff4444, 0 0 80px #aa0000; }
#mine-area[data-rock="sapphire"] { text-shadow: 0 0 40px #4444ff, 0 0 80px #0000aa; }
#mine-area[data-rock="emerald"] { text-shadow: 0 0 40px #44ff44, 0 0 80px #00aa00; }
#mine-area[data-rock="diamond"] { text-shadow: 0 0 50px #ffffff, 0 0 100px #aaaaff; }
#mine-area[data-rock="cosmic"] { 
    text-shadow: 0 0 50px #ffaa00, 0 0 100px #ff6600;
    animation: cosmicPulse 2s ease-in-out infinite;
}

@keyframes cosmicPulse {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(30deg) brightness(1.2); }
}

/* Mobile quests panel */
@media (max-width: 768px) {
    .quests-panel {
        width: 95%;
        max-height: 85vh;
    }
}

/* ============ MINERS & BOTS PANEL ============ */
.miners-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    border: 3px solid #ffaa00;
    border-radius: 20px;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 0 30px rgba(255, 170, 0, 0.4);
    overflow: hidden;
}

.miners-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffaa00;
}

.miners-header h2 {
    margin: 0;
    color: #ffaa00;
    font-size: 1.5rem;
}

.miners-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.miners-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: #ddd;
    font-size: 0.9rem;
}

.miners-stat-value {
    color: #ffaa00;
    font-weight: bold;
}

.miners-scene {
    position: relative;
    width: 100%;
    height: 250px;
    background: linear-gradient(to bottom, #1a1a2e 0%, #2a2a3e 60%, #3a2a1e 100%);
    border-radius: 15px;
    overflow: hidden;
}

.miners-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, #4a3a2a 0%, #3a2a1a 100%);
    border-radius: 0 0 15px 15px;
}

.miners-ground::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #5a4a3a, #6a5a4a, #5a4a3a);
}

.miners-rock {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    filter: drop-shadow(0 0 20px rgba(255, 170, 0, 0.5));
    animation: rockBounce 0.5s ease-in-out infinite;
    z-index: 50;
    display: none; /* Hide main rock, using scattered rocks now */
}

.small-rock {
    position: absolute;
    transform: translateX(-50%);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s;
}

.small-rock:hover {
    transform: translateX(-50%) scale(1.1);
}

@keyframes rockBounce {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(0.95); }
}

.miner-figure {
    position: absolute;
    font-size: 1.8rem;
    transform: translateX(-50%);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    cursor: default;
    user-select: none;
    transition: left 0.1s linear, top 0.1s linear;
}

/* Mining animation - swinging pickaxe */
.miner-figure.mining {
    animation: minerMining 0.4s ease-in-out infinite;
}

.miner-figure.mining::after {
    content: '⛏️';
    position: absolute;
    font-size: 0.8rem;
    top: -5px;
    right: -15px;
    animation: pickaxeSwing 0.4s ease-in-out infinite;
}

/* Walking animation - bobbing motion */
.miner-figure.walking {
    animation: minerWalking 0.3s ease-in-out infinite;
}

.miner-figure.walking::after {
    content: '';
}

@keyframes minerMining {
    0%, 100% { 
        transform: translateX(-50%) rotate(-10deg);
    }
    50% { 
        transform: translateX(-50%) rotate(10deg);
    }
}

@keyframes minerWalking {
    0%, 100% { 
        transform: translateX(-50%) translateY(0);
    }
    50% { 
        transform: translateX(-50%) translateY(-4px);
    }
}

@keyframes minerSwing {
    0%, 100% { 
        transform: translateX(-50%) rotate(-15deg);
    }
    50% { 
        transform: translateX(-50%) rotate(15deg) translateY(-5px);
    }
}

@keyframes pickaxeSwing {
    0%, 100% { transform: rotate(-30deg); }
    50% { transform: rotate(30deg); }
}

.no-miners-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    text-align: center;
    font-size: 0.9rem;
    padding: 20px;
}

/* Mobile miners panel */
@media (max-width: 768px) {
    .miners-panel {
        width: 95%;
        max-height: 85vh;
    }
    
    .miners-scene {
        height: 200px;
    }
    
    .miner-figure {
        font-size: 1.4rem;
    }
    
    .miners-rock {
        font-size: 3rem;
    }
}

/* ========== SELL UPGRADES PANEL ========== */
.sell-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-width: 95%;
    max-height: 80vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 3px solid #ff6644;
    border-radius: 15px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(255, 102, 68, 0.4);
    overflow: hidden;
}

.sell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff6644, #cc4422);
    border-bottom: 2px solid #ff6644;
}

.sell-header h2 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.sell-info {
    padding: 10px 20px;
    margin: 0;
    background: rgba(255, 102, 68, 0.1);
    color: #ffaa88;
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 1px solid #333;
}

.sell-content {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(80vh - 120px);
}

.sell-empty {
    text-align: center;
    color: #888;
    padding: 30px;
    font-size: 1rem;
}

.sell-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #223344;
    border: 2px solid #444;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.sell-item:hover {
    border-color: #ff6644;
    background: #2a3a4a;
}

.sell-item-info {
    flex: 1;
    text-align: left;
}

.sell-item-name {
    font-weight: bold;
    color: #ffdd44;
    margin-bottom: 4px;
}

.sell-item-owned {
    font-size: 0.85rem;
    color: #aaa;
}

.sell-item-btn {
    background: linear-gradient(135deg, #ff6644, #cc4422);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sell-item-btn:hover {
    background: linear-gradient(135deg, #ff7755, #dd5533);
    box-shadow: 0 0 10px rgba(255, 102, 68, 0.5);
}

@media (max-width: 768px) {
    .sell-panel {
        width: 95%;
        max-width: none;
        top: auto;
        bottom: 0;
        left: 2.5%;
        right: 2.5%;
        transform: none;
        max-height: 70vh;
        border-radius: 15px 15px 0 0;
    }
    
    .sell-content {
        max-height: calc(70vh - 120px);
    }
}

/* Crafting Panel */
.crafting-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a2a3a 0%, #0d1a2a 100%);
    border: 2px solid #4488ff;
    border-radius: 15px;
    padding: 20px;
    z-index: 1000;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(68, 136, 255, 0.3);
}

.crafting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a4a5a;
}

.crafting-header h2 {
    color: #ffcc44;
    margin: 0;
}

.crafting-section {
    margin-bottom: 20px;
}

.crafting-section h3 {
    color: #88aaff;
    margin: 0 0 10px 0;
    font-size: 1rem;
}

/* Materials Grid */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.material-item {
    background: #223344;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.material-item:hover {
    background: #2a4055;
}

.material-emoji {
    font-size: 1.5rem;
}

.material-name {
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
}

.material-count {
    font-size: 1rem;
    font-weight: bold;
}

/* Crafting Bonuses */
.crafting-bonuses {
    background: #223344;
    border-radius: 8px;
    padding: 10px;
}

.crafting-bonuses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.crafting-bonuses-list span {
    background: #1a2a3a;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #88ff88;
}

.crafting-bonuses-list .no-bonuses {
    color: #888;
}

/* Recipe Cards */
.recipe-category {
    margin-bottom: 20px;
}

.recipe-category h3 {
    color: #ffcc44;
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #3a4a5a;
    padding-bottom: 5px;
}

.crafting-recipes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recipe-card {
    background: #223344;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s;
}

.recipe-card:hover {
    background: #2a4055;
}

.recipe-card.craftable {
    border-color: #44ff88;
    box-shadow: 0 0 10px rgba(68, 255, 136, 0.2);
}

.recipe-card.maxed {
    opacity: 0.6;
    border-color: #666;
}

.recipe-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.recipe-icon {
    font-size: 1.5rem;
}

.recipe-name {
    font-weight: bold;
    color: #fff;
    flex: 1;
}

.recipe-count {
    color: #88aaff;
    font-size: 0.85rem;
}

.recipe-desc {
    color: #88ff88;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.recipe-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.recipe-material {
    background: #1a2a3a;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.recipe-material.enough {
    color: #44ff88;
}

.recipe-material.not-enough {
    color: #ff6644;
}

.craft-btn {
    background: linear-gradient(135deg, #4488ff, #2266dd);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.craft-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #55aaff, #3377ee);
    box-shadow: 0 0 10px rgba(68, 136, 255, 0.5);
}

.craft-btn:disabled {
    background: #444;
    cursor: not-allowed;
}

/* Material Drop Notification */
.material-drop-notification {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #223344, #1a2a3a);
    border: 2px solid #4488ff;
    border-radius: 10px;
    padding: 10px 20px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.material-drop-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.material-drop-text {
    color: #88ff88;
    font-weight: bold;
}

/* Craft Success Notification */
.craft-success-notification {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: linear-gradient(135deg, #2a4a3a, #1a3a2a);
    border: 2px solid #44ff88;
    border-radius: 15px;
    padding: 20px 30px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.craft-success-notification.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.craft-success-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.craft-success-icon {
    font-size: 2.5rem;
}

.craft-success-text {
    color: #88ff88;
    font-size: 1.2rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .crafting-panel {
        width: 95%;
        max-width: none;
        top: auto;
        bottom: 0;
        left: 2.5%;
        right: 2.5%;
        transform: none;
        max-height: 80vh;
        border-radius: 15px 15px 0 0;
    }
    
    .materials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Daily Rewards Panel */
.daily-rewards-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2a1a3a 0%, #1a0d2a 100%);
    border: 2px solid #aa44ff;
    border-radius: 15px;
    padding: 20px;
    z-index: 1000;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(170, 68, 255, 0.3);
}

.daily-rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #5a3a7a;
}

.daily-rewards-header h2 {
    color: #ffcc44;
    margin: 0;
}

/* Streak Display */
.daily-streak-info {
    text-align: center;
    margin-bottom: 20px;
}

.streak-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.streak-flame {
    font-size: 2rem;
    animation: flame-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes flame-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.streak-count {
    font-size: 3rem;
    font-weight: bold;
    color: #ffaa44;
    text-shadow: 0 0 20px rgba(255, 170, 68, 0.5);
}

.streak-label {
    font-size: 1rem;
    color: #aaa;
}

.streak-stats {
    font-size: 0.85rem;
    color: #888;
}

/* Reward Preview */
.daily-reward-preview {
    background: #223344;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.reward-day-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffcc44;
    margin-bottom: 15px;
}

.reward-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.reward-item {
    background: #1a2a3a;
    border: 1px solid #3a4a5a;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.reward-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.reward-amount {
    font-size: 1rem;
    font-weight: bold;
    color: #88ff88;
}

.reward-label {
    font-size: 0.7rem;
    color: #888;
}

/* Claim Button */
.claim-daily-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ffaa44, #ff6644);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    animation: claim-pulse 1s ease-in-out infinite;
}

@keyframes claim-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 170, 68, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 170, 68, 0.8); }
}

.claim-daily-btn:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #ffbb55, #ff7755);
}

/* Next Reward Timer */
.next-reward-timer {
    text-align: center;
    padding: 15px;
    background: #1a2a3a;
    border-radius: 10px;
}

.timer-label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.timer-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #88aaff;
}

/* Weekly Calendar */
.weekly-calendar {
    margin-top: 15px;
}

.calendar-title {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}

.calendar-days {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.calendar-day {
    flex: 1;
    background: #1a2a3a;
    border: 2px solid #3a4a5a;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    transition: all 0.2s;
}

.calendar-day.completed {
    background: #1a3a2a;
    border-color: #44ff88;
}

.calendar-day.current {
    border-color: #ffaa44;
    box-shadow: 0 0 10px rgba(255, 170, 68, 0.5);
}

.calendar-day.weekly {
    background: linear-gradient(135deg, #2a1a3a, #1a0d2a);
    border-color: #aa44ff;
}

.day-number {
    font-size: 0.65rem;
    color: #888;
}

.day-icon {
    font-size: 1.2rem;
    margin-top: 3px;
}

/* Daily Reward Popup */
.daily-reward-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.daily-reward-popup.show {
    opacity: 1;
}

.daily-popup-content {
    background: linear-gradient(135deg, #2a1a3a 0%, #1a0d2a 100%);
    border: 3px solid #ffaa44;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 350px;
    animation: popup-bounce 0.5s ease;
}

@keyframes popup-bounce {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.popup-header {
    margin-bottom: 15px;
}

.popup-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.popup-header h2 {
    color: #ffcc44;
    margin: 0;
}

.popup-streak {
    font-size: 1.2rem;
    color: #ffaa44;
    margin-bottom: 10px;
}

.popup-bonus {
    font-size: 1rem;
    color: #88ff88;
    margin-bottom: 15px;
}

.popup-rewards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.popup-reward-item {
    background: #223344;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.popup-claim-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ffaa44, #ff6644);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.popup-claim-btn:hover {
    transform: scale(1.02);
}

.popup-later-btn {
    background: transparent;
    border: 1px solid #555;
    color: #888;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.popup-later-btn:hover {
    border-color: #888;
    color: #aaa;
}

/* Reward Claimed Notification */
.reward-claimed-notification {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: linear-gradient(135deg, #2a3a1a, #1a2a0d);
    border: 2px solid #88ff44;
    border-radius: 15px;
    padding: 20px 30px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.reward-claimed-notification.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.claimed-content {
    text-align: center;
}

.claimed-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #88ff44;
    margin-bottom: 10px;
}

.claimed-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.claimed-items span {
    background: #223344;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Reward indicator on menu button */
.reward-indicator {
    display: inline-block;
    background: #ff4444;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 50%;
    margin-left: 5px;
    animation: indicator-pulse 1s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .daily-rewards-panel {
        width: 95%;
        max-width: none;
        top: auto;
        bottom: 0;
        left: 2.5%;
        right: 2.5%;
        transform: none;
        max-height: 80vh;
        border-radius: 15px 15px 0 0;
    }
    
    .calendar-days {
        flex-wrap: wrap;
    }
    
    .calendar-day {
        min-width: calc(25% - 5px);
    }
}

/* Weekly Challenges Panel */
.weekly-challenges-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a2a3a 0%, #0d1a2a 100%);
    border: 2px solid #ffcc44;
    border-radius: 15px;
    padding: 20px;
    z-index: 1000;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(255, 204, 68, 0.3);
}

.weekly-challenges-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a3a2a;
}

.weekly-challenges-header h2 {
    color: #ffcc44;
    margin: 0;
}

/* Weekly Timer */
.weekly-timer {
    text-align: center;
    background: #223344;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
}

.weekly-timer-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.weekly-timer-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffcc44;
}

/* Challenge Cards */
.weekly-challenges-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weekly-challenge-card {
    background: #223344;
    border: 2px solid #3a4a5a;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.2s;
}

.weekly-challenge-card:hover {
    background: #2a4055;
}

.weekly-challenge-card.completed {
    border-color: #44ff88;
    background: linear-gradient(135deg, #1a3a2a 0%, #0d2a1a 100%);
}

.weekly-challenge-card.claimed {
    opacity: 0.6;
    border-color: #555;
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.challenge-icon {
    font-size: 1.8rem;
}

.challenge-info {
    flex: 1;
}

.challenge-name {
    font-weight: bold;
    color: #fff;
}

.challenge-difficulty {
    font-size: 0.75rem;
    font-weight: bold;
}

.challenge-tier {
    background: #1a2a3a;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #88aaff;
}

.challenge-target {
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 10px;
}

.challenge-progress-bar {
    height: 8px;
    background: #1a2a3a;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.challenge-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.challenge-progress-text {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.challenge-rewards {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #88ff88;
}

.claim-challenge-btn {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #44ff88, #22cc66);
    border: none;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
    animation: claim-glow 1s ease-in-out infinite;
}

@keyframes claim-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(68, 255, 136, 0.5); }
    50% { box-shadow: 0 0 20px rgba(68, 255, 136, 0.8); }
}

.claim-challenge-btn:hover {
    transform: scale(1.02);
}

.challenge-claimed-badge {
    text-align: center;
    color: #88ff88;
    font-weight: bold;
}

/* Weekly Stats */
.weekly-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #3a4a5a;
    font-size: 0.85rem;
    color: #888;
}

.no-challenges {
    text-align: center;
    color: #888;
    padding: 30px;
}

/* Challenge Complete Notification */
.challenge-complete-notification {
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #2a3a1a, #1a2a0d);
    border: 2px solid #88ff44;
    border-radius: 15px;
    padding: 20px 30px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.challenge-complete-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.challenge-complete-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.challenge-complete-icon {
    font-size: 2.5rem;
}

.challenge-complete-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #88ff44;
}

.challenge-complete-name {
    font-size: 0.9rem;
    color: #aaa;
}

/* Weekly Reward Notification */
.weekly-reward-notification {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: linear-gradient(135deg, #3a3a1a, #2a2a0d);
    border: 2px solid #ffcc44;
    border-radius: 15px;
    padding: 20px 30px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.weekly-reward-notification.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.weekly-reward-content {
    text-align: center;
}

.weekly-reward-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffcc44;
    margin-bottom: 10px;
}

.weekly-reward-items {
    display: flex;
    justify-content: center;
    gap: 15px;
    color: #88ff88;
}

@media (max-width: 768px) {
    .weekly-challenges-panel {
        width: 95%;
        max-width: none;
        top: auto;
        bottom: 0;
        left: 2.5%;
        right: 2.5%;
        transform: none;
        max-height: 80vh;
        border-radius: 15px 15px 0 0;
    }
}

/* ===============================
   DIVINE BLESSING HALO EFFECT
   =============================== */
.divine-halo {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    pointer-events: none;
    z-index: 5;
}

.divine-halo-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 25px;
    border: 4px solid #ffd700;
    border-radius: 50%;
    box-shadow: 
        0 0 20px #ffd700,
        0 0 40px #ffaa00,
        0 0 60px rgba(255, 215, 0, 0.5),
        inset 0 0 15px rgba(255, 215, 0, 0.3);
    animation: halo-glow 2s ease-in-out infinite;
}

@keyframes halo-glow {
    0%, 100% {
        box-shadow: 
            0 0 20px #ffd700,
            0 0 40px #ffaa00,
            0 0 60px rgba(255, 215, 0, 0.5),
            inset 0 0 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 0 30px #ffd700,
            0 0 60px #ffaa00,
            0 0 90px rgba(255, 215, 0, 0.7),
            inset 0 0 25px rgba(255, 215, 0, 0.5);
    }
}

.divine-sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd700, 0 0 20px #fff;
    animation: sparkle-twinkle 1.5s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes sparkle-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: rotate(var(--rotation, 0deg)) translateY(-50px) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: rotate(var(--rotation, 0deg)) translateY(-50px) scale(1.2);
    }
}

.divine-sparkle:nth-child(2) { animation-delay: 0.15s; }
.divine-sparkle:nth-child(3) { animation-delay: 0.3s; }
.divine-sparkle:nth-child(4) { animation-delay: 0.45s; }
.divine-sparkle:nth-child(5) { animation-delay: 0.6s; }
.divine-sparkle:nth-child(6) { animation-delay: 0.75s; }
.divine-sparkle:nth-child(7) { animation-delay: 0.9s; }
.divine-sparkle:nth-child(8) { animation-delay: 1.05s; }
.divine-sparkle:nth-child(9) { animation-delay: 1.2s; }

/* Divine upgrade card styling */
.upgrade.divine-upgrade {
    background: linear-gradient(135deg, #3d2e0a 0%, #1a1a00 100%);
    border: 2px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.upgrade.divine-upgrade h3 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.upgrade.divine-upgrade.locked {
    opacity: 0.4;
    filter: grayscale(0.5);
    border-color: #666;
    box-shadow: none;
}

.upgrade.divine-upgrade.locked::after {
    content: "🔒 Requires 3 Rebirths";
    display: block;
    color: #ff6666;
    font-size: 0.85rem;
    margin-top: 8px;
}