:root{
  --bg1:#0b0615;
  --bg2:#140a2c;
  --card:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.10);
  --text:#f5f2ff;
  --muted:rgba(245,242,255,.72);
  --purple:#8b5cf6;
  --purple2:#a78bfa;
  --pink:#ec4899;
  --good:#22c55e;
  --bad:#ef4444;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1100px 650px at 20% 10%, rgba(139,92,246,.28), transparent 60%),
    radial-gradient(1000px 700px at 80% 30%, rgba(236,72,153,.12), transparent 55%),
    radial-gradient(900px 600px at 50% 90%, rgba(167,139,250,.18), transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
}

a{color:var(--purple2); text-decoration:none}
a:hover{color:#ddd}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:22px 18px 40px;
}

.centerWrap{
  min-height: calc(100vh - 62px);
  display:flex;
  align-items:center;
  justify-content:center;
}

.authShell{ width:min(520px, 100%); }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.brand{display:flex;align-items:center;gap:12px}
.brand h1{font-size:16px;margin:0;letter-spacing:.2px}
.brand p{margin:0;font-size:12px;color:var(--muted)}

.brandMark{
  width:44px;height:44px;border-radius:14px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  box-shadow: 0 12px 40px rgba(139,92,246,.22);
}
.brandMark img{ width:44px; height:auto; display:block; }

.heroLogo{
  display:flex;
  justify-content:center;
  margin: 0 0 16px;
}
.heroLogo img{
  width:240px;
  max-width:80%;
  height:auto;
  filter: drop-shadow(0 25px 60px rgba(0,0,0,.55));
}

.nav{display:flex;gap:10px;flex-wrap:wrap}
.chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 12px;border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color:var(--text);
  backdrop-filter: blur(10px);
}
.chip strong{font-weight:600}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  padding:10px 14px;border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
  user-select:none;
}
.btn:hover{background:rgba(255,255,255,.09);border-color:rgba(255,255,255,.16)}
.btn:active{transform: translateY(1px)}
.btn.primary{
  background: linear-gradient(135deg, rgba(139,92,246,.95), rgba(167,139,250,.75));
  border-color: rgba(139,92,246,.45);
}
.btn.primary:hover{filter:brightness(1.05)}
.btn.danger{background: rgba(239,68,68,.10);border-color: rgba(239,68,68,.30)}
.btn.small{padding:8px 11px;border-radius:12px;font-size:13px}

.grid{display:grid;grid-template-columns: 1.1fr .9fr;gap:16px}
@media (max-width: 980px){ .grid{grid-template-columns:1fr} }

.card{
  background: var(--card);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .hd{
  padding:16px 16px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
}
.card .hd h2{margin:0;font-size:14px;letter-spacing:.2px}
.card .hd .sub{margin-top:4px;font-size:12px;color:var(--muted)}
.card .bd{padding:16px}

.field{display:flex;flex-direction:column;gap:7px;margin-bottom:12px}
.label{font-size:12px;color:var(--muted)}
.input, select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.14);
  color:var(--text);
  outline:none;
}
.input:focus, select:focus{
  border-color: rgba(139,92,246,.55);
  box-shadow: 0 0 0 4px rgba(139,92,246,.16);
}

.notice{
  padding:10px 12px;border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  font-size:13px;color:var(--muted);
}
.notice.good{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.10);color:#d7ffe5}
.notice.bad{border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.10);color:#ffe0e0}

.videoWrap{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  overflow:hidden;
}
video{width:100%;display:block;background:#000}

.pulse{
  width:10px;height:10px;border-radius:50%;
  background: var(--bad);
  box-shadow: 0 0 0 0 rgba(239,68,68,.55);
  animation: pulse 1.6s infinite;
}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(239,68,68,.55)}
  70%{box-shadow:0 0 0 10px rgba(239,68,68,0)}
  100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}
}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:11px;
  padding:3px 8px;border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(245,242,255,.88);
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
}
.table th, .table td{
  padding:12px 10px;
  text-align:left;
  font-size:13px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.table th{
  font-size:12px;color:rgba(245,242,255,.75);
  background: rgba(255,255,255,.05);
}
.table tr:last-child td{border-bottom:none}

.footer{margin-top:16px;font-size:12px;color:rgba(245,242,255,.60)}

/* ===== Auth page layout fix (Login/Register) ===== */
body.auth{
  min-height:100vh;
}
body.auth .container{
  max-width:none;            /* let it breathe */
  padding:0;                 /* remove extra padding that pushed card down */
}
.authStage{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 16px;
}
.authShell{
  width:min(520px, 100%);
}
.authBrand{
  display:flex;
  justify-content:center;
  margin-bottom:14px;
}
.authBrand img{
  width:200px;
  max-width:85%;
  height:auto;
  filter: drop-shadow(0 25px 60px rgba(0,0,0,.55));
}
.authLinks{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}
.authLinks a{
  font-size:13px;
}


/* ===== Auth v3 perfect layout overrides ===== */

body.auth{
  min-height:100vh;
  overflow:hidden; /* prevent tiny scrollbars on some browsers */
}
body.auth .container{
  max-width:none;
  padding:0;
}
body.auth .authStage{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 16px;
}
body.auth .authShell{
  width:min(560px, 100%);
}
body.auth .authBrand{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:0 0 16px;
}
body.auth .authBrand img{
  width:120px;
  max-width:60vw;
  height:auto;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.55));
}
body.auth .authTitle{
  font-weight:700;
  letter-spacing:.6px;
  font-size:14px;
  text-transform:uppercase;
  color: rgba(245,242,255,.92);
}
body.auth .authSubtitle{
  margin-top:-6px;
  font-size:12px;
  color: rgba(245,242,255,.60);
}
body.auth .card{
  border-radius:22px;
}
body.auth .card .hd{
  padding:18px 18px 14px;
}
body.auth .card .bd{
  padding:18px;
}
body.auth .btn.primary{
  border-radius:16px;
  padding:12px 14px;
}
body.auth .authLinks{
  margin-top:14px;
}
body.auth .authFooter{
  margin-top:12px;
  text-align:center;
  font-size:12px;
  color: rgba(245,242,255,.55);
}
@media (max-width: 420px){
  body.auth .authBrand img{ width:104px; }
  body.auth .authShell{ width:min(520px, 100%); }
}
