:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --text: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;

    --success: #16a34a;
    --success-soft: #f0fdf4;

    --danger: #dc2626;
    --danger-soft: #fef2f2;

    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);

    --radius: 18px;
    --radius-small: 10px;

    --container: 1120px;
}


/* ================================
   RESET
================================ */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    color: var(--text);
    background: var(--bg);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ================================
   COMMON
================================ */

.container {
    width: min(
        calc(100% - 40px),
        var(--container)
    );

    margin: 0 auto;
}


/* ================================
   HEADER
================================ */

.site-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    color: #ffffff;
    background: var(--primary);

    font-size: 18px;
    font-weight: 800;
}

.logo-text span {
    color: var(--primary);
}

.header-version {
    padding: 5px 9px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--text-muted);
    background: var(--surface);

    font-size: 12px;
    font-weight: 600;
}


/* ================================
   MAIN
================================ */

.main {
    min-height: calc(100vh - 137px);
}

.hero {
    padding: 70px 0 80px;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto 40px;

    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 22px;
    padding: 7px 12px;

    border: 1px solid #dbeafe;
    border-radius: 999px;

    color: #1d4ed8;
    background: var(--primary-soft);

    font-size: 13px;
    font-weight: 700;
}

.badge-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: #22c55e;
}

.hero h1 {
    margin: 0;

    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -2.5px;
}

.hero h1 span {
    color: var(--primary);
}

.hero-description {
    max-width: 620px;

    margin: 22px auto 0;

    color: var(--text-secondary);

    font-size: 18px;
    line-height: 1.65;
}


/* ================================
   UPLOAD CARD
================================ */

.upload-card {
    max-width: 760px;

    margin: 0 auto;
    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 24px;

    background: var(--surface);

    box-shadow: var(--shadow);
}


/* ================================
   DROP ZONE
================================ */

.drop-zone {
    min-height: 310px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 40px 25px;

    border: 2px dashed #cbd5e1;
    border-radius: 17px;

    background: var(--surface-soft);

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.drop-zone:hover,
.drop-zone:focus-visible {
    border-color: #93c5fd;
    background: #f8fbff;
}

.drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: scale(0.995);
}

.upload-icon {
    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 18px;

    color: var(--primary);
    background: #dbeafe;
}

.drop-zone h2 {
    margin: 0 0 10px;

    font-size: 21px;
    letter-spacing: -0.3px;
}

.drop-zone p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 15px;
}

.select-button {
    padding: 0;

    border: 0;

    color: var(--primary);
    background: transparent;

    font-weight: 700;

    text-decoration: underline;
    text-underline-offset: 3px;
}

.select-button:hover {
    color: var(--primary-hover);
}

.file-hint {
    margin-top: 18px;

    color: var(--text-muted);

    font-size: 12px;
}


/* ================================
   SELECTED FILE
================================ */

.selected-file {
    min-height: 78px;

    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 12px;
    padding: 14px 16px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface-soft);
}

.selected-file-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    color: var(--primary);
    background: var(--primary-soft);
}

.selected-file-info {
    min-width: 0;
    flex: 1;
}

