/* ===== Base ===== */
:root{
  --bg0:#0b0e18;
  --bg1:#0f1220;
  --card:#141a33;
  --card2:#1b2250;
  --stroke:rgba(255,255,255,.10);
  --text:#ffffff;
  --muted:rgba(255,255,255,.70);
  --muted2:rgba(255,255,255,.55);
  --accent:#5865f2;
  --green:#57f287;
  --red:#ef4444;
  --yellow:#facc15;
  --shadow:0 30px 80px rgba(0,0,0,.55);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  color:var(--text);
  background:linear-gradient(160deg,var(--bg1),#090c18);
  overflow-x:hidden;
}

a{color:inherit; text-decoration:none}
.small{font-size:12px}
.muted{color:var(--muted)}
.page{min-height:100vh; position:relative}

/* ===== Background (discord-ish) ===== */
.bg{position:fixed; inset:0; z-index:-1; overflow:hidden}
.bg__grid{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 20% 20%, rgba(88,101,242,.08), transparent 40%),
    radial-gradient(circle at 80% 40%, rgba(87,242,135,.06), transparent 50%),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  opacity:.35;
}
.bg__orb{
  position:absolute;
  width:520px; height:520px;
  border-radius:50%;
  filter:blur(55px);
  opacity:.35;
  animation: floaty 8s ease-in-out infinite;
}
.bg__orb--1{
  left:-140px; top:-160px;
  background:radial-gradient(circle, rgba(88,101,242,.8), transparent 60%);
}
.bg__orb--2{
  right:-180px; bottom:-220px;
  background:radial-gradient(circle, rgba(87,242,135,.65), transparent 60%);
  animation-duration:10s;
}
@keyframes floaty{
  0%,100%{transform:translate(0,0)}
  50%{transform:translate(20px, -18px)}
}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  transition:.18s transform, .18s opacity, .18s background;
  user-select:none;
}
.btn:hover{transform:translateY(-1px); background:rgba(255,255,255,.10)}
.btn:active{transform:translateY(0)}
.btn--primary{background:linear-gradient(180deg, rgba(88,101,242,1), rgba(88,101,242,.75)); border-color:transparent}
.btn--primary:hover{background:linear-gradient(180deg, rgba(88,101,242,1), rgba(88,101,242,.9))}
.btn--ghost{background:transparent}
.btn--discord{background:linear-gradient(180deg, rgba(88,101,242,1), rgba(88,101,242,.75)); border-color:transparent}
.btn__icon{opacity:.9}

/* ===== Auth Page ===== */
.page--auth .auth{
  display:grid;
  grid-template-columns: 520px 360px;
  gap:26px;
  padding: 64px 20px;
  max-width: 980px;
  margin: 0 auto;
  align-items:start;
}
@media (max-width: 980px){
  .page--auth .auth{grid-template-columns:1fr; padding: 48px 16px}
}
.authCard{
  background: rgba(20,26,51,.78);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(10px);
}
.authTop{display:flex; align-items:center; justify-content:space-between; gap:12px}
.pill{
  font-size:12px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--muted);
}
.h1{margin:18px 0 10px; font-size:34px; line-height:1.1}
.authActions{display:flex; gap:12px; flex-wrap:wrap; margin-top:18px}
.authFooter{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:22px}
.hint{display:flex; align-items:center; gap:10px}
.dot{width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 18px rgba(87,242,135,.5)}
.sideInfo{display:flex; flex-direction:column; gap:14px}
.sideInfo__card{
  background: rgba(20,26,51,.50);
  border:1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(10px);
}
.sideInfo__title{font-weight:700; margin-bottom:10px}
.checklist{margin:0; padding-left:18px; color:var(--muted)}
.checklist--soon{color:rgba(255,255,255,.55)}

/* ===== Brand ===== */
.brand{display:flex; align-items:center; gap:12px}
.brand__logo{
  width:42px; height:42px; border-radius:14px;
  display:grid; place-items:center;
  background:linear-gradient(180deg, rgba(88,101,242,1), rgba(88,101,242,.7));
  box-shadow:0 18px 40px rgba(88,101,242,.25);
  font-weight:900;
}
.brand__name{font-weight:900}
.brand__tag{font-size:12px; color:var(--muted2)}

