/* ==========================================================================
   DropIt - futuristic UI stylesheet
   ========================================================================== */

:root {
    --bg: #04050a;
    --bg-2: #0a0c16;
    --surface: rgba(255, 255, 255, .055);
    --surface-2: rgba(255, 255, 255, .09);
    --border: rgba(255, 255, 255, .12);
    --border-strong: rgba(255, 255, 255, .22);
    --text: #eef1ff;
    --muted: #9aa3c4;
    --faint: #6b7396;
    --a1: #7c5cff;
    --a2: #22d3ee;
    --a3: #ff5cc8;
    --ok: #37e5a0;
    --warn: #ffc857;
    --bad: #ff6b6b;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, .85);
    --glow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 50px -24px rgba(124, 92, 255, .7);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated aurora background ------------------------------------------------ */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(124, 92, 255, .30), transparent 60%),
        radial-gradient(1000px 500px at 100% 0%, rgba(34, 211, 238, .18), transparent 55%),
        radial-gradient(900px 700px at 50% 120%, rgba(255, 92, 200, .18), transparent 60%),
        linear-gradient(180deg, #04050a 0%, #070812 60%, #04050a 100%);
}
.aurora::before,
.aurora::after {
    content: "";
    position: absolute;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .45;
    animation: float 22s ease-in-out infinite;
}
.aurora::before { background: radial-gradient(circle, #7c5cff, transparent 65%); top: -12vmax; left: -8vmax; }
.aurora::after  { background: radial-gradient(circle, #22d3ee, transparent 65%); bottom: -16vmax; right: -10vmax; animation-delay: -8s; }
.grid-overlay {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}
@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(4vmax, 3vmax, 0) scale(1.12); }
}

/* Layout ------------------------------------------------------------------- */
.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.narrow { width: min(720px, 94vw); margin: 0 auto; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding: 28px 0 64px; }

/* Nav ---------------------------------------------------------------------- */
.nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--a1), var(--a2));
    box-shadow: var(--glow);
    font-weight: 800; font-size: 20px; color: #06080f;
}
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.brand-sub { font-size: 12px; color: var(--faint); margin-top: -3px; }
.nav-links { display: flex; align-items: center; gap: 10px; }

/* Glass panels ------------------------------------------------------------- */
.panel {
    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    box-shadow: var(--shadow);
    padding: 28px;
}
.panel + .panel { margin-top: 22px; }

/* Typography --------------------------------------------------------------- */
h1, h2, h3 { margin: 0 0 10px; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 5vw, 46px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; color: var(--muted); }
.lead { font-size: 17px; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }
.center { text-align: center; }
.gradient-text {
    background: linear-gradient(120deg, #fff 0%, #b9b2ff 40%, #7be7ff 75%, #ff9be0 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border); border-radius: 999px;
    padding: 6px 14px; margin-bottom: 18px;
    background: rgba(255,255,255,.03);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); }

/* Hero --------------------------------------------------------------------- */
.hero { padding: 30px 0 8px; }
.hero h1 { margin-bottom: 14px; max-width: 780px; }
.hero .lead { max-width: 620px; margin: 0 auto; }

/* Forms -------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; letter-spacing: .02em; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 680px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="search"], textarea, select {
    width: 100%;
    padding: 13px 15px;
    color: var(--text);
    background: rgba(6, 8, 16, .55);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
    border-color: rgba(124, 92, 255, .75);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, .18);
    background: rgba(10, 12, 24, .8);
}
textarea { resize: vertical; min-height: 92px; }
select option { background: #0a0c16; color: var(--text); }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }

/* Buttons ------------------------------------------------------------------ */
.btn {
    --btn-bg: var(--surface-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--btn-bg);
    color: var(--text);
    font-size: 14px; font-weight: 600; font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
    background: linear-gradient(120deg, var(--a1), var(--a3) 55%, var(--a2));
    color: #06070d; border: none; font-weight: 700;
    box-shadow: 0 16px 40px -16px rgba(124, 92, 255, .9);
}
.btn-primary:hover { box-shadow: 0 20px 50px -14px rgba(124, 92, 255, 1); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-danger { border-color: rgba(255, 107, 107, .5); color: #ffb3b3; }
.btn-danger:hover { background: rgba(255, 107, 107, .14); }
.btn-icon { padding: 8px; width: 34px; height: 34px; border-radius: 10px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Dropzone ----------------------------------------------------------------- */
.dz {
    position: relative;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
    background: radial-gradient(120% 120% at 50% 0%, rgba(124, 92, 255, .10), transparent 60%);
}
.dz:hover { border-color: rgba(124, 92, 255, .8); }
.dz.drag { border-color: var(--a2); background: rgba(34, 211, 238, .1); transform: scale(1.008); }
.dz-icon {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(34,211,238,.28));
    border: 1px solid var(--border);
    font-size: 26px;
}
.dz strong { display: block; font-size: 17px; margin-bottom: 4px; }
.dz span { color: var(--muted); font-size: 14px; }

/* File list ---------------------------------------------------------------- */
.filelist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.file-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.file-ico {
    width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
    background: rgba(124,92,255,.18); border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: #cfc8ff;
}
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 12px; color: var(--faint); }
.file-state { font-size: 12px; font-weight: 600; flex: none; }
.file-state.ok { color: var(--ok); }
.file-state.err { color: var(--bad); }
.progress { height: 5px; border-radius: 999px; background: rgba(255,255,255,.09); overflow: hidden; margin-top: 7px; }
.progress > i {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--a1), var(--a2));
    transition: width .25s ease;
}

