:root {
    /* Cyberpunk Palette */
    --bg-dark: #050510;
    --card-bg: rgba(20, 20, 35, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);

    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-green: #00ff9d;
    --neon-red: #ff0055;
    --neon-gold: #ffbd00;

    --text-main: #e0e6ed;
    --text-dim: #94a3b8;

    --font-ui: 'Segoe UI', system-ui, sans-serif;
    --font-code: 'JetBrains Mono', 'Consolas', monospace;
}

* {
    box-sizing: border-box;
    outline: none;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(188, 19, 254, 0.1), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.1), transparent 25%);
    color: var(--text-main);
    font-family: var(--font-ui);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* CRT Scanline Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 999;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 25px;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
}

/* --- Header --- */
.header-section {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
    box-shadow: 0 0 15px var(--neon-blue);
}

h1 {
    font-size: 2.8rem;
    margin: 0;
    background: linear-gradient(135deg, #fff, var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.pass-criteria {
    display: inline-block;
    margin-top: 15px;
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.card h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Editor --- */
.editor-container {
    position: relative;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0b0b14;
}

.no-paste-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 0, 85, 0.15);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    pointer-events: none;
    font-weight: bold;
    z-index: 10;
}

textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    color: #a5b3ce;
    border: none;
    padding: 20px;
    font-family: var(--font-code);
    font-size: 14px;
    line-height: 1.6;
    resize: none;
}

textarea:focus {
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

/* --- HUD --- */
.hud-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    padding: 10px 10px 10px 35px;
    margin-bottom: 8px;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-dim);
    border-radius: 6px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.checklist li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f111";
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 0.6rem;
    color: #444;
}

.checklist li.checked {
    border-left-color: var(--neon-green);
    color: #fff;
    background: rgba(0, 255, 157, 0.05);
}

.checklist li.checked::before {
    content: "\f00c";
    color: var(--neon-green);
    font-size: 0.8rem;
}

.checklist li.warning {
    border-left-color: var(--neon-gold);
}

.checklist li.warning::before {
    content: "\f12a";
    color: var(--neon-gold);
}

.checklist li.error {
    border-left-color: var(--neon-red);
}

.checklist li.error::before {
    content: "\f00d";
    color: var(--neon-red);
}

/* --- Score Ring --- */
.score-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(#333 0% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: background 1s cubic-bezier(0.2, 1, 0.3, 1);
    position: relative;
}

.score-circle::after {
    content: "";
    position: absolute;
    width: 135px;
    height: 135px;
    border-radius: 50%;
    background: #0b0b14;
}

.score-text {
    position: absolute;
    z-index: 2;
    text-align: center;
}

.score-val {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
}

.score-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.pulse-success {
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 10px var(--neon-green);
    }

    50% {
        box-shadow: 0 0 40px var(--neon-green);
    }

    100% {
        box-shadow: 0 0 10px var(--neon-green);
    }
}

/* --- Buttons --- */
.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

button {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    font-family: var(--font-ui);
    letter-spacing: 1px;
}

.btn-validate {
    background: linear-gradient(90deg, #4f46e5, var(--neon-blue));
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.2);
}

.btn-validate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.4);
}

.btn-sim {
    background: rgba(255, 255, 255, 0.05);
    color: var(--neon-gold);
    border: 1px solid rgba(255, 189, 0, 0.3);
}

.btn-sim:hover {
    background: rgba(255, 189, 0, 0.1);
}

/* --- Locked Email Button --- */
.email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: #1a1a20;
    border: 1px solid #333;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: not-allowed;
    transition: all 0.5s;
    pointer-events: none;
    /* Disabled by default */
}

.email-btn.unlocked {
    background: rgba(0, 255, 157, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
    cursor: pointer;
    pointer-events: auto;
    animation: bounceIn 0.5s;
}

.email-btn.unlocked:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

@keyframes bounceIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Console --- */
#console {
    margin-top: 25px;
    background: #080810;
    border-left: 3px solid #333;
    padding: 20px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: #a5b3ce;
    border-radius: 0 8px 8px 0;
    display: none;
}

.console-pass {
    border-color: var(--neon-green) !important;
    color: var(--neon-green) !important;
    background: rgba(0, 255, 157, 0.05) !important;
}

.console-fail {
    border-color: var(--neon-red) !important;
    color: var(--neon-red) !important;
}

/* --- Particles (Confetti) --- */
.particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    pointer-events: none;
    z-index: 9999;
    animation: fall 2s linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}