﻿:root {
    --primary-color: #ffffff;
    --accent-color: #007AFF; /* Electric Blue for modern feel */
    --bg-dark: #0a0a0a;
    --text-muted: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-accent: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--primary-color);
    font-family: var(--font-main);
    overflow: hidden; /* Disable scroll during intro */
    line-height: 1.6;
}

/* --- Pixel & Nixie Intro --- */

#boot-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    transition: opacity 1s ease;
}

.pixel-sequence {
    display: flex;
    gap: 1.5rem;
}

.pixel-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.85, 0, 0.15, 1);
}

/* Step 1: Vertical Elongation (Glow Line Only) */
.pixel-container.elongated {
    height: 130px; /* Reduced for better proportion */
    background: linear-gradient(to bottom, rgba(0, 255, 255, 0.05), transparent);
    overflow: visible; 
    border: 1px solid rgba(0, 255, 255, 0.4);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
}

/* Hex Mesh Overlay for Nixie Look */
.pixel-container.elongated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 2;
    border-radius: inherit;
}

/* Step 2: Subtle Radius Reveal (After Elongation) */
.pixel-container.rounded {
    border-radius: 20px 20px 8px 8px; /* More natural glass tube base */
    transition: border-radius 0.4s ease-out; /* Visible transition for r-value */
}

/* Hide SVG when elongated to show CSS border instead for smooth radius */
.pixel-container.elongated .pixel-svg {
    opacity: 0;
}

.pixel-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.pixel-rect {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.5;
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    transition: stroke-dashoffset 0.6s ease;
    /* Neon Glow Aura that follows the line */
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.8)) 
            drop-shadow(0 0 10px rgba(0, 255, 255, 0.4));
}

.pixel-container.drawn .pixel-rect {
    stroke-dashoffset: 0;
}

.nixie-digit {
    position: relative;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 3.5rem;
    font-weight: 700; 
    color: #ffffff; /* Crisp white core */
    text-shadow: 
        0 0 8px #00ffff,
        0 0 15px #00ffff,
        0 0 30px #0088ff,
        0 0 60px #0044ff;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.2s ease;
    filter: brightness(1.2) drop-shadow(0 0 2px rgba(0,255,255,0.5));
}

/* Vertical Light Bleed Effect */
.nixie-digit::after {
    content: '';
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: 50%;
    width: 15px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 255, 255, 0.4) 0%,
        rgba(0, 136, 255, 0.1) 60%,
        transparent 100%
    );
    transform: translateX(-50%);
    filter: blur(8px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.nixie-digit.glow::after {
    opacity: 1;
    animation: bleed-flicker 2s infinite alternate;
}

@keyframes bleed-flicker {
    0% { opacity: 0.6; transform: translateX(-50%) scaleY(0.9); }
    100% { opacity: 1; transform: translateX(-50%) scaleY(1.1); }
}

.nixie-digit.glow {
    opacity: 1;
    animation: nixie-flicker 0.1s infinite alternate, nixie-zap 4s infinite;
}

@keyframes nixie-flicker {
    0% { opacity: 0.9; filter: brightness(0.95); }
    100% { opacity: 1; filter: brightness(1.1); }
}

@keyframes nixie-zap {
    0%, 96%, 98%, 100% { transform: translate(0,0); filter: brightness(1) hue-rotate(0deg); opacity: 1; }
    97% { transform: translate(2px, -2px) scale(1.05); filter: brightness(1.5) hue-rotate(90deg); opacity: 0.9; text-shadow: 0 0 10px #ff00ff; }
}

.system-status {
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 1s ease;
}

.system-status.visible {
    opacity: 1;
}

/* --- Intro Page --- */

#intro-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0; /* Hidden by default */
    transition: opacity 2s ease, transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
}

#intro-page.visible {
    opacity: 1;
}

#intro-page.hidden {
    transform: translateY(-100%);
}

.intro-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: 1;
}

.intro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    z-index: 2;
}

.intro-content {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Brand Header */
.brand-header {
    animation: fadeInUp 1.5s ease-out;
}

.brand-tag {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
}

.main-title {
    font-family: var(--font-accent);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.main-title .accent {
    color: transparent;
    -webkit-text-stroke: 1px var(--primary-color);
}

/* Intro Footer */
.intro-footer {
    max-width: 500px;
    animation: fadeInUp 1.5s ease-out 0.5s both;
}

.intro-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Loading Bar */
.loading-container {
    margin-bottom: 2rem;
}

.loading-bar {
    width: 100%;
    height: 2px;
    background: var(--glass-border);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

/* Buttons */

#enter-btn {
    padding: 1.2rem 2.5rem;
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
}

#enter-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateX(10px);
}

#enter-btn.hidden {
    display: none;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    right: 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    opacity: 0.5;
}

.scroll-indicator span {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    writing-mode: vertical-lr;
}

.mouse {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    animation: scrollLine 2s infinite;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .intro-content {
        height: 70%;
    }
    .main-title {
        font-size: 4rem;
    }
    .intro-footer {
        max-width: 100%;
    }
}

.scramble-text,
.scramble-text.opacity-70,
.scramble-text.opacity-60,
.scramble-text.opacity-40,
.scramble-text.opacity-80 {
    opacity: 0;
}