.selected-file-name {
    overflow: hidden;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file-size {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 12px;
}

.remove-file {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 34px;

    border: 0;
    border-radius: 9px;

    color: var(--text-secondary);
    background: transparent;

    font-size: 25px;
    line-height: 1;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.remove-file:hover {
    color: var(--danger);
    background: var(--danger-soft);
}


/* ================================
   PROGRESS
================================ */

.upload-progress {
    margin-top: 16px;
    padding: 4px 2px;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 8px;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;
}

.progress-track {
    width: 100%;
    height: 7px;

    overflow: hidden;

    border-radius: 999px;

    background: #e2e8f0;
}

.progress-bar {
    height: 100%;

    border-radius: inherit;

    background: var(--primary);

    transition: width 0.15s ease;
}


/* ================================
   UPLOAD BUTTON
================================ */

.upload-button {
    width: 100%;
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    margin-top: 14px;

    border: 0;
    border-radius: 13px;

    color: #ffffff;
    background: var(--primary);

    font-size: 15px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        transform 0.15s ease,
        opacity 0.2s ease;
}

.upload-button:hover:not(:disabled) {
    background: var(--primary-hover);
}

.upload-button:active:not(:disabled) {
    transform: translateY(1px);
}

.upload-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


/* ================================
   SPINNER
================================ */

.button-spinner {
    width: 18px;
    height: 18px;

    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;

    border-radius: 50%;

    animation: spin 0.7s linear infinite;
}

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


/* ================================
   RESULT
================================ */

.upload-result {
    display: flex;
    gap: 14px;

    margin-top: 14px;
    padding: 16px;

    border: 1px solid #bbf7d0;
    border-radius: 14px;

    background: var(--success-soft);
}

.result-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    color: var(--success);
    background: #dcfce7;
}

.result-content {
    min-width: 0;
    flex: 1;
}

.result-title {
    margin-bottom: 10px;

    color: #166534;

    font-size: 14px;
    font-weight: 700;
}

.result-link-row {
    display: flex;
    gap: 8px;
}

.result-link {
    min-width: 0;
    flex: 1;

    height: 42px;

    padding: 0 12px;

    border: 1px solid #bbf7d0;
    border-radius: 9px;

    outline: none;

    color: var(--text);
    background: #ffffff;

    font-size: 13px;
}

.copy-button {
    min-width: 105px;

    padding: 0 14px;

    border: 0;
    border-radius: 9px;

    color: #ffffff;
    background: var(--success);

    font-size: 13px;
    font-weight: 700;
}

.copy-button:hover {
    background: #15803d;
}


/* ================================
   ERROR
================================ */

.upload-error {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 14px;
    padding: 13px 15px;

    border: 1px solid #fecaca;
    border-radius: 12px;

    color: #991b1b;
    background: var(--danger-soft);

    font-size: 13px;
}

.error-icon {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 22px;

    border-radius: 50%;

    color: #ffffff;
    background: var(--danger);

    font-size: 12px;
    font-weight: 800;
}


/* ================================
   FEATURES
================================ */

.features {
    max-width: 760px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;

    margin: 22px auto 0;
}

.feature {
    min-height: 88px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.75);
}

.feature-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    border-radius: 10px;

    background: var(--surface-soft);

    font-size: 18px;
}

.feature strong {
    display: block;

    margin-bottom: 4px;

    font-size: 12px;
}

.feature span {
    display: block;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.4;
}


/* ================================
   FOOTER
================================ */

.site-footer {
    border-top: 1px solid var(--border);

    background: #ffffff;
}

.footer-inner {
    min-height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--text-muted);

    font-size: 12px;
}


/* ================================
   HIDDEN
================================ */

[hidden] {
    display: none !important;
}


/* ================================
   RESPONSIVE
================================ */

@media (max-width: 760px) {

    .hero {
        padding: 50px 0 60px;
    }

    .hero h1 {
        letter-spacing: -1.7px;
    }

    .hero-description {
        font-size: 16px;
    }

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

    .feature {
        min-height: 72px;
    }
}


@media (max-width: 560px) {

    .container {
        width: min(
            calc(100% - 24px),
            var(--container)
        );
    }

    .header-inner {
        min-height: 62px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .header-version {
        font-size: 11px;
    }

    .hero {
        padding-top: 38px;
    }

    .hero-content {
        margin-bottom: 28px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .upload-card {
        padding: 8px;

        border-radius: 18px;
    }

    .drop-zone {
        min-height: 270px;
        padding: 30px 18px;
    }

    .upload-icon {
        width: 62px;
        height: 62px;
    }

    .drop-zone h2 {
        font-size: 18px;
    }

    .result-link-row {
        flex-direction: column;
    }

    .copy-button {
        width: 100%;
        min-height: 42px;
    }

    .footer-inner {
        min-height: 72px;

        flex-direction: column;
        justify-content: center;
        gap: 5px;
    }
}