:root{
  font-family:Inter,"Noto Sans Thai",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:#eef2ff;
  background:#070b14;
  font-synthesis:none;

  --bg:#070b14;
  --surface:rgba(15,23,42,.72);
  --surface-2:rgba(20,30,52,.82);
  --line:rgba(148,163,184,.16);

  --text:#f8fafc;
  --muted:#94a3b8;

  --primary:#7c3aed;
  --primary-2:#4f46e5;
  --accent:#22d3ee;

  --danger:#fb7185;

  --shadow:0 24px 70px rgba(0,0,0,.35);
  --radius:24px;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  color:var(--text);

  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(124,58,237,.22),
      transparent 32%
    ),
    radial-gradient(
      circle at 90% 12%,
      rgba(34,211,238,.12),
      transparent 26%
    ),
    linear-gradient(
      180deg,
      #080d18 0%,
      #070b14 55%,
      #060911 100%
    );

  background-attachment:fixed;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.16;

  background-image:
    linear-gradient(
      rgba(255,255,255,.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.035) 1px,
      transparent 1px
    );

  background-size:44px 44px;
  mask-image:linear-gradient(to bottom,#000,transparent 75%);
}

::selection{
  background:rgba(124,58,237,.45);
  color:#fff;
}


/* =========================
   TOP BAR
========================= */

.topbar{
  height:72px;

  background:rgba(7,11,20,.72);
  border-bottom:1px solid var(--line);

  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);

  display:flex;
  align-items:center;

  padding:0 26px;

  position:sticky;
  top:0;
  z-index:50;

  box-shadow:0 8px 30px rgba(0,0,0,.12);
}

.brand{
  font-weight:900;
  font-size:20px;
  letter-spacing:-.03em;

  text-decoration:none;
  color:#fff;

  display:inline-flex;
  align-items:center;
  gap:10px;
}

.brand::before{
  content:"";

  width:12px;
  height:12px;

  border-radius:4px;

  background:linear-gradient(
    135deg,
    var(--accent),
    var(--primary)
  );

  box-shadow:0 0 24px rgba(124,58,237,.55);
}


/* =========================
   PAGE
========================= */

.wrap{
  width:min(1080px,calc(100% - 32px));
  margin:42px auto 72px;
}

.hero{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-start;

  margin-bottom:24px;
}

.hero h1{
  margin:0 0 8px;

  font-size:clamp(28px,5vw,42px);
  line-height:1.08;
  letter-spacing:-.045em;

  background:linear-gradient(
    100deg,
    #fff 12%,
    #c4b5fd 62%,
    #67e8f9
  );

  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.muted{
  color:var(--muted);
}

.small{
  font-size:13px;
}


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

.card{
  position:relative;
  overflow:hidden;

  background:linear-gradient(
    180deg,
    rgba(17,25,44,.84),
    rgba(12,19,34,.78)
  );

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

  padding:26px;
  margin-bottom:20px;

  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255,255,255,.035);

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

.card::after{
  content:"";

  position:absolute;
  inset:0;

  pointer-events:none;

  background:linear-gradient(
    135deg,
    rgba(255,255,255,.035),
    transparent 38%
  );
}

.login-card,
.public-card{
  max-width:680px;
  margin:9vh auto;
}

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


/* =========================
   FORM
========================= */

label{
  display:grid;
  gap:8px;

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

  color:#e2e8f0;
}

input,
select{
  width:100%;

  padding:13px 14px;

  border:1px solid rgba(148,163,184,.2);
  border-radius:13px;

  color:var(--text);
  background:rgba(8,15,29,.72);

  font:inherit;
  outline:none;

  transition:.2s ease;
}

input::placeholder{
  color:#64748b;
}

select option{
  background:#0f172a;
  color:#f8fafc;
}

input:focus,
select:focus{
  border-color:rgba(129,140,248,.75);

  box-shadow:
    0 0 0 4px rgba(99,102,241,.13),
    0 0 28px rgba(99,102,241,.08);

  background:rgba(12,20,38,.92);
}


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

.button,
button{
  border:1px solid rgba(148,163,184,.2);

  background:rgba(15,23,42,.72);
  color:#e2e8f0;

  border-radius:13px;

  padding:11px 16px;

  font:inherit;
  font-weight:800;

  cursor:pointer;
  text-decoration:none;

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

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03);
}

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

  border-color:rgba(148,163,184,.35);
  background:rgba(30,41,59,.82);
}

.button:active,
button:active{
  transform:translateY(0);
}

.primary{
  background:linear-gradient(
    135deg,
    var(--primary),
    var(--primary-2)
  )!important;

  color:#fff!important;

  border-color:rgba(167,139,250,.55)!important;

  box-shadow:
    0 12px 30px rgba(79,70,229,.26),
    inset 0 1px 0 rgba(255,255,255,.15)!important;
}

.primary:hover{
  box-shadow:
    0 16px 38px rgba(79,70,229,.34),
    inset 0 1px 0 rgba(255,255,255,.2)!important;
}

.ghost{
  background:rgba(255,255,255,.025);
}

.danger{
  color:#fecdd3!important;
  border-color:rgba(251,113,133,.2)!important;
}

.danger:hover{
  background:rgba(190,24,93,.12)!important;
  border-color:rgba(251,113,133,.38)!important;
}

button:disabled{
  opacity:.38;
  cursor:not-allowed;

  transform:none!important;
  box-shadow:none!important;
}

.wide{
  width:100%;
}

.center{
  display:flex;
}


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

