:root {
    --bg-dark: #05050A;
    --panel-bg: rgba(16, 18, 27, 0.7);
    --panel-border: rgba(102, 252, 241, 0.2);
    --neon-cyan: #66FCF1;
    --neon-cyan-dim: #45A29E;
    --neon-pink: #FF007F;
    --neon-purple: #B200FF;
    --neon-green: #39FF14;
    --text-main: #C5C6C7;
    --text-muted: #8892B0;
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(102, 252, 241, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 0, 127, 0.05), transparent 25%);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT Scanline Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.4;
}

.container {
    display: flex;
    width: 95vw;
    height: 90vh;
    gap: 20px;
    z-index: 10;
}

.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(102, 252, 241, 0.05);
}

.left-panel { flex: 1; align-items: center; justify-content: space-between; }
.center-panel { flex: 2; }
.right-panel { flex: 1; }

h1, h2, h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-title {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    animation: flicker 3s infinite;
}

@keyframes flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.4;
        text-shadow: none;
    }
}

/* Core Visuals */
.core-container {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.glow-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed var(--neon-cyan-dim);
    animation: spin 10s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.quantum-core {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-cyan) 0%, #000 80%);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 30px var(--neon-cyan);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.quantum-core:active {
    transform: scale(0.95);
    box-shadow: 0 0 50px var(--neon-cyan), 0 0 100px var(--neon-cyan);
}

.core-inner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 20px #fff;
    animation: pulse 2s infinite ease-in-out;
}

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

/* Floating Text */
#click-feedback-container {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.floating-text {
    position: absolute;
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    text-shadow: 0 0 5px var(--neon-cyan);
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-50px) scale(1.5); }
}

/* Stats */
.stats-header {
    text-align: center;
    margin-bottom: 30px;
}

.huge-number {
    font-size: 64px;
    font-family: var(--font-heading);
    color: #fff;
    text-shadow: 0 0 15px var(--neon-cyan);
    margin: 10px 0;
}

.qps-display {
    color: var(--neon-pink);
    font-size: 20px;
    text-shadow: 0 0 5px var(--neon-pink);
}

/* Terminal */
.terminal {
    background: #000;
    border: 1px solid var(--text-muted);
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    height: 150px;
}

.terminal-header {
    background: var(--text-muted);
    color: #000;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
}

.terminal-body {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    color: var(--neon-green);
    font-size: 14px;
}

.terminal-body p { margin-bottom: 5px; }

/* Upgrades & Buildings */
.upgrades-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.upgrades-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    overflow-y: auto;
}

.buildings-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-item:hover {
    background: rgba(102, 252, 241, 0.1);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
}

.shop-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
}

.shop-item.disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.item-info h4 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 16px;
}

.item-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.item-cost {
    color: var(--neon-pink);
    font-weight: bold;
}

.item-count {
    font-size: 24px;
    color: var(--neon-cyan-dim);
    font-family: var(--font-heading);
}

/* Upgrade Item specific */
.upgrade-item {
    width: calc(50% - 5px);
    background: rgba(255, 0, 127, 0.05);
    border: 1px solid rgba(255, 0, 127, 0.2);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-item:hover {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 127, 0.15);
}

.upgrade-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-title {
    color: var(--neon-pink);
    font-size: 14px;
    margin-bottom: 5px;
}

/* Controls */
.controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.control-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: bold;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: var(--neon-cyan);
    color: #000;
}

.control-btn.warning {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.control-btn.warning:hover {
    background: var(--neon-pink);
    color: #000;
}

/* Utility classes */
.text-neon-green { color: var(--neon-green); text-shadow: 0 0 5px var(--neon-green); }
.text-neon-cyan { color: var(--neon-cyan); text-shadow: 0 0 5px var(--neon-cyan); }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }
