/* ============================================
   💠 TRON THEME - EXTENDED EFFECTS
   Light cycles, data streams, identity discs
   ============================================ */

/* Grid Pulse Effects - Expanding rings */
.tron-grid-pulses {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.grid-pulse {
    position: absolute;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    animation: grid-pulse-expand 8s ease-out infinite;
}

.grid-pulse.pulse-1 {
    bottom: -50%;
    left: -25%;
    width: 150%;
    height: 150%;
    animation-delay: 0s;
}

.grid-pulse.pulse-2 {
    top: -30%;
    right: -20%;
    width: 100%;
    height: 100%;
    animation-delay: 2.5s;
}

.grid-pulse.pulse-3 {
    bottom: 20%;
    left: 60%;
    width: 80%;
    height: 80%;
    animation-delay: 5s;
}

@keyframes grid-pulse-expand {
    0% {
        transform: scale(0);
        opacity: 0.8;
        border-width: 3px;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
        border-width: 1px;
    }
}

/* Data Streams - Falling binary code */
.data-streams {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.data-stream {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(0, 212, 255, 0.4);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 3px;
    animation: data-fall 15s linear infinite;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.8);
}

.data-stream.stream-1 { left: 8%; animation-delay: 0s; }
.data-stream.stream-2 { left: 25%; animation-delay: -3s; }
.data-stream.stream-3 { left: 65%; animation-delay: -7s; }
.data-stream.stream-4 { left: 82%; animation-delay: -11s; }
.data-stream.stream-5 { left: 45%; animation-delay: -5s; }

@keyframes data-fall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Hexagon Nodes - Glowing connection points */
.hex-nodes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hex-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(0, 212, 255, 0.3);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: hex-pulse 3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

.hex-node:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.hex-node:nth-child(2) { top: 35%; right: 15%; animation-delay: 0.5s; }
.hex-node:nth-child(3) { bottom: 25%; left: 25%; animation-delay: 1s; }
.hex-node:nth-child(4) { top: 60%; right: 30%; animation-delay: 1.5s; }
.hex-node:nth-child(5) { bottom: 40%; right: 8%; animation-delay: 2s; }

@keyframes hex-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.8), 0 0 50px rgba(0, 212, 255, 0.4);
    }
}

/* Identity Disc - Spinning Tron disc */
.identity-disc {
    position: absolute;
    width: 80px;
    height: 80px;
    top: 20%;
    right: 12%;
    animation: disc-float 6s ease-in-out infinite;
    pointer-events: none;
}

.identity-disc .disc-outer {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(0, 212, 255, 0.7);
    border-radius: 50%;
    animation: disc-spin 4s linear infinite;
    box-shadow: 
        0 0 15px rgba(0, 212, 255, 0.5),
        inset 0 0 15px rgba(0, 212, 255, 0.2);
}

.identity-disc .disc-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 50%;
    animation: disc-spin 3s linear infinite reverse;
}

.identity-disc .disc-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: 20%;
    background: radial-gradient(circle, #00ffff 0%, rgba(0, 212, 255, 0.5) 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

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

@keyframes disc-float {
    0%, 100% { transform: translateY(0) rotate(15deg); }
    50% { transform: translateY(-20px) rotate(-15deg); }
}

/* Light Cycle Racing Easter Egg */
.light-cycle {
    position: fixed;
    width: 30px;
    height: 15px;
    z-index: 1000;
    pointer-events: none;
    transition: left 0.15s ease-out, top 0.15s ease-out;
}

.light-cycle .cycle-body {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, currentColor 30%, currentColor 100%);
    clip-path: polygon(0 50%, 30% 0, 100% 0, 100% 100%, 30% 100%);
}

.light-cycle .cycle-rider {
    position: absolute;
    width: 8px;
    height: 12px;
    left: 40%;
    top: -3px;
    background: currentColor;
    border-radius: 50% 50% 0 0;
}

.light-cycle .cycle-glow {
    position: absolute;
    width: 150%;
    height: 200%;
    left: -25%;
    top: -50%;
    background: radial-gradient(ellipse, currentColor 0%, transparent 70%);
    opacity: 0.3;
    filter: blur(5px);
}

