:root {
    --bg-dark: #030308;
    --neon-cyan: #00f3ff;
    --neon-purple: #9d00ff;
    --neon-pink: #ff0055;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --glass-bg: rgba(10, 10, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* We use a custom cursor for WOW effect */
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
.badge,
.btn-text,
.neon-text {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1.5px;
}

/* Custom Cursor */
.cursor-dot,
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.cursor-glow {
    width: 40px;
    height: 40px;
    border: 1px solid var(--neon-purple);
    transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-glow.active {
    width: 60px;
    height: 60px;
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--neon-cyan);
}

/* Backgrounds */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #030308 100%);
    pointer-events: none;
    z-index: 2;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--neon-cyan);
    top: -100px;
    left: -100px;
    animation: float 10s infinite alternate;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--neon-purple);
    bottom: -150px;
    right: -100px;
    animation: float 12s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(80px, 80px);
    }
}

/* Layout */
#app {
    position: relative;
    z-index: 10;
    width: 100%;
}

.stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 1rem;
    text-align: center;
    position: relative;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--neon-cyan);
    border-radius: 50px;
    color: var(--neon-cyan);
    font-size: 0.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    background: rgba(0, 243, 255, 0.05);
}

.neon-text {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan), 0 0 15px var(--neon-cyan);
}

.glow-pulse {
    animation: textPulse 2s infinite alternate;
}

@keyframes textPulse {
    0% {
        text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
    }

    100% {
        text-shadow: 0 0 20px var(--neon-purple), 0 0 40px var(--neon-purple);
        color: #fff;
    }
}

/* Glitch Effect applied to Title */
.glitch {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-pink);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-cyan);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 83px, 0);
    }

    20% {
        clip: rect(66px, 9999px, 18px, 0);
    }

    40% {
        clip: rect(90px, 9999px, 33px, 0);
    }

    60% {
        clip: rect(12px, 9999px, 98px, 0);
    }

    80% {
        clip: rect(44px, 9999px, 11px, 0);
    }

    100% {
        clip: rect(33px, 9999px, 77px, 0);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    min-height: 2em;
}

/* Use Cases - 3D Cards */
.use-cases {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.use-case {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    width: 280px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.use-case::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.use-case:hover::before {
    left: 150%;
}

.use-case .icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    transform: translateZ(50px);
    /* 3D pop out */
}

.use-case h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--text-main);
    transform: translateZ(30px);
}

.use-case p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    transform: translateZ(20px);
}

/* Scroll Down Mouse */
.scroll-down-btn {
    text-decoration: none;
    color: var(--neon-cyan);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    transition: opacity 0.3s;
    margin-top: 2rem;
}

.scroll-down-btn:hover {
    opacity: 1;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--neon-cyan);
    border-radius: 20px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 8px;
        opacity: 1;
    }

    100% {
        top: 25px;
        opacity: 0;
    }
}

.scroll-down-btn .text {
    font-family: 'Orbitron';
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* Primary Button */
.btn-primary {
    position: relative;
    background: transparent;
    border: none;
    padding: 20px 45px;
    border-radius: 50px;
    overflow: hidden;
    outline: none;
    transition: transform 0.2s;
    width: 100%;
    margin-top: 1rem;
}

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

.btn-text {
    position: relative;
    z-index: 2;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    z-index: 0;
    border-radius: 50px;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--bg-dark);
    z-index: 1;
    border-radius: 50px;
    transition: background 0.3s;
}

.btn-primary:hover::after {
    background: transparent;
}

.btn-primary .btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    filter: blur(15px);
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.btn-primary:hover .btn-glow {
    opacity: 1;
}

/* Form Styles */
.form-container h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-container p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

#ai-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.input-group {
    position: relative;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    margin-bottom: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.input-group input,
.input-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 15px;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.input-group input:focus,
.input-group select:focus {
    background: rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.3);
}

.input-group select {
    appearance: none;
}

option {
    background: #0a0a14;
    color: white;
}

.input-group .line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon-cyan);
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.input-group input:focus~.line,
.input-group select:focus~.line {
    width: 100%;
}

/* Overlay System (Loading & Player) */
#overlay-system {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 3, 8, 0.95);
    backdrop-filter: blur(30px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#overlay-system.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-panel {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
}

.overlay-panel.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* Loading Core Engine */
.core-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ai-core {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #fff, var(--neon-cyan));
    border-radius: 50%;
    box-shadow: 0 0 60px var(--neon-cyan), 0 0 120px var(--neon-purple);
    animation: pulse 1s infinite alternate;
    position: relative;
    z-index: 2;
}

.core-rings {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    z-index: 1;
    pointer-events: none;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid var(--neon-cyan);
    border-radius: 50%;
    opacity: 0.5;
}

