/* ========================================
   NEON RELAY - Cyberpunk Theme
   ======================================== */

:root {
    /* Cyberpunk Color Palette */
    --bg-void: #030308;
    --bg-primary: #0a0a12;
    --bg-secondary: #12121f;
    --bg-tertiary: #1a1a2e;
    --bg-card: rgba(10, 10, 20, 0.85);

    /* Neon Colors */
    --neon-cyan: #00ffff;
    --neon-cyan-dim: #00b8b8;
    --neon-pink: #ff00ff;
    --neon-pink-dim: #cc00cc;
    --neon-yellow: #ffff00;
    --neon-green: #39ff14;
    --neon-blue: #00d4ff;
    --neon-purple: #bf00ff;
    --neon-orange: #ff6b00;

    /* Text Colors */
    --text-primary: #e0e0ff;
    --text-secondary: #a0a0cc;
    --text-dim: #7777aa;

    /* Semantic Colors */
    --success: #39ff14;
    --error: #ff3366;
    --warning: #ffff00;

    /* Borders & Effects */
    --border-dim: rgba(0, 255, 255, 0.15);
    --border-glow: rgba(0, 255, 255, 0.4);
    --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.2);
    --glow-pink: 0 0 20px rgba(255, 0, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.2);
    --glow-text-cyan: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.4);
    --glow-text-pink: 0 0 10px rgba(255, 0, 255, 0.8), 0 0 20px rgba(255, 0, 255, 0.4);

    /* Layout */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Fonts */
    --font-sans: "Manrope", sans-serif;
    --font-display: "Space Grotesk", sans-serif;
    --font-mono: "JetBrains Mono", monospace;
}

/* ========================================
   BASE STYLES
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Cyberpunk Animated Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: grid-scroll 20s linear infinite;
    transform-origin: center center;
}

@keyframes grid-scroll {
    0% {
        transform: translate(-25%, -25%) perspective(500px) rotateX(5deg);
    }
    100% {
        transform: translate(-25%, -25%) perspective(500px) rotateX(5deg) translateY(50px);
    }
}

/* Gradient Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(0, 255, 255, 0.15), transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(255, 0, 255, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(0, 212, 255, 0.08), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* Mouse-reactive glow element */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.15) 0%, rgba(255, 0, 255, 0.05) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-glow.active {
    opacity: 1;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--neon-pink);
    text-shadow: var(--glow-text-pink);
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    width: 100%;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-panel {
    display: flex;
    justify-content: center;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); text-shadow: 0 0 10px rgba(57, 255, 20, 0.5); }
.text-error { color: var(--error); text-shadow: 0 0 10px rgba(255, 51, 102, 0.5); }
.text-secondary { color: var(--text-secondary); }

.text-emphasis {
    color: var(--text-primary);
    font-weight: 600;
}

.text-primary-device {
    color: var(--neon-cyan);
    font-weight: 600;
    text-shadow: var(--glow-text-cyan);
}

.text-guest-device {
    color: var(--neon-pink);
    font-weight: 600;
    text-shadow: var(--glow-text-pink);
}

.text-encryption-key {
    color: var(--neon-yellow);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.6);
}

.mt-4 { margin-top: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-3 { padding-top: 1rem; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.d-block { display: block; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* ========================================
   TYPOGRAPHY
   ======================================== */

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    text-shadow: var(--glow-text-cyan);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-dim);
    display: inline-block;
    background: rgba(0, 255, 255, 0.05);
}

.auth-header {
    margin-bottom: 2rem;
}

/* Hero Banner with background image */
.hero-banner {
    position: relative;
    padding: 3rem 2rem;
    margin: -3rem -2rem 2rem -2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/image_generated.png') center/cover no-repeat;
    opacity: 0.4;
    z-index: 0;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.hero-banner > * {
    position: relative;
    z-index: 2;
}

.hero-banner .auth-header {
    margin-bottom: 0;
}

.auth-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(
        90deg,
        var(--neon-cyan) 0%,
        var(--neon-pink) 25%,
        var(--neon-cyan) 50%,
        var(--neon-pink) 75%,
        var(--neon-cyan) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: neon-gradient-shift 3s linear infinite, neon-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(255, 0, 255, 0.5)) drop-shadow(0 0 40px rgba(0, 255, 255, 0.3));
    position: relative;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.auth-title:focus,
.auth-title:focus-visible {
    outline: none;
}

.title-char-large {
    font-size: 1.3em;
    font-weight: 800;
}

@keyframes neon-gradient-shift {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes neon-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(255, 0, 255, 0.5)) drop-shadow(0 0 40px rgba(0, 255, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(0, 255, 255, 1)) drop-shadow(0 0 30px rgba(255, 0, 255, 0.7)) drop-shadow(0 0 60px rgba(0, 255, 255, 0.5));
    }
}

/* Glitch effect for main title */
.auth-header .auth-title {
    animation: neon-gradient-shift 3s linear infinite, neon-pulse 2s ease-in-out infinite, subtle-flicker 4s infinite;
}

@keyframes subtle-flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.85; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

.auth-subtitle {
    font-family: var(--font-mono);
    color: var(--neon-pink);
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-shadow: var(--glow-text-pink);
    letter-spacing: 0.05em;
}

.auth-description {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 50ch;
    margin-top: 1rem;
    line-height: 1.7;
}

.panel-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    background: linear-gradient(
        90deg,
        var(--neon-cyan) 0%,
        var(--neon-pink) 25%,
        var(--neon-cyan) 50%,
        var(--neon-pink) 75%,
        var(--neon-cyan) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: neon-gradient-shift 3s linear infinite, neon-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(255, 0, 255, 0.5)) drop-shadow(0 0 40px rgba(0, 255, 255, 0.3));
}

