:root {
    --bg-top: #0f1c24;
    --bg-bottom: #1a3340;
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --text: #f3f7f8;
    --muted: #b7c7cd;
    --accent: #3ecf8e;
    --accent-dark: #1f9b62;
    --danger: #ff7b7b;
    --success: #7dffb3;
    --border: rgba(255, 255, 255, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
    --font-display: "Segoe UI", "Trebuchet MS", sans-serif;
    --font-body: "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(62, 207, 142, 0.18), transparent 35%),
        radial-gradient(circle at 85% 0%, rgba(88, 170, 255, 0.16), transparent 30%),
        linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

.page {
    width: min(720px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 4rem 0 3rem;
}

.hero {
    margin-bottom: 1.75rem;
}

.brand {
    margin: 0 0 0.75rem;
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.hero h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 600;
}

.lead {
    margin: 0;
    color: var(--muted);
    max-width: 36ch;
    line-height: 1.5;
}

.alert {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.alert-success {
    color: var(--success);
}

.alert-error {
    color: var(--danger);
}

.upload-form {
    display: grid;
    gap: 0.9rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.dropzone {
    position: relative;
    display: grid;
    gap: 0.35rem;
    place-items: center;
    min-height: 170px;
    padding: 1.5rem;
    border: 1.5px dashed rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropzone:hover {
    border-color: rgba(62, 207, 142, 0.7);
    background: rgba(62, 207, 142, 0.08);
    transform: translateY(-1px);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-title {
    font-size: 1.05rem;
    font-weight: 600;
}

.dropzone-hint,
.file-name {
    color: var(--muted);
    font-size: 0.92rem;
}

.file-name:not(:empty) {
    color: var(--accent);
    font-weight: 600;
}

.progress[hidden],
.alert[hidden] {
    display: none !important;
}

.progress {
    display: grid;
    gap: 0.7rem;
    padding: 0.85rem 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.22);
}

.progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    transition: width 0.12s linear;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.progress-percent {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.progress-detail {
    color: var(--muted);
    font-size: 0.92rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

button[type="submit"] {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font: inherit;
    font-weight: 700;
    color: #062417;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    cursor: default;
    filter: saturate(0.7);
    opacity: 0.85;
}

.files {
    margin-top: 2rem;
}

.files h2 {
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
}

.empty {
    margin: 0;
    color: var(--muted);
}

.files ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.files li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
}

.files a {
    color: var(--text);
    text-decoration: none;
    word-break: break-all;
}

.files a:hover {
    color: var(--accent);
}

.files span {
    color: var(--muted);
    white-space: nowrap;
    font-size: 0.9rem;
}

@media (max-width: 560px) {
    .page {
        padding-top: 2.5rem;
    }

    .files li {
        flex-direction: column;
        align-items: flex-start;
    }
}
