@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&family=Libre+Baskerville:wght@700&display=swap');

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

:root {
    --bg: #080e0a;
    --surface: #0c1410;
    --border: #172112;
    --border-bright: #1f3020;
    --text: #cde8d4;
    --muted: #4a6650;
    --accent: #c8ff00;
    --accent-dim: rgba(200, 255, 0, 0.08);
    --accent-glow: rgba(200, 255, 0, 0.3);
    --success: #00ffaa;
    --success-dim: rgba(0, 255, 170, 0.06);
    --error: #ff4455;
    --error-dim: rgba(255, 68, 85, 0.06);
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --font-display: 'Libre Baskerville', Georgia, serif;
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    min-height: 100vh;
}

/* Fine dot-grid — scientific graph paper feel */
.noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(200, 255, 0, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Major axis lines */
.grid-overlay {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(200, 255, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 255, 0, 0.03) 1px, transparent 1px);
    background-size: 112px 112px;
}

/* Page layout */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-bright);
    box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
    font-family: var(--font-mono);
    font-size: 12pt;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--accent);
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--muted);
}

.navbar-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: 32px;
    text-align: right;
}

.navbar-links a {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--muted);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
}

.navbar-links a:hover {
    color: var(--accent);
}

/* Page footer */
.page-footer {
    width: 100%;
    padding: 16px 32px;
    background: var(--surface);
    border-top: 1px solid var(--border-bright);
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--muted);
    z-index: 1;
}

.page-footer-brand {
    color: var(--accent);
    font-weight: 700;
}

/* Main App */
.app {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    padding: 2rem 40px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.app.column {
    flex-direction: column;
}

/* Intro text */
.intro-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    width: 100%;
    max-width: 685px;

    margin-bottom: 1rem;

    font-size: 12pt;
    flex-basis: 0;
    flex-grow: 1;
}

.intro-text p {
    line-height: 1.75;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.intro-text em {
    color: var(--text);
    font-style: italic;
}

.color-links a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-dim);
    transition: border-color 0.2s, color 0.2s;
}

.color-links a:hover {
    color: #fff;
    border-bottom-color: var(--accent);
}

.card {
    position: relative;
    max-width: 685px;
    padding: 25px 40px;
    flex-basis: 0;
    flex-grow: 1;

    background: var(--surface);
    border: 1px solid var(--border-bright);
    box-shadow: 0 0 0 1px var(--border), 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(200, 255, 0, 0.04);
}

/* Corner accents */
.card::before,
.card::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--accent);
    border-style: solid;
}

.card::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.fadeUp {
    animation: fadeUp 0.4s ease both;
}

.fadeDown {
    animation: fadeDown 0.4s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.card-header {
    margin-bottom: 36px;
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 10px;
    margin-bottom: 20px;
}

.title {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: #e8f5ea;
    margin-bottom: 14px;
}

.title span {
    color: var(--accent);
    font-style: italic;
}

.subtitle {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    letter-spacing: 0.04em;
}

/* Input */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--muted);
    margin-bottom: 10px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-bright);
    background: var(--bg);
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim), 0 0 16px var(--accent-glow);
}

.input-prefix {
    padding: 0 14px;
    font-size: 18px;
    color: var(--accent);
    user-select: none;
}

.code-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 15px;
    letter-spacing: 0.12em;
    padding: 14px 16px 14px 0;
}

.code-input::placeholder {
    color: var(--border-bright);
}


/* Verify button */
.verify-btn {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: #000;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    margin-bottom: 24px;
}

.verify-btn:hover:not(:disabled) {
    opacity: 0.88;
    box-shadow: 0 0 24px var(--accent-glow);
}

.verify-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.verify-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.verify-btn.loading {
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    cursor: wait;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status panel */
.status-panel {
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-panel.success {
    border-color: var(--success);
    background: var(--success-dim);
}

.status-panel.error {
    border-color: var(--error);
    background: var(--error-dim);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-panel.success .status-dot {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.status-panel.error .status-dot {
    background: var(--error);
    box-shadow: 0 0 6px var(--error);
}

.status-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.status-panel.success .status-label {
    color: var(--success);
}

.status-panel.error .status-label {
    color: var(--error);
}

.status-message {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 0;
}

.status-message strong {
    font-weight: 700;
}

.status-message em {
    font-style: italic;
}

.status-message p {
    margin: 0.5rem 0rem;
}

/* Download button */
.status-panel .download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--success);
    color: var(--success);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.download-btn:hover {
    background: var(--success);
    color: #000;
}

.download-btn.clicked {
    opacity: 0.7;
}

.download-icon {
    font-size: 16px;
}

/* Video player */
.video-wrapper {
    position: relative;
    margin-top: 16px;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Footer */
.card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 20px;
    justify-content: center;
}

.separator {
    color: var(--border-bright);
}

@media (max-width: 950px) {
    .app {
        flex-direction: column;
        padding: 2rem 24px;
        justify-content: flex-start;
    }

    .intro-text {
        flex-grow: 0 !important;
    }

    .card {
        flex-grow: 0 !important;
        padding: 20px 25px !important;
    }
}

.center {
    text-align: center;
}

.left {
    text-align: left;
}
