/* Cyberpunk Quantum Computing Experience - Main Styles */

/* ===== PRELOADER STYLES ===== */
.cube-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    perspective: 800px;
}

.cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotate 4s infinite linear;
}

.faces {
    position: absolute;
    width: 100px;
    height: 100px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    padding: 10px;
    box-sizing: border-box;
}

.faces.f1 {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    transform: rotateY(0deg) translateZ(50px);
}

.faces.f2 {
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid #ff00ff;
    transform: rotateY(90deg) translateZ(50px);
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.faces.f3 {
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #00ff00;
    transform: rotateY(180deg) translateZ(50px);
}

.dot {
    background: #fff;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    animation: pulse 2s infinite;
}

.dot.p1, .dot.p3, .dot.p7, .dot.p9 { animation-delay: 0s; }
.dot.p2, .dot.p4, .dot.p6, .dot.p8 { animation-delay: 0.2s; }
.dot.p5 { animation-delay: 0.4s; }
.dot.p10, .dot.p12 { animation-delay: 0.6s; }
.dot.p11, .dot.p13 { animation-delay: 0.8s; }

.project-name {
    overflow: hidden;
}

.project-name div {
    animation: slideInLeft 1s ease-out;
}

.project-name .l2 {
    animation-delay: 0.5s;
    animation-fill-mode: both;
}

/* ===== MAIN APPLICATION STYLES ===== */

/* Enhanced Cyberpunk Glitch Effects */
.glitch-text {
    position: relative;
    font-weight: 900;
    font-size: clamp(2rem, 8vw, 8rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: textShadow 1.6s infinite, glitch 2s infinite;
    text-shadow: 
        0.4389924193300864px 0 1px rgba(0,30,255,0.5), 
        -0.4389924193300864px 0 1px rgba(255,0,80,0.3), 
        0 0 3px;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-1 2s infinite, textShadow 1.6s infinite;
    color: #ff006e;
    z-index: -1;
    text-shadow: 
        2px 0 1px rgba(255,0,110,0.8), 
        -2px 0 1px rgba(0,255,255,0.3);
}

.glitch-text::after {
    animation: glitch-2 2s infinite, textShadow 1.6s infinite;
    color: #00ffff;
    z-index: -2;
    text-shadow: 
        -2px 0 1px rgba(0,255,255,0.8), 
        2px 0 1px rgba(255,0,110,0.3);
}

/* Enhanced Glow Effect */
.glow-text {
    font-size: clamp(2.5rem, 10vw, 10rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px currentColor,
        0 0 35px currentColor,
        0 0 40px currentColor;
    animation: glow-pulse 2s ease-in-out infinite alternate, textShadow 1.6s infinite;
}

/* Main Title Styling */
.main-title {
    font-size: clamp(3rem, 12vw, 12rem);
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.main-title .quantum-text {
    color: #ff006e;
    text-shadow: 
        0 0 10px #ff006e,
        0 0 20px #ff006e,
        0 0 30px #ff006e,
        0 0 40px #ff006e,
        2px 0 1px rgba(0,30,255,0.5);
    animation: textShadow 1.6s infinite;
}

.main-title .computing-text {
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #00ffff,
        -2px 0 1px rgba(255,0,80,0.5);
    animation: textShadow 1.6s infinite reverse;
}

/* Section Headers */
.section-header {
    font-size: clamp(1.5rem, 5vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    position: relative;
}

.section-header.cyber-red {
    color: #ff4d4d;
    text-shadow: 
        0 0 5px #ff4d4d,
        0 0 10px #ff4d4d,
        0 0 15px #ff4d4d,
        2px 0 1px rgba(0,30,255,0.3);
    animation: textShadow 1.6s infinite;
}

.section-header.cyber-green {
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 15px #39ff14,
        -2px 0 1px rgba(255,0,80,0.3);
    animation: textShadow 1.6s infinite reverse;
}

.section-header.cyber-blue {
    color: #0033ff;
    text-shadow: 
        0 0 5px #0033ff,
        0 0 10px #0033ff,
        0 0 15px #0033ff,
        2px 0 1px rgba(255,0,80,0.3);
    animation: textShadow 1.6s infinite;
}

/* Cyberpunk Box */
.cyber-box {
    position: relative;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.05), transparent);
    border-image: linear-gradient(45deg, #ff006e, #00ffff, #39ff14) 1;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 0, 110, 0.1);
    transition: all 0.3s ease;
}

.cyber-box:hover {
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        inset 0 0 20px rgba(255, 0, 110, 0.2);
    transform: translateY(-2px);
}

/* Grid Background */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid #39ff14;
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
}

/* Floating Particles */
.particle {
    position: absolute;
    background: #00ffff;
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(odd) {
    background: #ff006e;
    animation-duration: 8s;
}

.particle:nth-child(3n) {
    background: #39ff14;
    animation-duration: 10s;
}

/* ===== ANIMATIONS ===== */

@keyframes rotate {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

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

@keyframes slideInLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(1px, -1px); }
    40% { transform: translate(1px, 1px); }
    60% { transform: translate(-1px, -1px); }
    80% { transform: translate(-1px, 1px); }
}

/* Enhanced textShadow animation from cyberpunk style */
@keyframes textShadow {
  0% {
    text-shadow: 0.4389924193300864px 0 1px rgba(0,30,255,0.5), -0.4389924193300864px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  5% {
    text-shadow: 2.7928974010788217px 0 1px rgba(0,30,255,0.5), -2.7928974010788217px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  10% {
    text-shadow: 0.02956275843481219px 0 1px rgba(0,30,255,0.5), -0.02956275843481219px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  15% {
    text-shadow: 0.40218538552878136px 0 1px rgba(0,30,255,0.5), -0.40218538552878136px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  20% {
    text-shadow: 3.4794037899852017px 0 1px rgba(0,30,255,0.5), -3.4794037899852017px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  25% {
    text-shadow: 1.6125630401149584px 0 1px rgba(0,30,255,0.5), -1.6125630401149584px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  30% {
    text-shadow: 0.7015590085143956px 0 1px rgba(0,30,255,0.5), -0.7015590085143956px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  35% {
    text-shadow: 3.896914047650351px 0 1px rgba(0,30,255,0.5), -3.896914047650351px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  40% {
    text-shadow: 3.870905614848819px 0 1px rgba(0,30,255,0.5), -3.870905614848819px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  45% {
    text-shadow: 2.231056963361899px 0 1px rgba(0,30,255,0.5), -2.231056963361899px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  50% {
    text-shadow: 0.08084290417898504px 0 1px rgba(0,30,255,0.5), -0.08084290417898504px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  55% {
    text-shadow: 2.3758461067427543px 0 1px rgba(0,30,255,0.5), -2.3758461067427543px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  60% {
    text-shadow: 2.202193051050636px 0 1px rgba(0,30,255,0.5), -2.202193051050636px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  65% {
    text-shadow: 2.8638780614874975px 0 1px rgba(0,30,255,0.5), -2.8638780614874975px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  70% {
    text-shadow: 0.48874025155497314px 0 1px rgba(0,30,255,0.5), -0.48874025155497314px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  75% {
    text-shadow: 1.8948491305757957px 0 1px rgba(0,30,255,0.5), -1.8948491305757957px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  80% {
    text-shadow: 0.0833037308038857px 0 1px rgba(0,30,255,0.5), -0.0833037308038857px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  85% {
    text-shadow: 0.09769827255241735px 0 1px rgba(0,30,255,0.5), -0.09769827255241735px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  90% {
    text-shadow: 3.443339761481782px 0 1px rgba(0,30,255,0.5), -3.443339761481782px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  95% {
    text-shadow: 2.1841838852799786px 0 1px rgba(0,30,255,0.5), -2.1841838852799786px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  100% {
    text-shadow: 2.6208764473832513px 0 1px rgba(0,30,255,0.5), -2.6208764473832513px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
}

@keyframes glow-pulse {
    from {
        text-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor,
            0 0 40px currentColor;
    }
    to {
        text-shadow: 
            0 0 20px currentColor,
            0 0 30px currentColor,
            0 0 40px currentColor,
            0 0 50px currentColor;
    }
}

@keyframes flicker {
  0% { opacity: 0.27861; }
  5% { opacity: 0.34769; }
  10% { opacity: 0.23604; }
  15% { opacity: 0.90626; }
  20% { opacity: 0.18128; }
  25% { opacity: 0.83891; }
  30% { opacity: 0.65583; }
  35% { opacity: 0.67807; }
  40% { opacity: 0.26559; }
  45% { opacity: 0.84693; }
  50% { opacity: 0.96019; }
  55% { opacity: 0.08594; }
  60% { opacity: 0.20313; }
  65% { opacity: 0.71988; }
  70% { opacity: 0.53455; }
  75% { opacity: 0.37288; }
  80% { opacity: 0.71428; }
  85% { opacity: 0.70419; }
  90% { opacity: 0.7003; }
  95% { opacity: 0.36108; }
  100% { opacity: 0.24387; }
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #39ff14; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.7;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .cube-container {
        width: 80px;
        height: 80px;
    }
    
    .cube, .faces {
        width: 80px;
        height: 80px;
    }
    
    .faces.f1, .faces.f3 {
        transform: rotateY(0deg) translateZ(40px);
    }
    
    .faces.f2 {
        transform: rotateY(90deg) translateZ(40px);
    }
    
    .typewriter {
        font-size: 1rem;
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a0000;
}

::-webkit-scrollbar-thumb {
    background: #ff006e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ffff;
}

/* ===== SELECTION COLORS ===== */
::selection {
    background: rgba(0, 255, 255, 0.3);
    color: #fff;
}

/* ===== BLOCH SPHERE SPECIFIC STYLES ===== */
.bloch-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #39ff14;
    border-radius: 12px;
    padding: 1rem;
}

.bloch-controls input[type="range"] {
    appearance: none;
    height: 6px;
    background: linear-gradient(90deg, #333 0%, #39ff14 100%);
    border-radius: 3px;
    outline: none;
}

.bloch-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #39ff14;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #00ff9f;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.bloch-controls input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #39ff14;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #00ff9f;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.gate-btn:hover, .state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.3);
}

.measurement-display {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-display .stat-item {
    transition: all 0.3s ease;
}

.stats-display .stat-item:hover {
    background: #2a2a3e;
    border: 1px solid #39ff14;
}

#bloch-sphere-canvas {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    transition: box-shadow 0.3s ease;
}

#bloch-sphere-canvas:hover {
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.5);
}

/* Step Progress Indicators */
.step-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    border: 2px solid #666;
    background: #1a1a2e;
    color: #666;
}

.step-indicator.completed {
    background: #39ff14;
    color: #000;
    border-color: #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.step-indicator.active {
    background: #00ff9f;
    color: #000;
    border-color: #00ff9f;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.6);
    transform: scale(1.1);
}

.progress-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #666 0%, #39ff14 50%, #666 100%);
    margin: 0 10px;
    border-radius: 2px;
}

/* Math equation styling */
.math-box {
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
}

.concept-block {
    border-left: 3px solid #39ff14;
    padding-left: 1rem;
    margin: 1rem 0;
}

/* Button animations */
.cyber-btn:active {
    transform: scale(0.98);
}

::-moz-selection {
    background: rgba(0, 255, 255, 0.3);
    color: #fff;
}
