:root {
    --bg: #08090b;
    --bg-soft: #111318;
    --card: #171a21;
    --card-border: #2a2f3a;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --orange: #ff7a18;
    --orange-strong: #ff5a00;
    --orange-soft: rgba(255, 122, 24, 0.16);
    --danger: #ff4d4d;
    --success: #22c55e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 122, 24, 0.18), transparent 30rem),
        radial-gradient(circle at bottom right, rgba(255, 90, 0, 0.12), transparent 26rem),
        linear-gradient(145deg, #050506 0%, #111318 52%, #08090b 100%);
}

.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
}

.card {
    width: min(100%, 460px);
    background: linear-gradient(180deg, rgba(23, 26, 33, 0.96), rgba(13, 15, 19, 0.98));
    border: 1px solid var(--card-border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 30px 22px;
    text-align: center;
}

.brand-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #111;
    font-weight: 900;
    letter-spacing: -0.08em;
    background: linear-gradient(135deg, var(--orange), #ffb000);
    box-shadow: 0 12px 28px rgba(255, 122, 24, 0.35);
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 8vw, 2.7rem);
    letter-spacing: -0.06em;
    line-height: 0.98;
}

.subtitle {
    margin: 16px auto 26px;
    max-width: 340px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.upload-form {
    display: grid;
    gap: 16px;
}

input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-picker {
    display: block;
    padding: 24px 18px;
    border: 1.5px dashed rgba(255, 122, 24, 0.75);
    border-radius: 22px;
    background: var(--orange-soft);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.file-picker:active {
    transform: scale(0.985);
}

.file-picker-title {
    display: block;
    color: var(--orange);
    font-size: 1.22rem;
    font-weight: 800;
}

.file-picker-help {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.92rem;
}

.file-summary {
    min-height: 22px;
    color: var(--muted);
    font-size: 0.94rem;
}

.primary-button {
    border: 0;
    border-radius: 18px;
    padding: 17px 18px;
    color: #111;
    background: linear-gradient(135deg, var(--orange), #ffb000);
    font-size: 1.08rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(255, 122, 24, 0.28);
}

.primary-button:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: none;
}

.progress-box,
.result-box,
.error-box {
    margin-top: 20px;
}

.progress-text {
    color: var(--muted);
    margin-bottom: 10px;
}

.progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #242833;
}

.progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--orange-strong), #ffb000);
    transition: width 0.25s ease;
}

.result-box {
    padding: 20px;
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 22px;
    background: rgba(34, 197, 94, 0.08);
}

.result-label,
.result-hint {
    color: var(--muted);
    margin: 0;
    line-height: 1.45;
}

.result-code {
    margin: 14px auto;
    padding: 14px 16px;
    width: fit-content;
    min-width: 160px;
    border-radius: 18px;
    color: #111;
    background: linear-gradient(135deg, var(--orange), #ffb000);
    font-size: 2.6rem;
    font-weight: 950;
    letter-spacing: 0.12em;
}

.error-box {
    padding: 15px 16px;
    border: 1px solid rgba(255, 77, 77, 0.38);
    border-radius: 18px;
    color: #ffd7d7;
    background: rgba(255, 77, 77, 0.1);
    text-align: left;
    line-height: 1.45;
}

.hidden {
    display: none !important;
}

@media (max-width: 380px) {
    .card {
        padding: 24px 16px;
        border-radius: 24px;
    }

    .result-code {
        font-size: 2.15rem;
    }
}