/* ========================================
   CARDS & PANELS
   ======================================== */

.card,
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.card::before,
.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--neon-cyan) 20%,
        var(--neon-pink) 80%,
        transparent);
    opacity: 0.6;
}

.card:hover,
.panel:hover {
    border-color: var(--border-glow);
    box-shadow:
        0 0 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.panel-narrow {
    max-width: 420px;
    margin: 0 auto;
}

.panel-wide {
    max-width: 560px;
    margin: 0 auto;
}

.panel-muted {
    background: rgba(0, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-dim);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    box-shadow:
        0 0 10px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: rgba(0, 255, 255, 0.15);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
    text-shadow: var(--glow-text-cyan);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-dim);
}

.btn-secondary:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.btn-success {
    background: transparent;
    color: var(--success);
    border: 2px solid var(--success);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.btn-success:hover {
    background: rgba(57, 255, 20, 0.15);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

.btn-icon {
    width: 2.8rem;
    height: 2.8rem;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: var(--text-dim);
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.2),
        inset 0 0 10px rgba(0, 255, 255, 0.05);
}

.form-control:hover:not(:focus) {
    border-color: rgba(0, 255, 255, 0.3);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ========================================
   STEPS
   ======================================== */

.hero-steps {
    display: grid;
    gap: 0.75rem;
}

.step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    background: rgba(0, 255, 255, 0.02);
    border: 1px solid var(--border-dim);
    border-left: 3px solid var(--neon-cyan);
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
}

.step:hover {
    background: rgba(0, 255, 255, 0.05);
    border-left-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-mono);
    color: var(--bg-void);
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(255, 0, 255, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: step-glow 2s ease-in-out infinite;
}

@keyframes step-glow {
    0%, 100% {
        box-shadow:
            0 0 15px rgba(0, 255, 255, 0.6),
            0 0 30px rgba(255, 0, 255, 0.4),
            inset 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 0 25px rgba(0, 255, 255, 0.8),
            0 0 50px rgba(255, 0, 255, 0.6),
            inset 0 0 15px rgba(255, 255, 255, 0.4);
    }
}

.step-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
}

.step-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem;
}

.loading-state .spinner {
    width: 3rem;
    height: 3rem;
}

.loading-text {
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-shadow: var(--glow-text-cyan);
    letter-spacing: 0.05em;
}

/* ========================================
   SPINNER
   ======================================== */

.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(0, 255, 255, 0.2);
    border-top: 2px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.status-line {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* ========================================
   QR CODE
   ======================================== */

.qr-container {
    background: #050508;
    padding: 1rem;
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink)) 1;
    display: inline-block;
    box-shadow:
        0 0 30px rgba(255, 0, 255, 0.4),
        0 0 60px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
    position: relative;
    animation: qr-glow 2s ease-in-out infinite;
}

@keyframes qr-glow {
    0%, 100% {
        box-shadow:
            0 0 30px rgba(255, 0, 255, 0.4),
            0 0 60px rgba(0, 255, 255, 0.2),
            inset 0 0 20px rgba(255, 0, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 40px rgba(255, 0, 255, 0.6),
            0 0 80px rgba(0, 255, 255, 0.4),
            inset 0 0 30px rgba(255, 0, 255, 0.2);
    }
}

/* Corner decorations */
.qr-container::before,
.qr-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-pink);
}

.qr-container::before {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
    box-shadow: -5px -5px 10px rgba(255, 0, 255, 0.3);
}

.qr-container::after {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
    box-shadow: 5px 5px 10px rgba(255, 0, 255, 0.3);
}

.qr-container canvas,
.qr-container img {
    display: block;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

.qr-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   VERIFICATION & CODE ELEMENTS
   ======================================== */

.code-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.2);
    text-shadow: var(--glow-text-pink);
}

.verification-block {
    display: grid;
    gap: 0.75rem;
    justify-items: center;
}

