@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Mono&display=swap');

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Space Mono', monospace;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a2e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.space-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, #fff, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 350px 200px, #fff, transparent);
    background-size: 400px 400px;
    animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.nebula {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 200, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 0, 150, 0.05) 0%, transparent 70%);
}

.title-font {
    font-family: 'Orbitron', sans-serif;
}

.glow-text {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
}

.glow-box {
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3), inset 0 0 15px rgba(0, 255, 255, 0.1);
}

.glow-green {
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.4), inset 0 0 10px rgba(0, 255, 100, 0.1);
}

.glow-red {
    box-shadow: 0 0 15px rgba(255, 50, 100, 0.4), inset 0 0 10px rgba(255, 50, 100, 0.1);
}

.card {
    background: rgba(10, 20, 40, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
}

input[type="number"] {
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    font-family: 'Space Mono', monospace;
}

input[type="number"]:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.btn {
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:active {
    transform: scale(0.95);
}

.price-up { color: #00ff88; }
.price-down { color: #ff4488; }
.price-stable { color: #ffff00; }

.notification {
    animation: slideIn 0.5s ease, fadeOut 0.5s ease 4.5s forwards;
}

@keyframes slideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.win-animation {
    animation: winPulse 1s ease infinite;
}

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

.event-modal {
    animation: eventPulse 1.5s ease infinite;
}

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

.lose-modal {
    animation: eventPulse 1.5s ease infinite;
}

.difficulty-modal {
    animation: difficultyPulse 1.5s ease infinite;
}

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

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.5);
    border-radius: 3px;
}
input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(0, 20, 40, 0.8);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ffff 0%, #00ff88 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00ffff 0%, #00ff88 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    border: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.2), rgba(0, 255, 100, 0.2));
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-moz-range-track {
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.2), rgba(0, 255, 100, 0.2));
    height: 6px;
    border-radius: 3px;
    border: none;
}