.light-cycle.cyan { color: #00ffff; }
.light-cycle.orange { color: #ff6600; }
.light-cycle.green { color: #00ff66; }

.trail-segment {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    z-index: 999;
    pointer-events: none;
    animation: trail-fade 2s ease-out forwards;
}

.trail-segment.cyan { background: #00ffff; box-shadow: 0 0 10px #00ffff; }
.trail-segment.orange { background: #ff6600; box-shadow: 0 0 10px #ff6600; }
.trail-segment.green { background: #00ff66; box-shadow: 0 0 10px #00ff66; }

@keyframes trail-fade {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.3); }
}

.enemy-cycle {
    position: fixed;
    width: 25px;
    height: 12px;
    z-index: 998;
    pointer-events: none;
}

.enemy-cycle .cycle-body {
    width: 100%;
    height: 100%;
    background: currentColor;
    clip-path: polygon(0 50%, 30% 0, 100% 0, 100% 100%, 30% 100%);
}

.enemy-cycle .cycle-glow {
    position: absolute;
    width: 150%;
    height: 200%;
    left: -25%;
    top: -50%;
    background: radial-gradient(ellipse, currentColor 0%, transparent 70%);
    opacity: 0.2;
    filter: blur(3px);
}

.enemy-cycle.orange { color: #ff6600; }
.enemy-cycle.red { color: #ff3333; }
.enemy-cycle.yellow { color: #ffcc00; }

/* Tron Easter Egg UI */
.tron-badge {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00d4ff;
    border-radius: 4px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5), inset 0 0 20px rgba(0, 212, 255, 0.1);
    animation: tron-badge-pulse 1s ease-in-out infinite;
    z-index: 1001;
    pointer-events: none;
}

.race-score, .race-timer {
    position: fixed;
    right: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00d4ff;
    border-radius: 4px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    z-index: 1001;
    pointer-events: none;
}

.race-score { top: 130px; }
.race-timer { top: 165px; }

@keyframes tron-badge-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.5), inset 0 0 20px rgba(0, 212, 255, 0.1); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.8), inset 0 0 30px rgba(0, 212, 255, 0.2); }
}

.tron-score {
    font-family: 'Courier New', monospace !important;
    color: #00ffff !important;
    text-shadow: 0 0 20px #00ffff, 0 0 40px rgba(0, 212, 255, 0.5) !important;
}

.derez-burst {
    position: fixed;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    pointer-events: none;
}

.derez-particle {
    position: absolute;
    color: #00ffff;
    font-size: 1.5rem;
    animation: derez-scatter 1.5s ease-out forwards;
    text-shadow: 0 0 10px #00ffff;
}

.derez-particle:nth-child(1) { --tx: -60px; --ty: -40px; animation-delay: 0s; }
.derez-particle:nth-child(2) { --tx: 60px; --ty: -30px; animation-delay: 0.1s; }
.derez-particle:nth-child(3) { --tx: -40px; --ty: 50px; animation-delay: 0.2s; }
.derez-particle:nth-child(4) { --tx: 50px; --ty: 40px; animation-delay: 0.3s; }
.derez-particle:nth-child(5) { --tx: 0px; --ty: -60px; animation-delay: 0.4s; }

@keyframes derez-scatter {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Grid Hotspot for Tron Easter Egg */
.grid-hotspot {
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: grid-hotspot-glow 2s ease-in-out infinite;
}

.grid-hotspot:hover {
    transform: scale(1.3);
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00d4ff !important;
}

@keyframes grid-hotspot-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.tron-hint {
    background: rgba(0, 0, 0, 0.9) !important;
    border-color: #00d4ff !important;
    color: #00ffff !important;
    font-family: 'Courier New', monospace;
}

/* ============================================
   🎮 KONAMI CODE SECRET OVERLAY
   ============================================ */
.konami-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: konami-appear 0.5s ease-out;
}

@keyframes konami-appear {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.konami-message {
    text-align: center;
    animation: konami-pulse 0.5s ease-out;
}

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

.konami-title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ff0080, #00ffff, #ff0080);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: konami-gradient 2s ease infinite;
    margin-bottom: 1rem;
}

@keyframes konami-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.konami-subtitle {
    font-size: 1.2rem;
    color: #a855f7;
    margin-bottom: 1.5rem;
}

.konami-code {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #64748b;
    letter-spacing: 3px;
}

/* Show Tron effects only for tron theme */
.theme-tron .tron-grid-pulses,
.theme-tron .data-streams,
.theme-tron .hex-nodes,
.theme-tron .identity-disc,
body.theme-tron .tron-grid-pulses,
body.theme-tron .data-streams,
body.theme-tron .hex-nodes,
body.theme-tron .identity-disc {
    display: block !important;
}

/* Hide tron effects by default */
.tron-grid-pulses,
.data-streams,
.hex-nodes,
.identity-disc {
    display: none !important;
}

/* ============================================
   🌟 ENHANCED EASTER EGG ANIMATIONS
   ============================================ */

/* Improved score popup animation */
.score-popup {
    position: fixed;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 1001;
    pointer-events: none;
    animation: score-float 2s ease-out forwards;
}

@keyframes score-float {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1.2);
    }
    40% {
        transform: translateY(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
}

/* Enhanced easter egg hints */
.easter-egg-hint {
    position: fixed;
    bottom: 100px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    z-index: 1000;
    pointer-events: none;
    animation: hint-pulse 2s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

@keyframes hint-pulse {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
    }
}

.easter-egg-hint.space-hint {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.easter-egg-hint.nature-hint {
    border-color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.easter-egg-hint.ocean-hint {
    border-color: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.easter-egg-hint.winter-hint {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.easter-egg-hint.mystic-hint {
    border-color: #f97316;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

/* Hunter Mode crosshair cursor enhancement */
.hunter-mode {
    cursor: crosshair !important;
}

.hunter-mode::after {
    content: '🎯';
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    z-index: 9999;
    animation: crosshair-pulse 0.5s ease-in-out infinite;
}

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