:root{
  --bg:#0c1020;
  --bg2:#0a0d18;
  --text:#ffffff;
  --muted:#9aa3b2;
  --accent:#00ff2a;
  --accentGlow: 0 0 18px rgba(0,255,42,.35);
}

*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 50% -200px, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 600px at 50% 0px, rgba(0,255,42,.05), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:0 20px;
}

/* ===== TOP NAVIGATION ===== */

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(10,13,24,.75);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.navbar{
  max-width:1100px;
  margin:0 auto;
  padding:16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.nav-left{
  display:flex;
  gap:22px;
  font-size:13px;
  color:var(--muted);
}

.nav-left a{
  color:var(--muted);
  transition:.15s ease;
}

.nav-left a:hover{
  color:var(--text);
}

.nav-right{
  display:flex;
  align-items:center;
  gap:14px;
}

/* Login / Dashboard Button */
.nav-btn{
  padding:10px 18px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  border:2px solid var(--accent);
  color:var(--accent);
  transition:.15s ease;
}

.nav-btn:hover{
  background:var(--accent);
  color:#000;
  box-shadow:0 0 20px rgba(0,255,42,.4);
}

/* HERO */
.hero{
  text-align:center;
  padding:72px 0 40px;
}
.hero h1{
  margin:0;
  font-size:40px;
  font-weight:800;
  letter-spacing:-0.02em;
}
.hero .logo{
  width:300px;
  height:auto;
  margin:28px auto 18px;
  display:block;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.45));
}
.hero p{
  margin:0 auto;
  max-width:640px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}
.hero .cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:18px;
  padding:14px 28px;
  border-radius:10px;
  background:var(--accent);
  color:#061008;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  box-shadow: var(--accentGlow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hero .cta:hover{
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(0,255,42,.55);
}

/* SECTION TITLES */
.section{
  padding:40px 0;
  text-align:center;
}
.section h2{
  margin:0 0 26px;
  font-size:34px;
  font-weight:800;
}

/* FEATURES */
.features{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:18px;
  margin-top:18px;
}
@media (max-width: 980px){
  .features{grid-template-columns: repeat(2, minmax(0,1fr));}
}
@media (max-width: 560px){
  .features{grid-template-columns: 1fr;}
}
.feature{
  border:2px solid var(--accent);
  border-radius:22px;
  padding:28px 22px;
  text-align:left;
  background: rgba(255,255,255,.02);
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature:hover{
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(0,255,42,.22);
}
.feature h3{
  margin:0 0 10px;
  color:var(--accent);
  font-size:20px;
  font-weight:800;
}
.feature p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

/* DESCRIPTION */
.desc-wrap{
  max-width:980px;
  margin:0 auto;
}
.desc-sub{
  margin:0 0 18px;
  color:#cfd6e1;
  font-size:14px;
  font-weight:600;
}
.desc{
  color:var(--muted);
  font-size:13px;
  line-height:1.85;
}
.desc p{margin:0 0 16px}

/* STATS */
.stats{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:18px;
  margin-top:18px;
}
@media (max-width: 980px){
  .stats{grid-template-columns: repeat(2, minmax(0,1fr));}
}
@media (max-width: 560px){
  .stats{grid-template-columns: 1fr;}
}
.stat{
  border:2px solid var(--accent);
  border-radius:22px;
  padding:22px;
  text-align:left;
  background: rgba(255,255,255,.02);
}
.stat .value{
  font-size:26px;
  font-weight:900;
  margin:0 0 6px;
}
.stat .label{
  color:var(--muted);
  font-size:13px;
}

/* FOOTER */
.footer{
  padding:50px 0 40px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
}
.footer a{color:var(--muted)}
.footer a:hover{color:var(--text)}

/* ===== CONFIG PAGE ===== */
.config-title{
  text-align:center;
  padding:48px 0 10px;
}
.config-title h1{
  margin:0;
  font-size:34px;
  font-weight:800;
  letter-spacing:-0.02em;
}
.config-title .back{
  display:inline-block;
  margin-top:14px;
  padding:10px 18px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.config-title .back:hover{
  background:rgba(255,255,255,.10);
}

.config-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:18px;
  margin-top:24px;
}
@media (max-width: 860px){
  .config-grid{grid-template-columns: 1fr;}
}

.panel{
  border:2px solid var(--accent);
  border-radius:22px;
  padding:18px;
  background: rgba(255,255,255,.02);
}
.panel h3{
  margin:0 0 12px;
  color:var(--accent);
  font-size:20px;
  font-weight:900;
}
.panel .sub{
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

.server-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:10px;
  padding-top:8px;
}
.server-icon-lg{
  width:128px;height:128px;border-radius:24px;
  overflow:hidden;
  background: rgba(255,255,255,.04);
  display:flex;align-items:center;justify-content:center;
}
.server-icon-lg img{width:128px;height:128px;display:block}
.server-name{
  font-weight:900;
  font-size:14px;
  line-height:1.4;
}
.server-id{
  color:var(--muted);
  font-size:12px;
}

.form-row{margin:10px 0}
label{display:block;font-size:12px;color:#cfd6e1;margin-bottom:6px;font-weight:700}
select,input[type="text"]{
  width:100%;
  padding:10px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
select:focus,input[type="text"]:focus{
  border-color: rgba(0,255,42,.55);
  box-shadow: 0 0 0 3px rgba(0,255,42,.10);
}

.radio-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px 16px;
  align-items:center;
  font-size:12px;
  color:#cfd6e1;
}
.radio-row input{transform: translateY(1px);}

.hint{
  color:var(--muted);
  font-size:11px;
  margin-left:6px;
}

.save-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:12px;
  padding:10px 18px;
  border-radius:10px;
  border:2px solid var(--accent);
  color:var(--accent);
  background:transparent;
  font-size:12px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  cursor:pointer;
}
.save-btn:hover{
  background:var(--accent);
  color:#000;
  box-shadow: 0 0 18px rgba(0,255,42,.30);
}

.filter-list{
  width:100%;
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #e9edf2;
  min-height:220px;
  resize: vertical;
}

.flash{
  max-width:980px;
  margin:18px auto 0;
  border-radius:18px;
  padding:14px 16px;
  font-size:13px;
  line-height:1.6;
}
.flash.ok{
  border:1px solid rgba(0,255,42,.30);
  background: rgba(0,255,42,.07);
  color:#dfffe7;
}
.flash.err{
  border:1px solid rgba(255,80,80,.25);
  background: rgba(255,80,80,.06);
  color:#ffd7d7;
}

.stats-title{
  text-align:center;
  margin-top:46px;
  font-size:34px;
  font-weight:900;
}
.stats-row{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:18px;
  margin-top:22px;
}
@media (max-width: 980px){
  .stats-row{grid-template-columns: repeat(2, minmax(0,1fr));}
}
@media (max-width: 560px){
  .stats-row{grid-template-columns: 1fr;}
}
.stat-box{
  text-align:center;
  padding:18px;
  background: transparent;
}
.stat-box .label{
  font-weight:900;
  font-size:14px;
}
.stat-box .value{
  margin-top:10px;
  font-size:42px;
  font-weight:900;
  color: var(--accent);
  letter-spacing:-0.03em;
}
/* ========================================================================== */
/* GUILD / CONFIG PAGE (ADDON) - scoped, does not affect index                 */
/* ========================================================================== */

/* Add <body class="config-page"> in guild.php */
.config-page .config-title{
  text-align:center;
  padding:55px 0 10px;
}
.config-page .config-title h1{
  margin:0;
  font-size:34px;
  font-weight:900;
}
.config-page .config-title .back{
  display:inline-block;
  margin-top:14px;
  font-size:12px;
  color:var(--muted);
}
.config-page .config-title .back:hover{ color:var(--text); }

/* 2-column layout like cards */
.config-page .config-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:20px;
  margin-top:20px;
}
@media (max-width: 980px){
  .config-page .config-grid{ grid-template-columns:1fr; }
}