.dropzone{
  position:relative;

  border:1.5px dashed rgba(148,163,184,.34);
  border-radius:20px;

  padding:48px 22px;

  text-align:center;
  cursor:pointer;

  transition:.22s ease;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(124,58,237,.1),
      transparent 44%
    ),
    rgba(8,15,29,.5);
}

.dropzone::before{
  content:"";

  position:absolute;
  inset:10px;

  border-radius:14px;
  border:1px solid rgba(255,255,255,.025);

  pointer-events:none;
}

.dropzone:hover,
.dropzone.over{
  transform:translateY(-2px);

  border-color:rgba(129,140,248,.78);

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(124,58,237,.18),
      transparent 45%
    ),
    rgba(10,18,34,.72);

  box-shadow:
    0 18px 46px rgba(79,70,229,.12),
    inset 0 0 0 1px rgba(129,140,248,.06);
}

.dropzone h2{
  margin:7px 0 4px;
  letter-spacing:-.025em;
}

.drop-icon,
.download-icon{
  font-size:42px;
  line-height:1;
  font-weight:900;

  background:linear-gradient(
    135deg,
    #c4b5fd,
    #67e8f9
  );

  -webkit-background-clip:text;
  background-clip:text;

  color:transparent;
}


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

.upload-options{
  display:grid;
  grid-template-columns:2fr 1fr;

  gap:14px;
  margin:20px 0;
}

.selection{
  display:grid;
  gap:9px;

  margin:0 0 16px;
}

.picked,
.file-row{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;

  padding:13px 15px;

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

  background:rgba(15,23,42,.52);

  transition:.18s ease;
}

.picked:hover,
.file-row:hover{
  border-color:rgba(148,163,184,.27);
  background:rgba(20,30,52,.72);
}


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

.progress-wrap{
  display:flex;
  align-items:center;
  gap:12px;

  margin-top:16px;
}

.progress{
  height:10px;

  background:rgba(51,65,85,.72);

  border-radius:999px;
  overflow:hidden;

  flex:1;

  box-shadow:
    inset 0 1px 3px rgba(0,0,0,.35);
}

.progress > div{
  height:100%;
  width:0;

  border-radius:999px;

  background:linear-gradient(
    90deg,
    var(--primary),
    #818cf8,
    var(--accent)
  );

  box-shadow:
    0 0 20px rgba(99,102,241,.42);

  transition:width .15s ease;
}

.hidden{
  display:none!important;
}


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

.result{
  margin-top:16px;
  padding:16px;

  border-radius:15px;

  background:rgba(34,197,94,.075);
  border:1px solid rgba(74,222,128,.18);

  color:#dcfce7;
}

.sharebox{
  display:grid;
  grid-template-columns:1fr auto;

  gap:9px;
  margin-top:11px;
}


/* =========================
   TABLE
========================= */

.table-wrap{
  overflow:auto;
  border-radius:14px;
}

table{
  width:100%;
  border-collapse:collapse;

  min-width:760px;
}

th,
td{
  text-align:left;
  vertical-align:middle;

  padding:13px 10px;

  border-bottom:
    1px solid rgba(148,163,184,.1);
}

th{
  font-size:12px;

  letter-spacing:.04em;
  text-transform:uppercase;

  color:#94a3b8;
}

tbody tr{
  transition:.16s ease;
}

tbody tr:hover{
  background:rgba(255,255,255,.025);
}

.actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
}

.bad,
.error{
  color:#fda4af;
}

code{
  font-size:12px;

  color:#c4b5fd;
  background:rgba(124,58,237,.09);

  padding:3px 6px;
  border-radius:6px;
}


/* =========================
   PUBLIC PAGE
========================= */

.public-card{
  text-align:center;
}

.file-list{
  display:grid;
  gap:10px;

  margin:24px 0;

  text-align:left;
}

.center-text{
  text-align:center;
}


/* =========================
   CREDIT
========================= */

.site-credit{
  width:min(1080px,calc(100% - 32px));

  margin:-42px auto 28px;

  text-align:center;

  color:#64748b;

  font-size:12px;
  letter-spacing:.02em;
}

.site-credit strong{
  color:#a5b4fc;
  font-weight:800;
}

.site-credit .credit-dot{
  opacity:.35;
  margin:0 7px;
}


/* =========================
   SCROLL BAR
========================= */

::-webkit-scrollbar{
  width:10px;
  height:10px;
}

::-webkit-scrollbar-track{
  background:#070b14;
}

::-webkit-scrollbar-thumb{
  background:#293449;

  border:2px solid #070b14;
  border-radius:999px;
}

::-webkit-scrollbar-thumb:hover{
  background:#3a4861;
}


/* =========================
   MOBILE
========================= */

@media(max-width:700px){

  .topbar{
    height:64px;
    padding:0 18px;
  }

  .wrap{
    width:min(100% - 22px,1080px);
    margin:26px auto 58px;
  }

  .upload-options{
    grid-template-columns:1fr;
  }

  .hero{
    align-items:flex-start;
    flex-direction:column;
    gap:12px;
  }

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

  .card{
    padding:18px;
    border-radius:20px;
  }

  .dropzone{
    padding:38px 14px;
  }

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

  .sharebox .button{
    width:100%;
  }

  .file-row{
    align-items:flex-start;
    flex-direction:column;
  }

  .file-row .button{
    width:100%;
  }

  .actions{
    width:100%;
    flex-wrap:wrap;
  }

  .actions .button,
  .actions button{
    flex:1;
  }

  .site-credit{
    width:min(100% - 22px,1080px);
    margin:-30px auto 22px;
  }
}