@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600;700;800&family=Plus+Jakarta+Sans:wght@500;600&display=swap');

:root {
    --bg: #ffffff;
    --bg-soft: #f9fafb;
    --text: #0f172a;
    --muted: #475569;
    --line: #dbe3ee;
    --primary: #0ea5e9;
    --primary-strong: #0284c7;
    --success: #10b981;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 18px 40px -24px rgba(14, 165, 233, 0.25);
    --radius-xl: 24px;
    --radius-lg: 16px;
}

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

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, #e0f2fe 0%, transparent 38%),
        radial-gradient(circle at 85% 0%, #d1fae5 0%, transparent 34%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    font-family: "Plus Jakarta Sans", sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(50%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.top-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.top-progress.is-visible {
    opacity: 1;
}

.top-progress__fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #22d3ee);
    box-shadow: 0 0 14px rgba(14, 165, 233, 0.45);
    transition: width 0.15s ease;
}

.page-shell {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 20px 56px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 48px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand__icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: linear-gradient(145deg, var(--primary), var(--primary-strong));
}

.brand__icon svg {
    width: 24px;
    height: 24px;
}

.brand strong,
.server-status strong {
    display: block;
    font-family: Inter, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
}

.brand p,
.server-status p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.14);
}

.hero {
    text-align: center;
    margin-bottom: 34px;
}

.hero h1 {
    margin: 0;
    font-family: Inter, sans-serif;
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    letter-spacing: -0.03em;
}

.hero p {
    margin: 14px auto 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.hero code {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 2px 7px;
    font-size: 0.9em;
}

.drop-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 28px;
}

.drop-card h2 {
    margin: 0;
    font-family: Inter, sans-serif;
    font-size: 1.2rem;
}

.hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.upload-form {
    margin-top: 18px;
}

.dropzone {
    width: 100%;
    border: 1.8px dashed #94a3b8;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.8);
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    cursor: pointer;
    padding: 18px;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
    border-color: var(--primary);
    background: #f0f9ff;
    box-shadow: 0 12px 24px -20px rgba(14, 165, 233, 0.6);
    transform: translateY(-1px);
}

.dropzone:focus-visible {
    outline: 3px solid #bae6fd;
    outline-offset: 2px;
}

.dropzone__icon svg {
    width: 42px;
    height: 42px;
    color: var(--primary);
}

.dropzone__title {
    display: block;
    margin-top: 12px;
    font-family: Inter, sans-serif;
    font-size: 1.12rem;
}

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

.file-name {
    margin: 14px 2px 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    border-radius: 12px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid transparent;
    font-family: Inter, sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

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

.btn--primary {
    color: white;
    background: linear-gradient(145deg, var(--primary), var(--primary-strong));
    box-shadow: 0 8px 20px -14px rgba(2, 132, 199, 0.85);
}

.btn--primary:hover:not(:disabled),
.btn--primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -18px rgba(2, 132, 199, 0.9);
}

.btn--ghost {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.84);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    background: #f8fafc;
    transform: translateY(-1px);
}

.status-message {
    margin: 16px 2px 0;
    min-height: 20px;
    color: var(--muted);
    font-size: 0.93rem;
}

.status-message.is-error {
    color: #b91c1c;
}

.status-message.is-success {
    color: #047857;
}

.stats-grid {
    margin-top: 22px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px;
    backdrop-filter: blur(10px);
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-family: Inter, sans-serif;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.success-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--success);
    position: relative;
}

.success-check::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 4px;
    width: 8px;
    height: 12px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    animation: pop-check 0.5s ease forwards;
}

@keyframes pop-check {
    to {
        transform: rotate(45deg) scale(1);
    }
}

.preview {
    margin-top: 24px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.preview h2 {
    margin: 0;
    font-family: Inter, sans-serif;
    font-size: 1rem;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 10px 16px;
    border-bottom: 1px solid #edf2f7;
}

th {
    font-size: 0.8rem;
    color: #334155;
}

td {
    font-size: 0.92rem;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 820px) {
    .page-shell {
        padding-top: 16px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .drop-card {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
