:root {
    color-scheme: dark;
    --background: #080b12;
    --surface: #111622;
    --surface-light: #171e2d;
    --border: #283247;
    --text: #f3f6fb;
    --muted: #9ba8bc;
    --primary: #725cff;
    --primary-hover: #8a78ff;
    --danger: #e34f62;
    --success: #39c58a;
    --shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(114, 92, 255, .18), transparent 32rem),
        radial-gradient(circle at 100% 20%, rgba(44, 157, 255, .10), transparent 28rem),
        var(--background);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

.topbar {
    min-height: 72px;
    padding: 14px max(20px, calc((100% - 1100px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    background: rgba(8, 11, 18, .76);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #927fff, #4d37dd);
    box-shadow: 0 10px 26px rgba(114, 92, 255, .35);
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 80px;
}

.hero {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.04;
    letter-spacing: -.05em;
}

h2 {
    font-size: 1.25rem;
}

h3 {
    margin-bottom: 8px;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.eyebrow {
    margin-bottom: 10px;
    color: #a897ff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
    line-height: 1.65;
}

.card {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(23, 30, 45, .96), rgba(15, 20, 31, .96));
    box-shadow: var(--shadow);
}

.auth-card,
.download-card {
    width: min(480px, 100%);
    margin: 6vh auto 0;
    padding: 34px;
}

.upload-card {
    padding: 28px;
}

.form-stack {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: #dbe2ef;
    font-size: .9rem;
    font-weight: 650;
}

input,
select {
    width: 100%;
    padding: 13px 14px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: #0c111b;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(114, 92, 255, .16);
}

.dropzone {
    min-height: 230px;
    padding: 28px;
    place-items: center;
    align-content: center;
    text-align: center;
    border: 1px dashed #52617a;
    border-radius: 18px;
    background: rgba(7, 11, 18, .45);
    cursor: pointer;
    transition: .2s ease;
}

.dropzone:hover,
.dropzone.dragging {
    border-color: #917fff;
    background: rgba(114, 92, 255, .09);
}

.dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.dropzone span,
.dropzone small {
    color: var(--muted);
}

.upload-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    color: white !important;
    border-radius: 15px;
    background: var(--primary);
    font-size: 1.5rem;
}

.button {
    min-height: 42px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 0;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 750;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--primary);
}

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

.button-secondary {
    background: #263147;
}

.button-danger {
    background: rgba(227, 79, 98, .15);
    color: #ff8694;
}

.button-wide {
    width: 100%;
}

.notice {
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 12px;
}

.notice-success {
    color: #7ce6b6;
    border: 1px solid rgba(57, 197, 138, .4);
    background: rgba(57, 197, 138, .1);
}

.notice-error {
    color: #ff98a4;
    border: 1px solid rgba(227, 79, 98, .4);
    background: rgba(227, 79, 98, .1);
}

.shares-section {
    margin-top: 38px;
}

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

.count {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: var(--surface-light);
    color: var(--muted);
    font-size: .8rem;
}

.share-list {
    display: grid;
    gap: 14px;
}

.share-item {
    padding: 18px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.file-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #c8beff;
    background: rgba(114, 92, 255, .15);
    font-weight: 850;
}

.share-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--muted);
    font-size: .8rem;
}

.share-link {
    margin-top: 10px;
    color: #a897ff;
    font-size: .84rem;
    overflow-wrap: anywhere;
}

.share-actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    padding: 32px;
    color: var(--muted);
    text-align: center;
}

.file-details {
    margin: 26px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.file-details div {
    padding: 14px;
    border-radius: 13px;
    background: rgba(0, 0, 0, .18);
}

.file-details dt {
    color: var(--muted);
    font-size: .75rem;
}

.file-details dd {
    margin: 5px 0 0;
    font-weight: 700;
}

@media (max-width: 720px) {
    .container {
        padding-top: 30px;
    }

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

    .share-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .share-actions {
        grid-column: 1 / -1;
    }

    .share-actions .button,
    .share-actions form {
        flex: 1;
    }

    .share-actions form .button {
        width: 100%;
    }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.users-note {
    margin-top: 18px;
    font-size: .85rem;
}
