/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00f0ff;
    --primary-dark: #00a8b3;
    --secondary: #7b2dff;
    --accent: #ff00aa;
    --success: #00ff88;
    --warning: #ffaa00;
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --text: #ffffff;
    --text-muted: #6b7280;
    --glow-primary: 0 0 20px rgba(0, 240, 255, 0.5);
    --glow-secondary: 0 0 20px rgba(123, 45, 255, 0.5);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
}

/* Background Effects */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(123, 45, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 0, 170, 0.05) 0%, transparent 70%);
    z-index: 1;
}

#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.4;
}

/* Floating Orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    animation: float 10s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    opacity: 0.12;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    opacity: 0.15;
    animation-delay: -3s;
}

.orb-3 {
    width: 150px;
    height: 150px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    opacity: 0.08;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary);
    border-radius: 50%;
    animation: particleFloat 12s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

/* ========================================
   MAIN LAYOUT - TWO COLUMNS
   ======================================== */

.container {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 2rem 4rem;
    gap: 3rem;
}

.left-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
}

/* ========================================
   HUD SYSTEM
   ======================================== */

.hud-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.hud-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hud-ring-outer {
    width: 100%;
    height: 100%;
    animation: rotateClockwise 20s linear infinite;
}

.hud-ring-middle {
    width: 90%;
    height: 90%;
    animation: rotateCounterClockwise 15s linear infinite;
}

@keyframes rotateClockwise {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateCounterClockwise {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

.hud-ring svg {
    width: 100%;
    height: 100%;
}

.ring-track {
    fill: none;
    stroke: rgba(0, 240, 255, 0.1);
    stroke-width: 2;
}

.ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1194;
    stroke-dashoffset: 300;
    filter: drop-shadow(0 0 10px var(--primary));
    transition: stroke-dashoffset 0.5s ease;
}

.ring-inner-track {
    fill: none;
    stroke: rgba(123, 45, 255, 0.1);
    stroke-width: 1;
    stroke-dasharray: 10 5;
}

.ring-dashed {
    fill: none;
    stroke: rgba(0, 240, 255, 0.2);
    stroke-width: 1;
    stroke-dasharray: 20 10;
}

.data-points .data-point {
    fill: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary));
    animation: dataPulse 2s ease-in-out infinite;
}

.data-point:nth-child(odd) {
    animation-delay: -1s;
}

@keyframes dataPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Hexagon */
.hud-hexagon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55%;
    height: 55%;
    animation: hexPulse 4s ease-in-out infinite;
}

.hud-hexagon svg {
    width: 100%;
    height: 100%;
}

.hex-outline {
    fill: none;
    stroke: var(--secondary);
    stroke-width: 2;
    filter: drop-shadow(0 0 10px var(--secondary));
    opacity: 0.5;
}

.hex-inner {
    fill: rgba(123, 45, 255, 0.05);
    stroke: var(--secondary);
    stroke-width: 1;
    opacity: 0.3;
}

@keyframes hexPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

/* Core */
.hud-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
}

.core-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: corePulseAnim 2s ease-out infinite;
}

.core-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: corePulseAnim 2s ease-out infinite 0.5s;
}

@keyframes corePulseAnim {
    0% { width: 50px; height: 50px; opacity: 1; }
    100% { width: 100px; height: 100px; opacity: 0; }
}

.core-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3), inset 0 0 20px rgba(0, 240, 255, 0.1);
}

.core-icon {
    color: var(--primary);
    width: 24px;
    height: 24px;
}

.core-icon svg {
    width: 100%;
    height: 100%;
}

/* Scanner */
.hud-scanner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform-origin: center;
    animation: scannerRotate 3s linear infinite;
    opacity: 0.5;
}

@keyframes scannerRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.title-line {
    display: block;
    letter-spacing: 0.1em;
}

.title-line.accent {
    font-size: 1.4em;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    background-size: 200% auto;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
}

.tagline-word {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.tagline-word:nth-child(1) { animation-delay: 0.5s; }
.tagline-word:nth-child(2) { animation-delay: 0.7s; }
.tagline-word:nth-child(3) { animation-delay: 0.9s; }
.tagline-word:nth-child(4) { animation-delay: 1.1s; }
.tagline-word:nth-child(5) { animation-delay: 1.3s; }

.tagline-word.highlight {
    color: var(--primary);
    font-weight: 600;
    text-shadow: var(--glow-primary);
}

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

/* ========================================
   SYSTEM STATUS
   ======================================== */

.system-status {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: statusBlink 1s ease-in-out infinite;
    box-shadow: 0 0 10px var(--success);
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--primary);
}