/* ===== Dashboard Layout ===== */
.layout{display:flex; min-height:100vh}
.sidebar{
  width:270px;
  padding:22px;
  background: rgba(11,14,24,.78);
  border-right:1px solid var(--stroke);
  backdrop-filter: blur(10px);
}
.sidebar__brand{margin-bottom:10px}
.sidebar__foot{margin-top:18px}
.main{
  flex:1;
  padding: 28px 26px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Nav */
.nav{display:flex; flex-direction:column; gap:8px; margin-top:14px}
.nav__item{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  text-align:left;
  transition:.18s background, .18s transform;
}
.nav__item:hover{background:rgba(255,255,255,.06); transform:translateY(-1px)}
.nav__item--active{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.10);
  color:#fff;
}
.nav__item--danger{color:rgba(255,255,255,.85)}
.nav__item--danger:hover{background:rgba(239,68,68,.14)}
.nav__sep{height:1px; background:rgba(255,255,255,.08); margin:10px 0}

/* Top header inside main */
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:16px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:rgba(20,26,51,.55);
  backdrop-filter: blur(10px);
}
.userPill{display:flex; align-items:center; gap:12px}
.avatar{width:42px; height:42px; border-radius:14px}
.userMeta{display:flex; flex-direction:column; line-height:1.15}
.userName{font-weight:800}
.userCredits{color:var(--green); font-weight:800; font-size:13px}

/* Cards */
.sectionTitle{margin:22px 4px 10px; font-size:18px; font-weight:900}
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:14px;
}
.cardX{
  background:rgba(20,26,51,.55);
  border:1px solid var(--stroke);
  border-radius:16px;
  padding:14px;
  backdrop-filter: blur(10px);
  transition:.18s transform, .18s background;
}
.cardX:hover{transform:translateY(-1px); background:rgba(20,26,51,.70)}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(250,204,21,.25);
  background:rgba(250,204,21,.10);
  color:rgba(255,255,255,.90);
  margin-bottom:10px;
}
.cardX__content{white-space:pre-wrap}
.cardX__meta{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:12px}
.cardX__date{color:var(--muted2); font-size:12px}
.cardX__actions{display:flex; gap:8px}
.iconBtn{
  width:36px; height:36px;
  display:grid; place-items:center;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
}
.iconBtn:hover{background:rgba(255,255,255,.10)}

/* Modal */
.modal{position:fixed; inset:0; display:none; z-index:50}
.modal--open{display:block}
.modal__backdrop{position:absolute; inset:0; background:rgba(0,0,0,.62)}
.modal__panel{
  position:relative;
  width:min(640px, calc(100% - 26px));
  margin: 80px auto;
  border-radius:18px;
  background:rgba(20,26,51,.92);
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.modal__head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:16px 16px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modal__title{font-weight:900; font-size:16px}
.modal__sub{margin-top:4px}
.modal__body{padding:14px 16px}
.modal__foot{
  display:flex; justify-content:flex-end; gap:10px;
  padding:12px 16px 16px;
  border-top:1px solid rgba(255,255,255,.08);
}
.field{display:flex; flex-direction:column; gap:8px; margin-bottom:12px}
.field__label{font-size:12px; color:var(--muted)}
.field__input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  outline:none;
}
textarea.field__input{min-height:120px; resize:none}
.row{display:grid; grid-template-columns:1fr 220px; gap:12px}
@media(max-width:720px){ .row{grid-template-columns:1fr} }

.preview{margin-top:12px}
.preview__title{font-weight:900; font-size:13px; margin-bottom:10px}
.discordCard{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(11,14,24,.55);
  overflow:hidden;
}
.discordCard__bar{height:6px; background:linear-gradient(90deg, rgba(88,101,242,1), rgba(87,242,135,.8))}
.discordCard__content{padding:14px; white-space:pre-wrap}
.discordCard__meta{padding:0 14px 14px}

/* ===== Animations ===== */
.fadeIn{animation: fadeIn .35s ease both}
.liftIn{animation: liftIn .40s cubic-bezier(.2,.8,.2,1) both}
.slideInLeft{animation: slideInLeft .45s cubic-bezier(.2,.8,.2,1) both}
@keyframes fadeIn{from{opacity:0} to{opacity:1}}
@keyframes liftIn{from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:translateY(0)}}
@keyframes slideInLeft{from{opacity:0; transform:translateX(-10px)} to{opacity:1; transform:translateX(0)}}