.r1 {
    width: 180px;
    height: 180px;
    border-top: 3px solid var(--neon-purple);
    animation: spin 2s linear infinite;
}

.r2 {
    width: 260px;
    height: 260px;
    border-right: 3px solid var(--neon-cyan);
    animation: spin 3s linear infinite reverse;
}

.r3 {
    width: 340px;
    height: 340px;
    border-bottom: 2px solid #fff;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 100px var(--neon-cyan), 0 0 180px var(--neon-purple);
    }
}

.loading-text {
    margin-top: 6rem;
    font-size: 1.8rem;
}

.loading-subtext {
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.console-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    font-family: monospace;
    color: var(--neon-cyan);
    text-align: left;
    height: 80px;
    overflow: hidden;
}

/* Audio Player */
.player-container {
    padding: 4rem;
    position: relative;
    text-align: center;
}

.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.btn-close:hover {
    color: var(--neon-pink);
}

.player-visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    height: 80px;
    margin-bottom: 2rem;
}

.player-visualizer .bar {
    width: 12px;
    background: linear-gradient(to top, var(--neon-purple), var(--neon-cyan));
    border-radius: 10px;
    height: 15px;
    transition: height 0.1s ease;
    box-shadow: 0 0 15px var(--neon-cyan);
}

.player-container h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

#player-status {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 3rem;
}

.btn-play-icon {
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 0 40px rgba(157, 0, 255, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-play-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(0, 243, 255, 0.8);
}

.btn-play-icon svg {
    width: 40px;
    height: 40px;
    margin-left: 5px;
}

.btn-play-icon.playing svg {
    margin-left: 0;
}

.btn-dl-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--neon-cyan);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-dl-icon:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    transform: scale(1.1);
}

.btn-dl-icon svg {
    width: 20px;
    height: 20px;
}

.btn-dl-icon:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
    transition: width 0.1s linear;
}

/* Mission Call To Action */
.mission-cta-container {
    margin-top: 2rem;
}

.mission-cta-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.mission-cta-text {
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-inline-link {
    text-decoration: none;
    display: inline-flex;
}

/* Generic utility to hide elements without breaking opacity-based panels */
.hidden:not(#overlay-system):not(.overlay-panel) {
    display: none !important;
}

@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }

    .stage {
        padding: 4rem 1rem;
    }

    .use-cases {
        flex-direction: column;
        align-items: center;
    }

    .glass-panel {
        padding: 2rem 1rem;
    }

    .core-rings {
        display: none;
    }

    /* simplify on mobile */
    .overlay-panel {
        padding: 1rem;
    }

    .player-container {
        padding: 3rem 1rem;
    }
}

/* Consent checkbox */
.consent-group {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    user-select: none;
}

.consent-group input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.consent-box {
    flex: 0 0 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid rgba(0, 243, 255, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    transition: all 0.25s ease;
}

.consent-box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid var(--bg-dark);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.consent-group input:checked + .consent-box {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px var(--neon-cyan);
}

.consent-group input:checked + .consent-box::after {
    transform: rotate(45deg) scale(1);
}

.consent-group input:focus-visible + .consent-box {
    outline: 2px solid var(--neon-purple);
    outline-offset: 3px;
}

.consent-group input:checked ~ .consent-text {
    color: var(--text-main);
}

/* Loading music toggle */
.btn-music {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 243, 255, 0.4);
    background: rgba(0, 243, 255, 0.06);
    color: var(--neon-cyan);
    font-size: 1.2rem;
    line-height: 1;
    z-index: 5;
    transition: all 0.25s ease;
}

.btn-music:hover {
    box-shadow: 0 0 14px rgba(0, 243, 255, 0.5);
}

.btn-music.muted {
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.15);
    text-decoration: line-through;
}

/* Footer links */
.site-footer {
    margin-top: 10rem;
    padding: 3rem 1rem 4rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 2.5rem;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: color 0.25s ease, opacity 0.25s ease, text-shadow 0.25s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--neon-cyan);
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

/* Privacy note under the form */
.form-privacy-note {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: left;
    margin: -0.4rem 0 0;
}

.form-privacy-note a,
.consent-text a {
    color: var(--neon-cyan);
}

.fill {
    background: rgba(255, 0, 85, 0.18);
    color: #ff7aa5;
    padding: 0 4px;
    border-radius: 4px;
}

/* Author signature & legal */
.footer-meta {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-meta a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 243, 255, 0.4);
    transition: color 0.25s ease;
}

.footer-meta a:hover,
.footer-meta a:focus-visible {
    color: var(--neon-cyan);
}

.footer-author {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}
