@import url('https://fonts.googleapis.com/css2?family=Jua&family=Nunito:wght@400;700;800&display=swap');

:root {
    --bg: #0f1115;
    --card: #151b23;
    --ink: #f8fafc;
    --muted: #a6adbb;
    --accent: #ff8b3d;
    --accent-2: #ffd166;
    --outline: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.45);
}

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

body {
    font-family: 'Nunito', sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 139, 61, 0.2), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(255, 209, 102, 0.18), transparent 40%),
        linear-gradient(160deg, #0a0e14 0%, #101722 55%, #0b111a 100%);
    color: var(--ink);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2.5rem 1.4rem;
}

.page {
    width: min(980px, 100%);
    display: grid;
    gap: 2rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.nav__brand {
    font-family: 'Jua', sans-serif;
    font-size: 1.4rem;
}

.nav__links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.nav__link {
    color: var(--muted);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 0.95rem;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--ink);
    border-color: var(--outline);
    background: rgba(255, 255, 255, 0.05);
}

.hero {
    text-align: center;
    display: grid;
    gap: 0.8rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-2);
    font-size: 0.75rem;
}

h1 {
    font-family: 'Jua', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3rem);
}

h2 {
    font-family: 'Jua', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.subtitle {
    color: var(--muted);
    font-size: 1.05rem;
}

.card {
    background: var(--card);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--outline);
    box-shadow: 0 18px 40px var(--shadow);
    text-align: center;
}

.form-card,
.comments-card {
    text-align: left;
}

#disqus_thread {
    margin-top: 1rem;
    min-height: 320px;
}

.hint {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
}

.result {
    background: #11141c;
    border-radius: 18px;
    padding: 1.2rem 1rem;
    margin-bottom: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 70px;
    display: grid;
    place-items: center;
    gap: 0.8rem;
}

.result__placeholder {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--muted);
}

.result__card {
    display: grid;
    gap: 0.8rem;
    align-items: center;
    justify-items: center;
}

.result__image {
    width: min(220px, 100%);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45);
}

.result__text {
    display: grid;
    gap: 0.3rem;
}

.result__name {
    font-size: 1.25rem;
    font-weight: 800;
}

.result__link {
    font-size: 0.95rem;
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 700;
}

.result__link:hover {
    text-decoration: underline;
}

.action {
    background: linear-gradient(135deg, #ff8b3d, #ffd166);
    border: none;
    color: #1b120a;
    font-weight: 800;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(255, 139, 61, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(255, 139, 61, 0.45);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.file-upload {
    background: linear-gradient(135deg, #ff8b3d, #ffd166);
    color: #1b120a;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(255, 139, 61, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.file-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(255, 139, 61, 0.45);
}

.status {
    color: var(--muted);
    font-size: 0.95rem;
}

.stage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.webcam {
    background: #0b1119;
    border-radius: 18px;
    border: 1px solid var(--outline);
    min-height: 240px;
    display: grid;
    place-items: center;
    padding: 0.8rem;
}

.webcam canvas {
    border-radius: 12px;
    width: 100%;
    height: auto;
}

.preview-text {
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
    padding: 1rem;
}

.preview-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

.results {
    display: grid;
    gap: 0.8rem;
}

.result-row {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--outline);
    background: rgba(255, 255, 255, 0.03);
}

.result-title {
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.result-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.result-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ff8b3d, #ffd166);
}

.form {
    display: grid;
    gap: 1rem;
    margin-top: 1.2rem;
}

.field {
    display: grid;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #11141c;
    color: var(--ink);
    font-size: 0.95rem;
    font-family: inherit;
}

.field input:focus,
.field textarea:focus {
    outline: 2px solid rgba(255, 139, 61, 0.5);
    border-color: rgba(255, 139, 61, 0.5);
}

.form-action {
    justify-self: start;
}

.side-by-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 520px) {
    .card {
        padding: 1.6rem;
    }

    .form-card,
    .comments-card {
        text-align: center;
    }

    .form-action {
        justify-self: center;
        width: 100%;
    }
}
