/* Cyberpunk Theme Styles */

/* Custom Properties */
:root {
    --neon-cyan: #00f7ff;
    --neon-blue: #0066ff;
    --neon-purple: #8a2be2;
    --dark-bg: #000000;
    --darker-bg: #0a0a0a;
    --glow-color: rgba(0, 247, 255, 0.3);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: var(--dark-bg);
    color: white;
    overflow-x: hidden;
}

/* Enhanced background animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 247, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
    animation: background-pulse 8s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes background-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Floating particles effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 247, 255, 0.1) 0%, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(0, 102, 255, 0.1) 0%, transparent 2px),
        radial-gradient(circle at 50% 10%, rgba(138, 43, 226, 0.1) 0%, transparent 2px),
        radial-gradient(circle at 10% 50%, rgba(0, 247, 255, 0.1) 0%, transparent 2px),
        radial-gradient(circle at 90% 30%, rgba(0, 102, 255, 0.1) 0%, transparent 2px);
    background-size: 200px 200px, 300px 300px, 250px 250px, 180px 180px, 220px 220px;
    animation: float-particles 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes float-particles {
    0% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-10px) translateX(5px); }
    50% { transform: translateY(-5px) translateX(-5px); }
    75% { transform: translateY(10px) translateX(3px); }
    100% { transform: translateY(0px) translateX(0px); }
}

/* Scanline Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 247, 255, 0.02) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Navigation */
.nav-link {
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Logo Animation */
.logo-img {
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    animation: logo-glow 2s ease-in-out infinite alternate;
}

@keyframes logo-glow {
    from { filter: drop-shadow(0 0 10px var(--neon-cyan)); }
    to { filter: drop-shadow(0 0 20px var(--neon-cyan)); }
}

/* Landing Section */
.landing-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.main-content {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.cyber-text {
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px var(--neon-cyan);
}

/* Input Styles */
.input-glow:focus {
    box-shadow: 0 0 20px var(--glow-color);
    border-color: var(--neon-cyan);
}

.placeholder-cyan-300::placeholder {
    color: #67e8f9;
}

/* Button Styles */
.cyber-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cyber-btn:hover::before {
    left: 100%;
}

.cyber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 247, 255, 0.3);
}

/* Glow Box */
.glow-box {
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 20px var(--glow-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.glow-box:hover {
    box-shadow: 0 0 30px var(--glow-color);
    transform: translateY(-2px);
}

/* Neon Text */
.neon-text {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 30px var(--neon-cyan);
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Terminal Cursor */
.terminal-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--neon-cyan);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

/* Shake Animation */
.animate-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Section Styles */
.section {
    position: relative;
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .cyber-text {
        font-size: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
}

/* Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Fallback background animation if Three.js fails */
#canvas-container:empty::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 247, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
    animation: background-pulse 8s ease-in-out infinite;
}

@keyframes background-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Results Section */
#results {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

/* Social Links */
footer a:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Loading Animation */
#loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#loading:not(.hidden) {
    opacity: 1;
}

/* Hidden Utility */
.hidden {
    display: none !important;
}