:root {
    --bg: #090b16;
    --surface: #12162a;
    --surface-2: #191f3a;
    --surface-border: #262d4d;
    --text: #eceefb;
    --text-dim: #9198c2;
    --text-faint: #5c6491;
    --text-placeholder: #9aa0c7;
    --indigo: #6c6bff;
    --violet: #b45cff;
    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    --success: #3ddc97;
    --danger: #ff6b81;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

::selection {
    background: rgba(139, 92, 246, 0.38);
    color: #fff;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        radial-gradient(1px 1px at 10% 22%, rgba(236, 238, 251, 0.6), transparent),
        radial-gradient(1px 1px at 24% 68%, rgba(236, 238, 251, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 38% 12%, rgba(236, 238, 251, 0.55), transparent),
        radial-gradient(1px 1px at 52% 82%, rgba(236, 238, 251, 0.35), transparent),
        radial-gradient(1px 1px at 66% 34%, rgba(236, 238, 251, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 79% 58%, rgba(236, 238, 251, 0.45), transparent),
        radial-gradient(1px 1px at 91% 20%, rgba(236, 238, 251, 0.55), transparent),
        radial-gradient(1px 1px at 14% 90%, rgba(236, 238, 251, 0.3), transparent),
        radial-gradient(1px 1px at 47% 47%, rgba(236, 238, 251, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 85% 87%, rgba(236, 238, 251, 0.4), transparent),
        radial-gradient(1px 1px at 6% 55%, rgba(236, 238, 251, 0.35), transparent),
        radial-gradient(1px 1px at 60% 6%, rgba(236, 238, 251, 0.45), transparent);
    animation: twinkle 9s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.32; }
    50% { opacity: 0.62; }
}

@media (prefers-reduced-motion: reduce) {
    .starfield {
        animation: none;
        opacity: 0.42;
    }
}

.nebula-field {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translate(var(--parallax-x, 0px), var(--parallax-y, 0px));
    transition: transform 0.35s ease-out;
}

.cursor-spotlight {
    display: none;
}

@media (pointer: fine) {
    .cursor-spotlight {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: radial-gradient(460px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(139, 92, 246, 0.09), transparent 70%);
        mix-blend-mode: screen;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor-spotlight {
        display: none;
    }
}

.drift {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    will-change: transform;
}

.drift-a {
    width: 520px;
    height: 520px;
    left: -140px;
    top: -160px;
    background: radial-gradient(circle at 30% 30%, #6c6bff, transparent 70%);
    animation: driftA 26s ease-in-out infinite;
}

.drift-b {
    width: 460px;
    height: 460px;
    right: -120px;
    top: 10%;
    background: radial-gradient(circle at 60% 40%, #b45cff, transparent 70%);
    animation: driftB 32s ease-in-out infinite;
}

.drift-c {
    width: 400px;
    height: 400px;
    left: 30%;
    bottom: -220px;
    background: radial-gradient(circle at 50% 50%, #3d4bd6, transparent 70%);
    animation: driftC 40s ease-in-out infinite;
}

@keyframes driftA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes driftB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 60px) scale(0.95); }
}

@keyframes driftC {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .drift {
        animation: none;
    }
}

.glow-surface {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.glow-surface::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.glow-surface:hover::before {
    opacity: 1;
}

.glow-surface > * {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .glow-surface::before {
        display: none;
    }
}

.fade-up {
    animation: fadeUp 0.6s ease-out both;
}

.fade-up.delay-1 {
    animation-delay: 0.08s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-up {
        animation: none;
    }
}

.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 26px 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: 0.01em;
}

.brand svg {
    transition: filter 0.2s ease;
}

.brand:hover svg {
    filter: drop-shadow(0 0 7px rgba(139, 92, 246, 0.55));
}

.page {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px 80px;
    width: 100%;
}

.foot {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    color: var(--text-faint);
    font-size: 13px;
}

.hero-copy {
    max-width: 560px;
    text-align: center;
    margin: 40px 0 36px;
}

.hero-copy h1 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.15;
    background: linear-gradient(120deg, #eceefb 30%, #b9b8ff 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p {
    color: var(--text-dim);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.upload-shell {
    width: 100%;
    max-width: 480px;
}

.dropzone {
    border: 1.5px dashed rgba(145, 152, 194, 0.28);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
    padding: 56px 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.dropzone:hover, .dropzone:focus-visible {
    border-color: var(--indigo);
    background: rgba(108, 107, 255, 0.06);
    outline: none;
}

.dropzone.drag-active {
    border-color: var(--accent);
    border-style: solid;
    background: rgba(139, 92, 246, 0.12);
    transform: scale(1.012);
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.45),
        0 0 46px 10px rgba(139, 92, 246, 0.32),
        0 0 90px 24px rgba(180, 92, 255, 0.14);
}

@media (prefers-reduced-motion: reduce) {
    .dropzone {
        transition: none;
    }
}

.drop-icon {
    margin-bottom: 18px;
}

.drop-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
}

.drop-sub {
    color: var(--text-faint);
    font-size: 14px;
    margin: 0;
}

.picked-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 16px;
}

.picked-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.picked-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.picked-name {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.picked-size {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

.options-panel {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 18px;
    padding: 22px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.option-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-row > label {
    font-size: 13.5px;
    color: var(--text-dim);
    font-weight: 500;
}

.switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    color: var(--text-dim);
    font-weight: 500;
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.switch-track {
    display: block;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    transition: background 0.2s ease;
    position: relative;
}

.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-faint);
    transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + .switch-track {
    background: linear-gradient(90deg, var(--indigo), var(--violet));
    border-color: transparent;
}

.switch input:checked + .switch-track .switch-thumb {
    transform: translateX(18px);
    background: #fff;
}

.text-input {
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 11px 13px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.text-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.text-input::placeholder {
    color: var(--text-placeholder);
}

select.text-input {
    appearance: none;
    background-color: rgba(25, 31, 58, 0.6);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b9b8ff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
    border-radius: 12px;
    border-color: rgba(139, 92, 246, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 6px 20px rgba(9, 11, 22, 0.35);
    cursor: pointer;
    accent-color: var(--accent);
}

select.text-input:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

select.text-input:focus {
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), 0 6px 20px rgba(9, 11, 22, 0.35);
}

select.text-input option {
    background-color: var(--surface-2);
    color: var(--text);
}

select.text-input option:checked {
    background: var(--accent);
    color: #fff;
}

@supports not (backdrop-filter: blur(1px)) {
    select.text-input {
        background-color: var(--surface-2);
    }
}

.primary-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--indigo), var(--violet));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 22px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.primary-btn::after {
    content: "";
    position: absolute;
    inset: -60% -20%;
    z-index: -1;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.32) 48%, transparent 66%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.primary-btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 28px rgba(139, 92, 246, 0.4);
}

.primary-btn:hover::after {
    transform: translateX(120%);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn.wide {
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .primary-btn::after {
        display: none;
    }
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--surface-2);
    color: var(--text-dim);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.ghost-btn:hover {
    border-color: var(--indigo);
    color: var(--text);
}

.ghost-btn.wide {
    width: 100%;
}

.error-line {
    color: var(--danger);
    font-size: 13px;
    margin: 0;
    min-height: 16px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.error-line.visible {
    opacity: 1;
}

.progress-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 34px;
    text-align: center;
}

.progress-status {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
}

.progress-filename {
    color: var(--text-faint);
    font-size: 13px;
    font-family: var(--font-mono);
    margin: 0 0 26px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-track {
    height: 10px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--indigo), var(--violet));
    transition: width 0.15s ease;
    background-size: 200% 100%;
    animation: shimmer 2.4s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-dim);
    margin-bottom: 22px;
}

.result-shell {
    width: 100%;
    max-width: 460px;
    margin-top: 30px;
}

.result-card, .lock-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 22px;
    padding: 36px 32px;
    text-align: center;
}

.file-badge {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    background: var(--surface-2);
    color: var(--indigo);
}

.file-badge.cat-image { color: #3ddc97; }
.file-badge.cat-video { color: #ff8a5c; }
.file-badge.cat-audio { color: #ffc75c; }
.file-badge.cat-archive { color: #9198c2; }
.file-badge.cat-pdf { color: #ff6b81; }
.file-badge.cat-code { color: #5cc9ff; }
.file-badge.cat-document { color: #6c6bff; }

.file-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 14px;
    word-break: break-word;
}

.status-row {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
}

.pill-lock {
    background: rgba(180, 92, 255, 0.12);
    color: #cfa6ff;
}

.pill-open {
    background: rgba(61, 220, 151, 0.12);
    color: #7ee8bd;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.stat {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    transition: transform 0.15s ease, background 0.15s ease;
}

.stat:hover {
    transform: translateY(-2px);
    background: var(--surface-border);
}

@media (prefers-reduced-motion: reduce) {
    .stat {
        transition: none;
    }
    .stat:hover {
        transform: none;
    }
}

.stat-label {
    display: block;
    font-size: 11.5px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
}

.mono {
    font-family: var(--font-mono);
}

.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.link-group {
    display: flex;
    align-items: stretch;
    min-height: 44px;
    background: var(--surface-2);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.link-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.link-group-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12.5px;
    padding: 0 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.link-group-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    background: rgba(139, 92, 246, 0.14);
    border: none;
    border-left: 1px solid var(--surface-border);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.link-group-copy:hover {
    background: var(--accent);
    color: #fff;
}

.link-group-copy svg {
    flex-shrink: 0;
}

.lock-icon {
    margin: 0 auto 18px;
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-card h1 {
    font-family: var(--font-display);
    font-size: 21px;
    margin: 0 0 8px;
}

.lock-sub {
    color: var(--text-dim);
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.password-field {
    position: relative;
}

.password-field .text-input {
    padding-right: 42px;
}

.eye-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-placeholder);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.eye-toggle:hover {
    color: var(--text);
    background: rgba(139, 92, 246, 0.14);
}

.eye-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.eye-toggle svg {
    display: block;
}

.eye-toggle .eye-closed {
    display: none;
}

.eye-toggle.is-visible .eye-open {
    display: none;
}

.eye-toggle.is-visible .eye-closed {
    display: block;
}

.lock-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.center-focus {
    display: none;
}

@media (min-width: 900px) {
    .center-focus {
        display: block;
        position: fixed;
        top: 50%;
        left: 50%;
        width: 620px;
        height: 620px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: radial-gradient(circle, rgba(139, 92, 246, 0.16), rgba(108, 107, 255, 0.06) 45%, transparent 72%);
        filter: blur(10px);
        pointer-events: none;
        z-index: 1;
    }
}

@media (max-width: 560px) {
    .hero-copy h1 {
        font-size: 32px;
    }
    .topbar {
        padding: 20px;
    }
    .stat-grid {
        grid-template-columns: 1fr;
    }
    .action-row {
        flex-direction: column;
    }
    .link-group-copy span {
        display: none;
    }
    .link-group-copy {
        padding: 0 14px;
    }
    .link-group-input {
        padding: 0 12px;
        font-size: 12px;
    }
    .result-card, .lock-card {
        padding: 30px 22px;
    }
    .options-panel {
        padding: 18px;
    }
}
