:root{
  --bg:#070814;
  --bg-2:#0d1022;
  --card:rgba(18, 21, 42, 0.82);
  --card-border:rgba(138,108,255,0.18);
  --text:#f4f7ff;
  --muted:#aeb7d9;
  --primary:#8a6cff;
  --primary-2:#6c4eff;
  --success:#11d68b;
  --shadow:0 10px 35px rgba(0,0,0,0.35);
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--text);
  background:radial-gradient(circle at top, rgba(71,52,160,0.22), transparent 28%), linear-gradient(180deg, #06070f 0%, #070814 45%, #090b19 100%);
  animation:fadein .8s ease;
  overflow-x:hidden;
}
#particles{position:fixed; inset:0; width:100%; height:100%; z-index:0; pointer-events:none}
.page-shell{position:relative; z-index:1; min-height:100vh}
.navbar{display:flex; justify-content:space-between; align-items:center; padding:18px 24px; background:rgba(10,11,20,.7); backdrop-filter:blur(12px); border-bottom:1px solid rgba(138,108,255,.12); position:sticky; top:0}
.logo{text-decoration:none; font-size:2rem; font-weight:900; letter-spacing:.05em; color:var(--primary); text-shadow:0 0 18px rgba(138,108,255,.45)}
.nav-right{display:flex; align-items:center; gap:16px}
.nav-link-btn,.btn{appearance:none; border:none; outline:none; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:12px 18px; border-radius:14px; cursor:pointer; font-weight:700; color:#fff; transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease}
.nav-link-btn,.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow:0 0 20px rgba(138,108,255,.38)}
.nav-link-btn:hover,.btn:hover{transform:translateY(-1px) scale(1.02)}
.btn-ghost{background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); box-shadow:none}
.btn-ghost:hover{background:rgba(255,255,255,.1)}
.btn-success{background:linear-gradient(135deg,#19e49a,#09b06f); box-shadow:0 0 22px rgba(17,214,139,.35)}
.hero{min-height:calc(100vh - 81px); display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:32px 20px}
.hero-badge{display:inline-block; padding:10px 14px; border-radius:999px; margin-bottom:20px; border:1px solid rgba(138,108,255,.24); background:rgba(138,108,255,.08); color:#d6ccff; font-size:.85rem; letter-spacing:.14em}
.hero h1{margin:0; font-size:clamp(3rem,7vw,6rem); line-height:1; letter-spacing:.03em; color:var(--primary); text-shadow:0 0 12px rgba(138,108,255,.65), 0 0 32px rgba(138,108,255,.35)}
.hero p{max-width:760px; margin:24px auto 0; font-size:1.15rem; color:var(--muted)}
.hero-actions{margin-top:28px}
.center-wrap{min-height:calc(100vh - 81px); display:grid; place-items:center; padding:32px 20px}
.register-wrap{align-items:start}
.card{position:relative; background:var(--card); border:1px solid var(--card-border); border-radius:24px; box-shadow:var(--shadow); backdrop-filter:blur(10px); overflow:hidden}
.card-glow{position:absolute; inset:auto -40px -60px auto; width:180px; height:180px; border-radius:50%; background:radial-gradient(circle, rgba(138,108,255,.22), transparent 68%); pointer-events:none}
.login-card{width:min(420px,100%); padding:32px}
.profile-mini{display:flex; align-items:center; gap:12px; padding:8px 12px; border-radius:16px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.07)}
.profile-mini-avatar{width:42px; height:42px; border-radius:12px; image-rendering:pixelated; background:#101425; border:1px solid rgba(138,108,255,.28)}
.profile-mini-text{display:flex; flex-direction:column; line-height:1.1}
.profile-mini-sub,.muted,.small-label{color:var(--muted)}
.profile-mini-sub{font-size:.8rem}
.dashboard-grid{width:min(1180px, calc(100% - 32px)); margin:32px auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px}
.dashboard-grid .card{padding:24px}
.profile-card{grid-column:1 / -1}
.profile-card-top{display:flex; align-items:center; gap:18px}
.skin-head-large{width:88px; height:88px; border-radius:20px; image-rendering:pixelated; border:1px solid rgba(138,108,255,.28); box-shadow:0 0 18px rgba(138,108,255,.25); background:#101425}
.server-status{display:flex; flex-direction:column; gap:10px; margin-top:14px}
.status-pill{display:inline-flex; align-self:flex-start; padding:10px 14px; border-radius:999px; background:rgba(138,108,255,.1); border:1px solid rgba(138,108,255,.24); font-weight:700}
.players-text{font-size:1.05rem; color:#dce2ff}
.ip-box{margin-top:22px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px; border-radius:20px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06)}
.small-label{display:block; font-size:.76rem; letter-spacing:.14em; margin-bottom:8px}
#ip{font-size:1.5rem; color:var(--primary); font-weight:800; text-shadow:0 0 16px rgba(138,108,255,.28)}
.player-list{display:grid; gap:10px; margin-top:14px}
.player-item{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06)}
.player-avatar{width:28px; height:28px; border-radius:8px; image-rendering:pixelated; background:#101425}
.join-steps{margin:16px 0 0; padding-left:20px; color:#dce2ff; line-height:1.8}
.error-text{min-height:24px; color:#ff7f9d; font-weight:700}
.success-text{color:#6df2b4; font-weight:700}
.auth-msg{margin:0 0 12px}
.auth-shell{width:min(1020px,100%); background:rgba(20,22,28,.78); border:1px solid rgba(255,255,255,.12); box-shadow:var(--shadow); padding:18px}
.auth-shell h2{margin:0 0 14px}
.auth-form-classic fieldset{border:1px solid rgba(255,255,255,.16); margin:0 0 18px; padding:18px 14px 14px; min-inline-size:0}
.auth-form-classic legend{padding:0 8px; color:#7cb4ff; font-size:.95rem}
.auth-grid{display:grid; gap:16px}
.auth-grid.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
.auth-form-classic label{display:flex; flex-direction:column; gap:6px}
.auth-form-classic label span{font-weight:700}
.auth-form-classic input{width:100%; padding:10px 12px; border-radius:0; border:1px solid rgba(255,255,255,.18); background:#111318; color:#fff; outline:none; box-shadow:none}
.auth-form-classic input:focus{border-color:#8a6cff}
.checkbox-row{display:flex !important; flex-direction:row !important; align-items:center; gap:10px; margin-top:10px}
.checkbox-row input{width:auto}
.classic-links a{color:#66b0ff; text-decoration:none; margin-right:18px}
.classic-links a:hover{text-decoration:underline}
.classic-note{margin:8px 0 0}
.single-label{max-width:420px}
.invite-form{display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap}
.invite-form input{max-width:160px; padding:12px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.08); background:rgba(9,11,24,.78); color:#fff}
.invite-code-list,.invite-history{display:grid; gap:10px; margin-top:16px}
.invite-code-item,.invite-history-item{display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-radius:14px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06)}
.badge{padding:6px 10px; border-radius:999px; font-size:.82rem; font-weight:700}
.badge-open{background:rgba(25,228,154,.18); color:#7bf0bf}
.badge-used{background:rgba(255,127,157,.15); color:#ff9bb2}
code{font-family:Consolas, monospace; color:#d7cbff}
@keyframes fadein{from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:translateY(0)}}
@media (max-width:900px){.dashboard-grid{grid-template-columns:1fr}.profile-card{grid-column:auto}.navbar{padding:16px}.nav-right{gap:10px}.profile-mini-text{display:none}.ip-box{flex-direction:column; align-items:flex-start}#ip{font-size:1.2rem; word-break:break-all}.auth-grid.two-col{grid-template-columns:1fr}}
.hero-actions-row{display:flex; gap:14px; justify-content:center; flex-wrap:wrap}
.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.stack-form{display:grid; gap:14px; margin-top:12px}
.stack-form label{display:grid; gap:6px}
.stack-form input{width:100%; padding:12px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.08); background:rgba(9,11,24,.78); color:#fff}
.chat-card{grid-column:1 / -1}
.chat-messages{height:320px; overflow-y:auto; display:grid; gap:8px; padding:14px; border-radius:16px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06); margin-top:12px}
.chat-message{display:flex; gap:8px; align-items:flex-start; flex-wrap:wrap; word-break:break-word}
.chat-name{font-weight:800; color:#d8deff}
.chat-name-admin{color:#c59bff; text-shadow:0 0 10px rgba(138,108,255,.9), 0 0 20px rgba(138,108,255,.4)}
.chat-sep{color:#8c96bd}
.chat-text{color:#eef1ff; white-space:pre-wrap; flex:1}
.chat-form{display:flex; gap:12px; margin-top:14px}
.chat-form input{flex:1; padding:12px 14px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background:rgba(9,11,24,.78); color:#fff}
@media (max-width:900px){.settings-grid{grid-template-columns:1fr}.chat-form{flex-direction:column}}