/* ========================================
   TIMER
   ======================================== */

.timer-display {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.timer-label {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.timer-value {
    font-family: var(--font-mono);
    font-weight: bold;
    color: var(--neon-cyan);
    text-shadow: var(--glow-text-cyan);
}

.timer-banner {
    text-align: right;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* ========================================
   WARNING OVERLAY
   ======================================== */

.warning-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--error);
    box-shadow: inset 0 0 50px rgba(255, 51, 102, 0.1);
}

.warning-content {
    text-align: center;
}

.warning-content h3 {
    color: var(--error);
    text-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
    font-family: var(--font-display);
}

/* ========================================
   LINK PREVIEW
   ======================================== */

.link-preview {
    word-break: break-all;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--neon-cyan);
}

.link-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: 0.5rem;
}

.link-row .link-preview {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-dim);
}

.btn-copy {
    white-space: nowrap;
}

/* ========================================
   NEON ICONS
   ======================================== */

.neon-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.neon-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    filter: drop-shadow(0 0 3px currentColor);
    transition: all 0.2s ease;
}

.neon-icon-lg svg {
    width: 4rem;
    height: 4rem;
    stroke-width: 1.5;
}

.neon-icon-cyan {
    color: var(--neon-cyan);
}

.neon-icon-pink {
    color: var(--neon-pink);
}

.neon-icon-green {
    color: var(--neon-green);
}

.btn:hover .neon-icon svg {
    filter: drop-shadow(0 0 6px currentColor);
}

/* Device connected icon animation */
.device-icon {
    animation: pulse-device 2s ease-in-out infinite;
}

@keyframes pulse-device {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 40px rgba(0, 255, 255, 0.4));
    }
}

/* ========================================
   CONNECTION PHASE - Image Display
   ======================================== */

.connection-phase {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.connection-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.connection-image-container {
    position: relative;
    width: 280px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.connection-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    position: relative;
    z-index: 1;
}

.connection-frame {
    position: absolute;
    inset: -4px;
    border: 2px solid transparent;
    border-radius: calc(var(--radius-md) + 4px);
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: frame-rotate 3s linear infinite;
    z-index: 2;
}

@keyframes frame-rotate {
    0% {
        background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan)) border-box;
    }
    33% {
        background: linear-gradient(225deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan)) border-box;
    }
    66% {
        background: linear-gradient(315deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan)) border-box;
    }
    100% {
        background: linear-gradient(405deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan)) border-box;
    }
}

.connection-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(0, 255, 255, 0.2) 0%, transparent 70%);
    animation: glow-pulse 2s ease-in-out infinite;
    z-index: 0;
    border-radius: var(--radius-lg);
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Data stream particles */
.data-stream {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.data-particle {
    width: 6px;
    height: 6px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
    animation: particle-flow 1.5s ease-in-out infinite;
}

.data-particle:nth-child(2) {
    animation-delay: 0.2s;
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}

.data-particle:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes particle-flow {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1.2);
    }
}

/* Connection info section */
.connection-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    margin-top: 1rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-green);
    animation: status-blink 1s ease-in-out infinite;
}

@keyframes status-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.code-pill-lg {
    font-size: 1.1rem;
    padding: 0.6rem 1.25rem;
}

.waiting-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.waiting-text .spinner {
    width: 1rem;
    height: 1rem;
}

/* Sent Success Card */
.sent-success-card {
    margin-top: 2rem;
}

.success-glow {
    background: radial-gradient(ellipse at center, rgba(57, 255, 20, 0.25) 0%, transparent 70%) !important;
}

.success-stream .success-particle {
    background: var(--neon-green) !important;
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green) !important;
}

.success-stream .success-particle:nth-child(2) {
    background: var(--neon-cyan) !important;
    box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan) !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.5), 0 0 50px rgba(0, 255, 255, 0.2);
    }
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: var(--glow-text-cyan);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ========================================
   BLAZOR ERROR UI
   ======================================== */

#blazor-error-ui {
    background: var(--error);
    bottom: 0;
    box-shadow: 0 -2px 20px rgba(255, 51, 102, 0.5);
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
    font-family: var(--font-mono);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-copy {
        order: 1;
    }

    .hero-panel {
        order: 2;
    }
}

@media (max-width: 720px) {
    .shell {
        padding: 2rem 1.25rem 3rem;
    }

    .card,
    .panel {
        padding: 1.5rem;
    }

    .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-icon {
        width: 100%;
    }

    .auth-title {
        font-size: 2rem;
    }

    .step {
        padding: 0.75rem 1rem;
    }
}

/* ========================================
   SCANLINE EFFECT (optional subtle overlay)
   ======================================== */

body.scanlines::before {
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px
        ),
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 2px, 50px 50px, 50px 50px;
}