/* Panels: reuse server-card look, but as block */
.config-page .panel{
  border:2px solid var(--accent);
  border-radius:24px;
  padding:20px;
  background:rgba(255,255,255,.02);
}
.config-page .panel h3{
  margin:0 0 14px;
  font-size:20px;
  font-weight:900;
  color:var(--accent);
}

/* Server box */
.config-page .server-box{
  text-align:center;
  padding-top:8px;
}
.config-page .server-icon-lg{
  width:110px;
  height:110px;
  border-radius:26px;
  overflow:hidden;
  background:rgba(255,255,255,.05);
  margin: 8px auto 12px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.config-page .server-icon-lg img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.config-page .server-id{
  color:var(--muted);
  font-size:12px;
  margin-top:6px;
}

/* Form spacing */
.config-page .form-row{ margin-bottom:14px; }
.config-page label{
  display:block;
  margin-bottom:8px;
  font-size:13px;
  font-weight:700;
  color:var(--text);
}
.config-page .hint,
.config-page .sub,
.config-page .field-help{
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}

/* Radio layout */
.config-page .radio-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px 16px;
  align-items:center;
}
.config-page .radio-row label{
  margin:0;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:8px;
}
.config-page .radio-row input{ transform: translateY(1px); }

/* Buttons consistent with nav-btn, but smaller */
.config-page .save-btn{
  padding:10px 18px;
  border-radius:10px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  border:2px solid var(--accent);
  color:var(--accent);
  background:transparent;
  transition:.15s ease;
  cursor:pointer;
}
.config-page .save-btn:hover{
  background:var(--accent);
  color:#000;
  box-shadow:0 0 20px rgba(0,255,42,.35);
}

/* ===== Inputs (scoped, so index stays untouched) ===== */
.config-page .sc-input,
.config-page .sc-select,
.config-page .sc-textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); /* dark grey */
  color: #e9edf2;
  outline:none;
  font-size:13px;
  line-height:1.5;
}

/* Fix the too-bright select */
.config-page .sc-select{
  background: rgba(255,255,255,.06);
  color:#e9edf2;
}

/* Make dropdown list readable */
.config-page .sc-select option{
  background:#0f1426;
  color:#e9edf2;
}

.config-page .sc-input:focus,
.config-page .sc-select:focus,
.config-page .sc-textarea:focus{
  border-color: rgba(0,255,42,.55);
  box-shadow: 0 0 0 3px rgba(0,255,42,.10);
}

/* Textareas bigger by default, full width */
.config-page .sc-textarea{
  min-height: 190px;
  resize: vertical;
}

/* Filters list textarea (disabled) */
.config-page .filter-list{
  width:100%;
  margin-top:12px;
  min-height:220px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color:#e9edf2;
}

/* Custom messages: 2 columns on desktop */
.config-page .custom-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:16px;
}
@media (max-width: 860px){
  .config-page .custom-grid{ grid-template-columns:1fr; }
}

/* Stats */
.config-page .stats-title{
  text-align:center;
  margin-top:44px;
  font-size:28px;
  font-weight:900;
}
.config-page .stats-row{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
@media (max-width: 980px){
  .config-page .stats-row{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 520px){
  .config-page .stats-row{ grid-template-columns:1fr; }
}
.config-page .stat-box{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  border-radius:18px;
  padding:16px;
  text-align:center;
}
.config-page .stat-box .label{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}
.config-page .stat-box .value{
  margin-top:10px;
  font-size:40px;
  font-weight:900;
  color:var(--accent);
  letter-spacing:-0.03em;
}