:root{
  --bg:#0F1210;
  --bg-alt:#161A16;
  --card:#181D18;
  --text:#EDEAE0;
  --text-dim:#9A9A8E;
  --orange:#FF7A29;
  --orange-dim:#B8551C;
  --green:#7CB342;
  --red:#d95c5c;
  --line:#262B24;
  --radius:10px;
}
html[data-theme="light"]{
  --bg:#F4F2EC;
  --bg-alt:#EAE7DD;
  --card:#FFFFFF;
  --text:#191A15;
  --text-dim:#6B6B5F;
  --line:#DEDACD;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  transition:background .3s ease, color .3s ease;
  min-height:100vh;
  position:relative;
}
body::before{
  content:"";
  position:fixed; inset:0; z-index:0; pointer-events:none;
  opacity:.035; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > *{position:relative; z-index:1;}
h1,h2,h3,.display{font-family:'Space Grotesk', sans-serif; letter-spacing:-0.01em;}
.mono{font-family:'IBM Plex Mono', monospace;}
a{color:inherit; text-decoration:none;}
.wrap{max-width:1180px; margin:0 auto; padding:0 32px;}

/* ---------- Header ---------- */
header{
  position:fixed; top:0; left:0; right:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 32px;
  backdrop-filter:blur(10px);
  background:linear-gradient(to bottom, rgba(15,18,16,.85), transparent);
}
html[data-theme="light"] header{background:linear-gradient(to bottom, rgba(244,242,236,.9), transparent);}
.brand{font-size:18px; font-weight:700; letter-spacing:.02em;}
.brand span{color:var(--orange);}
nav.mainnav{display:flex; gap:28px;}
nav.mainnav a{
  font-size:12.5px; font-weight:500; text-transform:uppercase; letter-spacing:.08em;
  color:var(--text-dim); transition:color .2s;
}
nav.mainnav a:hover,nav.mainnav a.active{color:var(--text);}

.header-right{display:flex; align-items:center; gap:18px; position:relative;}
.gear-btn{
  width:34px; height:34px; border-radius:50%; border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  background:var(--card); color:var(--text-dim); transition:.2s;
}
.gear-btn:hover{color:var(--orange); border-color:var(--orange-dim);}
.gear-btn svg{width:16px; height:16px;}

.settings-pop{
  position:absolute; top:44px; right:0; width:210px;
  background:var(--card); border:1px solid var(--line); border-radius:12px;
  padding:6px; display:none; flex-direction:column; gap:2px;
  box-shadow:0 12px 30px rgba(0,0,0,.4);
}
.settings-pop.open{display:flex;}
.settings-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 10px; border-radius:8px; cursor:pointer; font-size:13.5px; color:var(--text);
}
.settings-row:hover{background:var(--bg-alt);}
.settings-row .left{display:flex; align-items:center; gap:9px;}
.settings-row .chev{color:var(--text-dim); font-size:12px;}
.sub-options{display:none; flex-direction:column; padding:2px 4px 4px;}
.sub-options.open{display:flex;}
.sub-opt{padding:8px 16px; border-radius:7px; font-size:13px; cursor:pointer; color:var(--text-dim); display:flex; justify-content:space-between;}
.sub-opt:hover{background:var(--bg-alt); color:var(--text);}
.sub-opt.active{color:var(--orange);}

