:root{
  --bg1:#0b1020; --bg2:#070a14;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.09);
  --txt: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --line: rgba(255,255,255,.12);
  --shadow: 0 18px 55px rgba(0,0,0,.45);
  --r: 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, "Noto Sans", "Helvetica Neue";
  color:var(--txt);
  background: radial-gradient(1200px 700px at 20% 10%, rgba(127,78,255,.25), transparent 55%),
              radial-gradient(900px 600px at 80% 20%, rgba(29,180,255,.18), transparent 60%),
              linear-gradient(180deg, var(--bg1), var(--bg2));
}

.bg{
  position:fixed; inset:0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 0);
  background-size: 18px 18px;
  pointer-events:none;
  opacity:.55;
}

.topbar{
  max-width:1100px;
  margin:26px auto 0;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:38px; height:38px;
  display:grid; place-items:center;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(127,78,255,.35), rgba(29,180,255,.25));
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}
.brandTitle{font-weight:800; letter-spacing:.2px}
.brandSub{font-size:12px; color:var(--muted); margin-top:2px}

.topActions{display:flex; align-items:center; gap:10px; flex-wrap:wrap}

.loginBadge{
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  font-size:13px;
  color: rgba(255,255,255,.85);
}

.wrap{
  max-width:1100px;
  margin:18px auto 48px;
  padding:0 18px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
}

.card{
  background: linear-gradient(180deg, var(--card2), var(--card));
  border:1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding:18px;
  backdrop-filter: blur(10px);
}

.hero h1{margin:0 0 10px; font-size:28px}
h2{margin:0 0 10px}
.muted{color:var(--muted); line-height:1.4}
.tiny{font-size:12px}

.field{margin:14px 0}
label{display:block; font-size:12px; color:var(--muted); margin-bottom:7px}
input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color:var(--txt);
  outline:none;
}
input:focus{
  border-color: rgba(127,78,255,.6);
  box-shadow: 0 0 0 4px rgba(127,78,255,.18);
}
.hint{font-size:12px; color:var(--muted); margin-top:6px}

.row{display:flex; gap:10px; margin-top:10px; flex-wrap:wrap}
.btn{
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color:var(--txt);
  border-radius: 14px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{background: rgba(255,255,255,.12)}
.btn.primary{
  background: linear-gradient(135deg, rgba(127,78,255,.9), rgba(29,180,255,.8));
  border-color: transparent;
}
.btn.primary:hover{filter:brightness(1.05)}
.btn.ghost{background: transparent}
.btn.small{padding:8px 12px; font-size:13px}

.result{
  margin-top:14px;
  padding:14px;
  border-radius:16px;
  border:1px dashed rgba(255,255,255,.18);
  background: rgba(0,0,0,.18);
}
.resultTop{display:flex; align-items:center; justify-content:space-between; gap:10px}
.resultLabel{font-size:12px; color:var(--muted); margin-bottom:6px}
.result a{color:#cfe8ff; text-decoration:none; font-weight:800; word-break:break-all}
.result a:hover{text-decoration:underline}

.notice{
  margin-top:14px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.14);
  color: rgba(255,255,255,.82);
  font-size:13px;
  line-height:1.35;
}

.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}

.toast{
  margin-top:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  font-weight:700;
}
.toast.ok{box-shadow: 0 0 0 4px rgba(0,255,190,.12)}
.toast.bad{box-shadow: 0 0 0 4px rgba(255,70,120,.12)}

.statsHeader{display:flex; align-items:baseline; justify-content:space-between; gap:12px}
.tableWrap{overflow:auto; border-radius:14px; border:1px solid rgba(255,255,255,.12); margin:12px 0}
.table{
  width:100%;
  border-collapse:collapse;
  min-width:700px;
  background: rgba(0,0,0,.14);
}
.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.10);
  text-align:left;
  font-size:13px;
}
.table th{color:rgba(255,255,255,.8); font-size:12px; text-transform:uppercase; letter-spacing:.08em}
.table td a{color:#cfe8ff; font-weight:800; text-decoration:none}
.table td a:hover{text-decoration:underline}
.clip{max-width:520px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

/* --- Segmented toggle (Vanity/Short) --- */
.seg{
  position: relative;
  display:flex;
  gap:10px;
  padding:6px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  overflow:hidden;
}

.segThumb{
  position:absolute;
  top:6px;
  bottom:6px;
  left:0;
  width:50%;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(127,78,255,.55), rgba(29,180,255,.35));
  border:1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 30px rgba(0,0,0,.30);
  transition: transform .25s ease, width .25s ease;
  pointer-events:none;
}

.segBtn{
  position:relative;
  z-index:1;
  flex:1;
  text-align:left;
  padding:10px 12px;
  border-radius:14px;
  border:0;
  background: transparent;
  color: rgba(255,255,255,.80);
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:2px;
  transition: transform .15s ease;
}
.segBtn:hover{ transform: translateY(-1px); }
.segBtn.active{ color: rgba(255,255,255,.95); }
.segTitle{ font-weight:900; letter-spacing:.2px; font-size:14px; }
.segSub{ font-size:12px; color: rgba(255,255,255,.70); }
.btn.copied{
  background: rgba(0,255,190,.18);
  border-color: rgba(0,255,190,.55);
  box-shadow: 0 0 0 4px rgba(0,255,190,.12);
}

.btn.copyFail{
  background: rgba(255,70,120,.18);
  border-color: rgba(255,70,120,.55);
  box-shadow: 0 0 0 4px rgba(255,70,120,.12);
}

@media (max-width: 980px){
  .wrap{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .topbar{flex-direction:column; align-items:flex-start}
}
