:root {
    --bg: #0f0a1f;
    --panel: #1a1333;
    --line: rgba(229, 231, 235, 0.16);
    --text: #f8f7ff;
    --muted: #c8bff0;
    --violet: #7b3ff2;
    --magenta: #d946ef;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(167, 139, 250, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167, 139, 250, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 50% 15%, rgba(217, 70, 239, 0.22), transparent 34%),
        var(--bg);
    background-size: 72px 72px, 72px 72px, auto, auto;
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.live-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 5vw;
}

.live-card {
    width: min(960px, 100%);
    display: grid;
    gap: 28px;
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(26, 19, 51, 0.78);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.eyebrow {
    margin: 0;
    color: #a78bfa;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 900;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: 0;
}

.live-form {
    display: grid;
    gap: 26px;
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: clamp(10px, 2vw, 22px);
    align-items: center;
}

.code-grid span {
    color: var(--muted);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
}

.code-part {
    width: 100%;
    min-height: clamp(76px, 12vw, 128px);
    border: 2px solid rgba(167, 139, 250, 0.38);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    text-align: center;
    font-size: clamp(2.2rem, 7vw, 5.8rem);
    font-weight: 900;
    letter-spacing: 0;
    outline: none;
}

.code-part:focus {
    border-color: var(--magenta);
    box-shadow: 0 0 0 5px rgba(217, 70, 239, 0.18);
}

button {
    min-height: clamp(64px, 9vw, 92px);
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--violet), var(--magenta));
    color: white;
    font-size: clamp(1.15rem, 3vw, 2rem);
    font-weight: 900;
    cursor: pointer;
}

.error {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 8px;
    background: rgba(127, 29, 29, 0.35);
    color: #fecaca;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 800;
}

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

    .code-grid span {
        display: none;
    }
}