/* ---------- Hero ---------- */
.hero{
  position:relative; min-height:100svh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; padding:120px 24px 60px; overflow:hidden;
}
.hero::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(255,122,41,.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(124,179,66,.06), transparent 60%);
  pointer-events:none;
}
.eyebrow{font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--orange); letter-spacing:.18em; text-transform:uppercase; margin-bottom:22px;}
.hero h1{font-size:clamp(38px, 7vw, 84px); line-height:.98; font-weight:700; max-width:900px;}
.hero h1 .accent{color:var(--orange);}
.hero p.sub{margin-top:22px; color:var(--text-dim); font-size:16px; max-width:520px; line-height:1.6;}
.hero-cta{display:flex; gap:14px; margin-top:38px; flex-wrap:wrap; justify-content:center;}
.btn{padding:14px 26px; border-radius:8px; font-size:13.5px; font-weight:500; letter-spacing:.03em; cursor:pointer; transition:.2s; border:1px solid transparent; display:inline-block;}
.btn-primary{background:var(--orange); color:#12130F;}
.btn-primary:hover{background:#ff8a45; transform:translateY(-1px);}
.btn-ghost{border-color:var(--line); color:var(--text);}
.btn-ghost:hover{border-color:var(--orange-dim); color:var(--orange);}

.root-line{width:100%; max-width:260px; margin:56px auto 0; opacity:.8;}
.root-line path{stroke:var(--orange-dim); stroke-width:1.5; fill:none; stroke-dasharray:400; stroke-dashoffset:400; animation:draw 1.8s ease forwards .3s;}
html[data-theme="light"] .root-line path{stroke:var(--orange);}
@keyframes draw{to{stroke-dashoffset:0;}}
@media (prefers-reduced-motion: reduce){.root-line path{animation:none; stroke-dashoffset:0;}}

/* ---------- Sections ---------- */
section{padding:100px 0;}
.section-head{margin-bottom:46px; max-width:560px;}
.section-head .eyebrow{margin-bottom:14px;}
.section-head h2{font-size:clamp(26px,4vw,38px); font-weight:700;}
.section-head p{color:var(--text-dim); margin-top:12px; font-size:14.5px; line-height:1.6;}

.grid{display:grid; grid-template-columns:repeat(2, 1fr); gap:18px;}
@media (max-width:760px){.grid{grid-template-columns:1fr;}}

.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:26px; display:flex; flex-direction:column; gap:14px; transition:.25s; position:relative; overflow:hidden;
}
.card:hover{border-color:var(--orange-dim); transform:translateY(-2px);}
.card-top{display:flex; align-items:flex-start; justify-content:space-between;}
.card-icon{width:38px; height:38px; border-radius:8px; background:var(--bg-alt); display:flex; align-items:center; justify-content:center; color:var(--orange);}
.card-icon svg{width:18px; height:18px;}
.status{display:flex; align-items:center; gap:6px; font-size:11px; color:var(--text-dim); font-family:'IBM Plex Mono',monospace;}
.dot{width:6px; height:6px; border-radius:50%; background:var(--green); box-shadow:0 0 6px var(--green);}
.dot.off{background:var(--red); box-shadow:0 0 6px var(--red);}
.card h3{font-size:19px; font-weight:700;}
.card .domain{font-size:12.5px; color:var(--orange);}
.card p.desc{font-size:13.5px; color:var(--text-dim); line-height:1.55; flex:1;}
.card .launch{font-size:12.5px; font-weight:500; color:var(--text); display:flex; align-items:center; gap:6px; padding-top:8px; border-top:1px solid var(--line);}
.card .launch svg{width:12px; height:12px; transition:.2s;}
.card:hover .launch svg{transform:translate(2px,-2px);}

/* ---------- Announcements ---------- */
.ann-list{display:flex; flex-direction:column; gap:2px;}
.ann-item{display:grid; grid-template-columns:110px 90px 1fr; gap:20px; padding:22px 0; border-bottom:1px solid var(--line);}
@media (max-width:640px){.ann-item{grid-template-columns:1fr; gap:8px;}}
.ann-date{font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--text-dim);}
.ann-tag{font-size:10.5px; font-weight:500; letter-spacing:.05em; text-transform:uppercase; color:var(--orange); align-self:start; padding:3px 8px; border:1px solid var(--orange-dim); border-radius:20px; width:fit-content;}
.ann-body h4{font-size:15.5px; font-weight:700; margin-bottom:5px;}
.ann-body p{font-size:13.5px; color:var(--text-dim); line-height:1.55;}
.empty-state{color:var(--text-dim); font-size:13.5px; padding:30px 0; border-top:1px solid var(--line);}

