:root{--bg:#fff;--panel:#f7f7f8;--text:#17181b;--muted:#6b7078;--line:#e6e7ea;--accent:#5865f2;--accent2:#4752c4;--danger:#d33b3b;--success:#137333;--shadow:0 8px 30px rgba(0,0,0,.06)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}.topbar{height:64px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px;gap:28px;position:sticky;top:0;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);z-index:10}.brand{display:flex;align-items:center;gap:10px;font-weight:750;white-space:nowrap;min-width:0}.brand-logo-wrap{width:180px;height:44px;display:flex;align-items:center;justify-content:flex-start;overflow:hidden}.brand-logo{display:block;max-width:180px;max-height:44px;width:auto;height:auto;object-fit:contain;object-position:left center}.brand-name{display:none}.search{max-width:600px;flex:1;margin:auto;position:relative}.search input{width:100%;background:var(--panel);border:1px solid transparent;border-radius:9px;padding:10px 52px 10px 14px;outline:0}.search input:focus{border-color:#cdd0d7;background:#fff}.search kbd{position:absolute;right:10px;top:8px;color:#858a92;background:#fff;border:1px solid var(--line);border-radius:5px;padding:2px 6px;font-size:11px}.topbar nav{display:flex;align-items:center;gap:18px;font-size:14px}.topbar button{border:0;background:none;cursor:pointer}.inline{display:inline}.layout{display:grid;grid-template-columns:260px minmax(0,760px) 180px;gap:56px;max-width:1280px;margin:0 auto;padding:38px 32px}.sidebar{position:sticky;top:102px;height:calc(100vh - 130px);overflow:auto;padding-right:12px}.side-title,.toc div{font-size:12px;font-weight:750;color:#8b9098;text-transform:uppercase;letter-spacing:.06em;margin-bottom:18px}.sidebar section{margin-bottom:24px}.cat{font-weight:700;font-size:13px;margin-bottom:7px}.side-link{display:block;padding:7px 10px;border-radius:7px;color:#686d76;font-size:14px;margin:2px 0}.side-link:hover{background:var(--panel);color:var(--text)}.side-link.active{background:#eef0ff;color:var(--accent);font-weight:650}.content{min-width:0}.crumb{font-size:13px;color:#8a8f98;margin-bottom:28px}.content article h1{font-size:42px;line-height:1.12;letter-spacing:-.03em;margin:0 0 8px}.updated{font-size:13px;color:#90949b;margin-bottom:38px}.markdown{font-size:16px;line-height:1.75}.markdown h1{font-size:32px;margin-top:42px}.markdown h2{font-size:25px;margin-top:38px}.markdown h3{font-size:20px;margin-top:28px}.markdown p{margin:16px 0}.markdown a{color:var(--accent);text-decoration:underline}.markdown img{max-width:100%;height:auto;width:auto;border-radius:10px;object-fit:contain}.markdown pre{background:#17181b;color:#f1f1f1;padding:18px;border-radius:10px;overflow:auto}.markdown code{background:#f0f1f3;border-radius:5px;padding:2px 5px}.markdown pre code{background:none;padding:0}.markdown table{border-collapse:collapse;width:100%;margin:20px 0}.markdown th,.markdown td{border:1px solid var(--line);padding:9px 12px;text-align:left}.toc{position:sticky;top:102px;height:max-content;border-left:1px solid var(--line);padding-left:20px;font-size:13px;color:#7c8189}.toc a{display:block;margin:10px 0}.pager{display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--line);margin-top:60px;padding-top:22px}.pager a{border:1px solid var(--line);border-radius:9px;padding:12px 15px;min-width:160px}.pager a.next{text-align:right;margin-left:auto}.pager small{display:block;color:#9499a1;margin-bottom:4px}.admin{max-width:1200px;margin:0 auto;padding:45px 30px}.admin.narrow{max-width:1000px}.admin-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:30px;gap:20px}.admin h1{font-size:38px;margin:6px 0}.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);font-weight:800}.admin-actions{display:flex;gap:10px;flex-wrap:wrap}.button,.primary{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;padding:10px 15px;background:var(--accent);color:#fff;font-weight:650;cursor:pointer}.button{background:var(--panel);color:var(--text)}.primary:hover{background:var(--accent2)}.admin-grid{display:grid;grid-template-columns:2fr 1fr;gap:22px}.panel{border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:var(--shadow);padding:20px;margin-bottom:22px}.panel-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:5px}.panel h2{font-size:18px;margin:0 0 12px}.panel-head h2{margin:0}.panel-head span{background:var(--panel);padding:4px 8px;border-radius:99px;font-size:12px}.row{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.row:last-child{border-bottom:0}.row strong{display:block}.row small{display:block;color:var(--muted);margin-top:4px;font-size:12px}.actions{display:flex;gap:12px;align-items:center;font-size:13px}.actions a{color:var(--accent)}.danger-link{border:0;background:none;color:var(--danger);cursor:pointer}.cat-form{display:grid;gap:8px;margin-bottom:12px}.cat-form input,.editor input,.editor select,.editor textarea,.auth input,.settings-panel input,.settings-panel textarea{width:100%;padding:10px 12px;border:1px solid #dfe1e5;border-radius:8px;outline:0;background:#fff}.cat-form button{width:max-content}.editor .panel{padding:28px}.editor label,.settings-panel label{display:block;font-weight:650;font-size:13px;margin-bottom:18px}.editor label input,.editor label select,.editor label textarea,.settings-panel label input,.settings-panel label textarea{margin-top:7px}.settings-panel small{display:block;color:var(--muted);font-weight:400;margin-top:5px}.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}.check{display:flex!important;align-items:center;gap:8px}.check input{width:auto}.editor-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}.alert{padding:12px 14px;background:#fff1f1;color:#a52c2c;border:1px solid #ffd1d1;border-radius:8px;margin-bottom:18px}.success{padding:12px 14px;background:#edf8ee;color:var(--success);border:1px solid #c9e8ce;border-radius:8px;margin-bottom:18px}.auth{min-height:100vh;display:grid;place-items:center;background:var(--panel);padding:20px}.auth-card{width:100%;max-width:410px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:34px;box-shadow:var(--shadow)}.auth-logo{height:90px;width:100%;display:flex;align-items:center;justify-content:center;margin-bottom:12px}.auth-logo img{max-width:300px;max-height:90px;width:auto;height:auto;object-fit:contain}.auth h1{margin:18px 0 5px}.auth label{display:block;font-size:13px;font-weight:650;margin:18px 0}.auth input{margin-top:7px}.wide{width:100%;margin-top:8px}.back{color:var(--muted);font-size:13px;display:inline-block;margin-top:18px}.muted{color:var(--muted)}.center{text-align:center;padding:120px 20px}.result{display:block;border-bottom:1px solid var(--line);padding:18px 0}.result strong{font-size:17px}.result span{color:var(--muted);font-size:12px;margin-left:10px}.result p{color:var(--muted);margin:6px 0;font-size:14px}.brand-preview{display:flex;align-items:center;gap:16px;margin:20px 0 12px}.preview-box{width:280px;height:82px;border:1px solid var(--line);border-radius:10px;background:#17181b;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:8px}.preview-box img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}.favicon-preview{width:82px;height:82px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;overflow:hidden}.favicon-preview img{width:64px;height:64px;object-fit:contain}.og-preview{width:280px;height:148px;border:1px solid var(--line);border-radius:10px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#f1f1f1}.og-preview img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}.brand-preview strong{display:block}.brand-preview small{display:block;color:var(--muted);margin-top:4px}.upload-form{border:1px dashed var(--line);border-radius:10px;padding:14px;margin-bottom:26px}.upload-form label{margin-bottom:10px}.seo-info li{margin:8px 0;color:var(--muted)}code{background:var(--panel);padding:2px 5px;border-radius:4px}@media(max-width:1050px){.layout{grid-template-columns:220px minmax(0,1fr)}.toc{display:none}.admin-grid{grid-template-columns:1fr}}@media(max-width:700px){.topbar{padding:0 14px;gap:12px}.brand-logo-wrap{width:130px;height:38px}.brand-logo{max-width:130px;max-height:38px}.topbar nav{display:none}.search kbd{display:none}.layout{display:block;padding:24px 18px}.sidebar{position:static;height:auto;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:28px}.sidebar section{margin-bottom:10px}.content article h1{font-size:34px}.admin{padding:28px 18px}.admin-head{align-items:flex-start;flex-direction:column}.two{grid-template-columns:1fr}.row{align-items:flex-start}.actions{flex-direction:column;align-items:flex-end}.pager a{min-width:0}.cat-form{grid-template-columns:1fr}.editor .panel{padding:18px}.brand-preview{align-items:flex-start;flex-direction:column}.preview-box,.og-preview{width:100%}}

html[data-theme="dark"]{--bg:#0d1015;--panel:#151a21;--text:#f4f6f8;--muted:#9ca6b2;--line:#2a313b;--accent:#8b92ff;--shadow:0 10px 35px rgba(0,0,0,.25)}
html[data-theme="dark"] body{background:var(--bg);color:var(--text)}
html[data-theme="dark"] .topbar{background:rgba(13,16,21,.95);border-color:var(--line)}
html[data-theme="dark"] .panel,html[data-theme="dark"] .auth-card{background:var(--panel);border-color:var(--line)}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{background:#10141a;color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .side-link:hover,html[data-theme="dark"] .button{background:#1b2129;color:var(--text)}
.theme-toggle{border:1px solid var(--line)!important;background:var(--panel)!important;color:var(--text)!important;border-radius:8px;padding:7px 10px!important;cursor:pointer}
.footer{border-top:1px solid var(--line);margin-top:50px;padding:30px 32px;background:var(--bg);color:var(--muted)}
.footer-inner{max-width:1280px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.footer-brand{display:flex;align-items:center;gap:10px;color:var(--text);font-weight:700}.footer-logo{max-width:120px;max-height:32px;width:auto;height:auto;object-fit:contain}.footer-socials{display:flex;gap:8px;flex-wrap:wrap}.footer-socials a{border:1px solid var(--line);padding:7px 10px;border-radius:7px;color:var(--text)}

/* Dark mode search */
html[data-theme="dark"] .search input,
html[data-theme="dark"] .search input:focus {
  background: #17191f !important;
  color: #f5f7fa !important;
  border-color: #30343d !important;
  caret-color: #ffffff !important;
}

html[data-theme="dark"] .search input::placeholder {
  color: #8b919d !important;
  opacity: 1 !important;
}

html[data-theme="dark"] .search kbd {
  background: #22252d !important;
  color: #c8ccd4 !important;
  border-color: #3a3f49 !important;
}

/* Search suggestion/dropdown elements */
html[data-theme="dark"] .search-results,
html[data-theme="dark"] .search-dropdown,
html[data-theme="dark"] .search-suggestions {
  background: #17191f !important;
  color: #f5f7fa !important;
  border-color: #30343d !important;
}

html[data-theme="dark"] .search-results *,
html[data-theme="dark"] .search-dropdown *,
html[data-theme="dark"] .search-suggestions * {
  color: #f5f7fa;
}

html[data-theme="dark"] .search-results a:hover,
html[data-theme="dark"] .search-dropdown a:hover,
html[data-theme="dark"] .search-suggestions a:hover {
  background: #242832 !important;
}

/* Light mode */
html[data-theme="light"] .search input {
  background: #ffffff !important;
  color: #17191f !important;
}

html[data-theme="light"] .search input::placeholder {
  color: #737985 !important;
}


/* Search input - force readable text in both themes */
.search input,
.search input:focus,
.search input:active {
  color: #17191f !important;
  -webkit-text-fill-color: #17191f !important;
  caret-color: #17191f !important;
}

.search input::placeholder {
  color: #737985 !important;
  -webkit-text-fill-color: #737985 !important;
}

html[data-theme="dark"] .search input,
html[data-theme="dark"] .search input:focus,
html[data-theme="dark"] .search input:active {
  background: #17191f !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
}

html[data-theme="dark"] .search input::placeholder {
  color: #8b919d !important;
  -webkit-text-fill-color: #8b919d !important;
}


/* =========================================================
   SEARCH AUTOCOMPLETE
   ========================================================= */

.search {
  position: relative;
}

.search-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 9999;
  overflow: hidden;
  border: 1px solid #d9dde5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14);
}

.search-autocomplete[hidden] {
  display: none;
}

.search-suggestion {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 14px;
  color: #17191f;
  text-decoration: none;
  border-bottom: 1px solid #eceef2;
}

.search-suggestion:last-child {
  border-bottom: 0;
}

.search-suggestion strong {
  color: #17191f;
  font-size: 14px;
  font-weight: 600;
}

.search-suggestion span {
  color: #737985;
  font-size: 12px;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: #f1f3f6;
}

html[data-theme="dark"] .search-autocomplete {
  background: #17191f;
  border-color: #30343d;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .search-suggestion {
  color: #f5f7fa;
  border-bottom-color: #30343d;
}

html[data-theme="dark"] .search-suggestion strong {
  color: #f5f7fa;
}

html[data-theme="dark"] .search-suggestion span {
  color: #9ba1ad;
}

html[data-theme="dark"] .search-suggestion:hover,
html[data-theme="dark"] .search-suggestion.active {
  background: #242832;
}


/* Fix Opera GX / browser autofill text */
.search input:-webkit-autofill,
.search input:-webkit-autofill:hover,
.search input:-webkit-autofill:focus,
.search input:-webkit-autofill:active {
  -webkit-text-fill-color: #17191f !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  caret-color: #17191f !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Dark mode autofill */
html[data-theme="dark"] .search input:-webkit-autofill,
html[data-theme="dark"] .search input:-webkit-autofill:hover,
html[data-theme="dark"] .search input:-webkit-autofill:focus,
html[data-theme="dark"] .search input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 0 0 1000px #17191f inset !important;
  caret-color: #ffffff !important;
}


/* =========================================================
   MINECRAFT SERVER STATUS
   ========================================================= */

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #d9dde5;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, border-color .15s ease;
}

.server-status:hover {
  background: rgba(127, 127, 127, .08);
}

.server-status-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.server-status-text strong {
  font-size: 12px;
  font-weight: 700;
}

.server-status-text small {
  margin-top: 2px;
  font-size: 10px;
  opacity: .65;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #888;
}

.status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 7px rgba(34, 197, 94, .55);
}

.status-dot.offline {
  background: #ef4444;
}

.server-status.copied {
  border-color: #22c55e;
}

/* Dark mode */
html[data-theme="dark"] .server-status {
  border-color: #30343d;
  color: #f5f7fa;
}

html[data-theme="dark"] .server-status:hover {
  background: #242832;
}

/* Mobile */
@media (max-width: 700px) {
  .server-status-text {
    display: none;
  }

  .server-status {
    padding: 8px;
  }
}


/* Fix logout button visibility in dark mode */
html[data-theme="dark"] .topbar nav form.inline button {
  color: #f5f7fa !important;
  background: transparent !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .topbar nav form.inline button:hover {
  color: #ffffff !important;
  background: #242832 !important;
  border-color: #30343d !important;
}

/* Make sure the logout button is readable in light mode too */
html[data-theme="light"] .topbar nav form.inline button {
  color: #17191f !important;
}

/* =========================================================
   RULES PAGE
   ========================================================= */

.rules-page {
  width: min(900px, calc(100% - 40px));
  margin: 70px auto 100px;
}

.rules-header {
  margin-bottom: 45px;
}

.rules-header h1 {
  margin: 8px 0 12px;
  font-size: 46px;
  line-height: 1.1;
}

.rules-header p {
  font-size: 17px;
}

.rules-content {
  max-width: 850px;
}

.rules-content h1 {
  font-size: 34px;
  margin-top: 42px;
}

.rules-content h2 {
  font-size: 27px;
  margin-top: 40px;
}

.rules-content h3 {
  font-size: 21px;
  margin-top: 30px;
}

.rules-content ul,
.rules-content ol {
  padding-left: 28px;
}

.rules-content li {
  margin: 8px 0;
}

.rules-content a {
  color: #8d96ff;
}

.header-rules {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

html[data-theme="dark"] .header-rules {
  color: #f5f7fa;
}

html[data-theme="light"] .header-rules {
  color: #17191f;
}

.header-rules:hover {
  color: #8d96ff !important;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.notice.success {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 8px;
}