/* Badges ------------------------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 11px; border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.05);
    color: var(--muted);
}
.badge.active { color: #b8ffdf; border-color: rgba(55,229,160,.4); background: rgba(55,229,160,.12); }
.badge.expired { color: #ffc9c9; border-color: rgba(255,107,107,.4); background: rgba(255,107,107,.12); }
.badge.limit { color: #ffe4ad; border-color: rgba(255,200,87,.4); background: rgba(255,200,87,.12); }
.badge.lock { color: #d9d2ff; }

/* Alerts / toasts ---------------------------------------------------------- */
.alert {
    padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px;
    border: 1px solid var(--border); background: rgba(255,255,255,.05); margin-bottom: 16px;
}
.alert.error { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.12); color: #ffd2d2; }
.alert.ok { border-color: rgba(55,229,160,.5); background: rgba(55,229,160,.12); color: #c9ffe9; }
.alert.info { border-color: rgba(34,211,238,.5); background: rgba(34,211,238,.12); color: #d3f7ff; }

/* Success / share card ----------------------------------------------------- */
.share-box {
    display: flex; gap: 10px; align-items: center;
    background: rgba(6,8,16,.6); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 10px 12px; margin: 8px 0 4px;
}
.share-box input { border: none; background: transparent; box-shadow: none; font-size: 14px; }
.share-box input:focus { box-shadow: none; }

/* Download page ------------------------------------------------------------ */
.transfer-head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.avatar {
    width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center;
    font-weight: 800; font-size: 22px; color: #06070d;
    background: linear-gradient(135deg, var(--a2), var(--a1));
}
.stat-row { display: flex; gap: 20px; flex-wrap: wrap; margin: 14px 0 4px; }
.stat { font-size: 12px; color: var(--faint); }
.stat b { display: block; font-size: 18px; color: var(--text); }
.dl-item {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: rgba(255,255,255,.03); margin-bottom: 10px;
    transition: border-color .2s ease, transform .15s ease;
}
.dl-item:hover { border-color: var(--border-strong); transform: translateX(2px); }
.dl-item .file-ico { background: rgba(34,211,238,.16); color: #bff3ff; }
.dl-item a.btn { margin-left: auto; }

/* Keypad / password gate --------------------------------------------------- */
.gate { text-align: center; }
.gate-icon {
    width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(255,92,200,.3), rgba(124,92,255,.3));
    border: 1px solid var(--border); font-size: 30px;
}

/* Admin -------------------------------------------------------------------- */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 16px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { margin-bottom: 26px; }
.menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.menu a {
    display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px;
    color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
    transition: background .18s ease, color .18s ease;
}
.menu a:hover { background: rgba(255,255,255,.06); color: var(--text); }
.menu a.active { background: linear-gradient(120deg, rgba(124,92,255,.28), rgba(34,211,238,.18)); color: #fff; }
.menu .sep { height: 1px; background: var(--border); margin: 12px 6px; }
.admin-main { padding: 26px 30px 60px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-top h1 { font-size: 26px; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    padding: 20px; border-radius: var(--radius); border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
    position: relative; overflow: hidden;
}
.stat-card .k { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.stat-card .v { font-size: 30px; font-weight: 800; margin-top: 6px; }
.stat-card .ic { position: absolute; right: 14px; top: 14px; font-size: 22px; opacity: .5; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); background: rgba(255,255,255,.03); }
tbody tr:hover { background: rgba(255,255,255,.03); }
tbody tr:last-child td { border-bottom: none; }
td .actions { display: flex; gap: 8px; }
code.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5px; color: #cfc8ff; }

/* Tabs --------------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }
.tab {
    padding: 11px 16px; border: none; background: none; color: var(--muted); cursor: pointer;
    font-size: 14px; font-weight: 600; font-family: inherit; border-bottom: 2px solid transparent;
    text-decoration: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--a1); }

/* Footer ------------------------------------------------------------------- */
footer { padding: 26px 0 40px; color: var(--faint); font-size: 13px; text-align: center; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Progress sweep for long ops --------------------------------------------- */
.spinner {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { animation: rise .5s ease both; }

@media (max-width: 880px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .menu { grid-auto-flow: column; overflow-x: auto; }
    .menu .sep { display: none; }
}
@media (max-width: 560px) {
    .panel { padding: 20px; }
    .share-box { flex-direction: column; align-items: stretch; }
}