/* ---------- Footer ---------- */
footer{border-top:1px solid var(--line); padding:36px 0; margin-top:40px;}
.footer-row{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px;}
.footer-row .fl{font-size:12px; color:var(--text-dim);}
.footer-row .fl a{color:var(--text-dim); margin-left:16px; transition:.2s;}
.footer-row .fl a:hover{color:var(--orange);}

/* ---------- Forms / Admin ---------- */
.admin-box{max-width:640px; margin:0 auto; padding:120px 24px 60px;}
.admin-lock{max-width:360px; margin:60px auto 0; text-align:center; display:flex; flex-direction:column; gap:14px;}
input[type=password], input[type=text], input[type=email], textarea, select{
  background:var(--bg-alt); border:1px solid var(--line); color:var(--text);
  padding:11px 13px; border-radius:8px; font-family:inherit; font-size:13.5px; width:100%;
}
textarea{resize:vertical; min-height:80px;}
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:14px; text-align:left;}
.field label{font-size:12px; color:var(--text-dim);}
.admin-list-item{display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:16px; border:1px solid var(--line); border-radius:10px; margin-bottom:10px; background:var(--card);}
.admin-list-item .meta{font-size:11px; color:var(--text-dim); font-family:'IBM Plex Mono',monospace; margin-bottom:4px;}
.del-btn{color:var(--red); font-size:12px; cursor:pointer; white-space:nowrap;}
.del-btn:hover{text-decoration:underline;}
.error-msg{color:var(--red); font-size:12.5px; min-height:16px;}