.status-id {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* Terminal Output */
.terminal-output {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-align: left;
    margin-bottom: 1rem;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0;
    opacity: 0;
    transform: translateX(-10px);
    animation: terminalFadeIn 0.3s ease forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.2s; }
.terminal-line:nth-child(2) { animation-delay: 0.6s; }
.terminal-line:nth-child(3) { animation-delay: 1.0s; }
.terminal-line:nth-child(4) { animation-delay: 1.4s; }
.terminal-line:nth-child(5) { animation-delay: 1.8s; }
.terminal-line:nth-child(6) { animation-delay: 2.2s; }

@keyframes terminalFadeIn {
    to { opacity: 1; transform: translateX(0); }
}

.terminal-prompt {
    color: var(--primary);
    font-weight: bold;
}

.terminal-text {
    color: var(--text-muted);
    flex: 1;
}

.terminal-status {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.terminal-status.success {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.terminal-status.pending {
    background: rgba(0, 240, 255, 0.2);
    color: var(--primary);
    border: 1px solid rgba(0, 240, 255, 0.3);
    animation: pendingPulse 1s ease-in-out infinite;
}

.terminal-status.waiting {
    background: rgba(255, 170, 0, 0.2);
    color: var(--warning);
    border: 1px solid rgba(255, 170, 0, 0.3);
}

@keyframes pendingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(0, 240, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.stat-box {
    text-align: center;
    padding: 0.5rem 0;
}

.stat-number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.stat-number.blink {
    color: var(--success);
    animation: statusBlink 1s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.stat-box .stat-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Progress Grid */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.progress-item {
    text-align: left;
}

.progress-item.full-width {
    grid-column: 1 / -1;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.progress-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.progress-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: var(--primary);
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar.large {
    height: 6px;
    border-radius: 3px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary);
}

.progress-fill.secondary {
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.progress-fill.accent {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.progress-fill.gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.progress-segments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    pointer-events: none;
}

.progress-segments span {
    flex: 1;
    border-right: 2px solid rgba(10, 10, 15, 0.5);
}

.progress-segments span:last-child {
    border-right: none;
}

/* ========================================
   SIGNUP FORM
   ======================================== */

.signup-container {
    width: 100%;
}

.signup-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.signup-form {
    display: flex;
    gap: 0.75rem;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.input-wrapper input:focus + .input-border {
    width: 100%;
}

.submit-btn {
    position: relative;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    border: none;
    border-radius: 6px;
    color: var(--text);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.btn-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.btn-icon svg {
    width: 100%;
    height: 100%;
}

.submit-btn:hover .btn-icon {
    transform: translateX(3px);
}

.signup-success {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    color: var(--success);
    font-size: 0.85rem;
    animation: fadeInUp 0.5s ease;
}

.signup-success.show {
    display: flex;
}

.success-icon {
    width: 20px;
    height: 20px;
    background: var(--success);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

/* ========================================
   DECORATIONS
   ======================================== */

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
    z-index: 100;
    animation: scanLine 4s linear infinite;
    pointer-events: none;
}

@keyframes scanLine {
    0% { top: -2px; }
    100% { top: 100%; }
}

.corner {
    position: fixed;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    z-index: 100;
    pointer-events: none;
}

.corner-tl { top: 15px; left: 15px; border-right: none; border-bottom: none; }
.corner-tr { top: 15px; right: 15px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 15px; left: 15px; border-right: none; border-top: none; }
.corner-br { bottom: 15px; right: 15px; border-left: none; border-top: none; }

.corner-data {
    position: fixed;
    z-index: 100;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.corner-data-tl { top: 75px; left: 20px; }
.corner-data-tr { top: 75px; right: 20px; text-align: right; }
.corner-data-bl { bottom: 75px; left: 20px; }
.corner-data-br { bottom: 75px; right: 20px; text-align: right; }

.data-label {
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.data-value {
    color: var(--primary);
    letter-spacing: 0.05em;
}

.data-value.blink {
    animation: statusBlink 1s ease-in-out infinite;
}

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

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        padding: 1.5rem;
        gap: 1.5rem;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    html, body {
        overflow: auto;
    }

    .left-panel {
        order: 1;
    }

    .right-panel {
        order: 2;
        max-width: 100%;
    }

    .hud-container {
        width: 200px;
        height: 200px;
    }

    .corner-data {
        display: none;
    }
}

@media (max-width: 500px) {
    .signup-form {
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
    }

    .progress-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

::selection {
    background: var(--primary);
    color: var(--bg-dark);
}