/* Maintenance toggle switch */
.switch-row{display:flex; align-items:center; justify-content:space-between; padding:18px; border:1px solid var(--line); border-radius:10px; background:var(--card); margin-bottom:30px;}
.switch-row .label{font-size:14px; font-weight:600;}
.switch-row .sub{font-size:12px; color:var(--text-dim); margin-top:3px;}
.switch{position:relative; width:46px; height:26px; flex-shrink:0;}
.switch input{opacity:0; width:0; height:0;}
.slider{position:absolute; cursor:pointer; inset:0; background:var(--line); border-radius:30px; transition:.2s;}
.slider::before{content:""; position:absolute; height:20px; width:20px; left:3px; top:3px; background:var(--text); border-radius:50%; transition:.2s;}
.switch input:checked + .slider{background:var(--orange);}
.switch input:checked + .slider::before{transform:translateX(20px); background:#12130F;}

/* ---------- Admin: login screen ---------- */
.login-screen{
  position:relative; min-height:100vh; display:flex; align-items:center; justify-content:center;
  overflow:hidden; padding:24px;
}
.letter-bg{
  position:fixed; inset:0; z-index:0;
  display:flex; flex-wrap:wrap; align-content:flex-start;
  pointer-events:none; user-select:none;
}
.letter-bg span{
  width:64px; height:64px; display:flex; align-items:center; justify-content:center;
  font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:22px;
  color:var(--line); pointer-events:auto; transition:color .25s ease, text-shadow .25s ease;
}
.letter-bg span:hover{color:var(--orange); text-shadow:0 0 20px var(--orange-dim);}
.login-card{
  position:relative; z-index:1; width:100%; max-width:380px;
  background:var(--card); border:1px solid var(--line); border-radius:14px;
  padding:36px 32px; text-align:center; box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.login-card h1{font-size:24px; font-weight:700; margin-bottom:8px;}
.login-card h1 .accent{color:var(--orange);}
.login-card p.sub{color:var(--text-dim); font-size:13px; margin-bottom:26px;}
.login-card .field{text-align:left;}

/* ---------- Admin: dashboard shell ---------- */
.dash-shell{display:flex; min-height:100vh;}
.dash-sidebar{
  width:220px; flex-shrink:0; background:var(--bg-alt); border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:24px 14px; position:sticky; top:0; height:100vh;
}
.dash-sidebar .brand{font-size:16px; font-weight:700; padding:0 10px 26px; letter-spacing:.02em;}
.dash-sidebar .brand span{color:var(--orange);}
.dash-nav{display:flex; flex-direction:column; gap:2px; flex:1;}
.dash-nav button{
  display:flex; align-items:center; gap:10px; text-align:left; background:none; border:none;
  color:var(--text-dim); font-family:inherit; font-size:13.5px; padding:10px 12px; border-radius:8px;
  cursor:pointer; transition:.15s;
}
.dash-nav button svg{width:16px; height:16px; flex-shrink:0;}
.dash-nav button:hover{background:var(--card); color:var(--text);}
.dash-nav button.active{background:var(--card); color:var(--orange);}
.dash-sidebar-footer{display:flex; flex-direction:column; gap:4px; padding-top:14px; border-top:1px solid var(--line);}
.dash-sidebar-footer a{font-size:12.5px; padding:9px 12px; border-radius:8px; color:var(--text-dim);}
.dash-sidebar-footer a:hover{background:var(--card); color:var(--text);}
.dash-sidebar-footer a.danger:hover{color:var(--red);}
.dash-main{flex:1; padding:40px 44px; max-width:820px;}
.dash-panel{display:none;}
.dash-panel.active{display:block;}
.dash-panel h2{font-size:22px; font-weight:700; margin-bottom:28px;}

.overview-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; margin-bottom:8px;}
@media (max-width:700px){.overview-grid{grid-template-columns:1fr;} .dash-shell{flex-direction:column;} .dash-sidebar{width:100%; height:auto; position:relative; flex-direction:row; align-items:center; flex-wrap:wrap;} .dash-nav{flex-direction:row; flex-wrap:wrap;} .dash-main{padding:28px 20px;}}
.stat-card{background:var(--card); border:1px solid var(--line); border-radius:10px; padding:20px;}
.stat-card .stat-label{font-size:11.5px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px;}
.stat-card .stat-value{font-size:17px; font-weight:700; display:flex; align-items:center; gap:8px;}
.stat-card .stat-sub{font-size:12px; color:var(--text-dim); margin-top:6px; line-height:1.5;}

/* ---------- Maintenance page ---------- */
.maint-wrap{
  min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:24px;
}
.maint-icon{width:56px; height:56px; color:var(--orange); margin-bottom:26px;}
.maint-wrap h1{font-size:clamp(30px,6vw,52px); font-weight:700; margin-bottom:16px;}
.maint-wrap p{color:var(--text-dim); max-width:460px; font-size:15px; line-height:1.6; margin-bottom:34px;}

/* ---------- Live status strip (under hero) ---------- */
.status-strip{
  display:flex; gap:14px; flex-wrap:wrap; justify-content:center; margin-top:44px;
}
.status-chip{
  display:flex; align-items:center; gap:9px; background:var(--card); border:1px solid var(--line);
  border-radius:30px; padding:9px 18px; font-size:12.5px;
}
.status-chip .name{color:var(--text-dim); font-family:'IBM Plex Mono',monospace;}
.status-chip .val{font-weight:600;}
.status-chip .dot{width:7px; height:7px;}

/* ---------- Embed card (Discord-style link preview) ---------- */
.embed-card{
  display:flex; gap:22px; background:var(--card); border:1px solid var(--line);
  border-left:3px solid var(--orange); border-radius:10px; padding:22px;
  max-width:640px; margin:0 auto;
}
.embed-card img{
  width:120px; height:120px; object-fit:cover; border-radius:8px; flex-shrink:0;
  background:var(--bg-alt);
}
.embed-card .embed-body{display:flex; flex-direction:column; gap:8px; min-width:0;}
.embed-card .embed-title{font-size:17px; font-weight:700;}
.embed-card .embed-desc{font-size:13.5px; color:var(--text-dim); line-height:1.55;}
.embed-card .embed-link{
  font-size:12.5px; font-weight:500; color:var(--orange); display:inline-flex; align-items:center; gap:5px;
  margin-top:auto; width:fit-content;
}
.embed-card .embed-link svg{width:12px; height:12px;}
@media (max-width:520px){
  .embed-card{flex-direction:column;}
  .embed-card img{width:100%; height:160px;}
}
