/* Zyphic — dark theme with the blue gradient from the in-game logo (#5ee7ff → #3446f0) and a purple accent. */
:root {
  --bg: #080b17;
  --bg-2: #0c1124;
  --panel: #111733;
  --panel-2: #161d3f;
  --ring: #232c57;
  --text: #e8ecff;
  --muted: #8d97c2;
  --cyan: #5ee7ff;
  --blue: #3446f0;
  --purple: #8b5cf6;
  --gradient: linear-gradient(135deg, #5ee7ff 0%, #3446f0 55%, #8b5cf6 100%);
  --radius: 14px;
  --admin: #ff5c7a;
  --moderator: #ffb547;
  --helper: #4fe0a3;
  --shadow: 0 10px 40px rgba(5, 8, 25, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(52, 70, 240, 0.18), transparent 60%),
                    radial-gradient(900px 500px at -10% 10%, rgba(94, 231, 255, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 20px; }
.narrow { max-width: 520px; }
.truncate { display: block; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 11, 23, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ring);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; letter-spacing: .12em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient); color: #fff; font-size: 1.2rem; letter-spacing: 0;
  box-shadow: 0 0 24px rgba(94, 231, 255, 0.35);
}
.logo-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.25rem; }
.logo-sm .logo-mark { width: 28px; height: 28px; font-size: 1rem; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--cyan); }
.account { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.account form { margin: 0; }
.me { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; margin-right: 6px; }
.me img { border-radius: 6px; }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
  font: inherit; font-weight: 700; cursor: pointer; color: var(--text); background: var(--panel-2);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 24px rgba(52, 70, 240, 0.35); }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(94, 231, 255, 0.35); }
.btn-ghost { background: transparent; border-color: var(--ring); color: var(--text); }
.btn-ghost:hover { background: var(--panel); }
.btn-danger { background: rgba(255, 92, 122, 0.12); border-color: rgba(255, 92, 122, 0.4); color: #ff8fa3; }
.btn-discord { background: #5865f2; color: #fff; margin-top: 18px; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.link { font-weight: 600; }

/* ---------------------------------------------------------------- cards */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--ring); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.empty { color: var(--muted); text-align: center; }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; vertical-align: middle;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--ring);
}
.badge-admin { color: var(--admin); border-color: rgba(255, 92, 122, .45); background: rgba(255, 92, 122, .1); }
.badge-moderator { color: var(--moderator); border-color: rgba(255, 181, 71, .45); background: rgba(255, 181, 71, .1); }
.badge-helper { color: var(--helper); border-color: rgba(79, 224, 163, .45); background: rgba(79, 224, 163, .1); }
.badge-gold { color: #ffd36b; border-color: rgba(255, 211, 107, .5); background: rgba(255, 211, 107, .1); }
.badge-pin { color: var(--cyan); border-color: rgba(94, 231, 255, .45); }
.badge-lock { color: var(--muted); }
.badge-private, .badge-banned { color: #ff8fa3; border-color: rgba(255, 92, 122, .4); }
.role-admin { color: var(--admin); font-weight: 700; }
.role-moderator { color: var(--moderator); font-weight: 700; }
.role-helper { color: var(--helper); font-weight: 700; }

.flash { border-radius: 12px; padding: 12px 16px; margin: 18px 0; border: 1px solid var(--ring); background: var(--panel); }
.flash-success { border-color: rgba(79, 224, 163, .5); color: #9ff2cc; }
.flash-error { border-color: rgba(255, 92, 122, .5); color: #ffadbd; }
.flash-info { border-color: rgba(94, 231, 255, .4); color: #b8f3ff; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 90px 0 70px; border-bottom: 1px solid var(--ring); }
.hero-glow {
  position: absolute; inset: -40% -10% auto; height: 520px;
  background: radial-gradient(closest-side, rgba(52, 70, 240, .45), transparent),
              radial-gradient(closest-side at 70% 60%, rgba(139, 92, 246, .35), transparent);
  filter: blur(40px); pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ring); background: rgba(17, 23, 51, .7); color: var(--muted); font-size: .85rem; font-weight: 600; }
.hero-title {
  font-size: clamp(3.5rem, 11vw, 7.5rem); font-weight: 900; letter-spacing: .14em; margin: 18px 0 6px;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 40px rgba(94, 231, 255, .25));
}
.hero-sub { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.ip-big {
  display: grid; text-align: left; gap: 2px; cursor: pointer; font: inherit; color: var(--text);
  padding: 14px 26px; border-radius: 16px; border: 1px solid rgba(94, 231, 255, .35);
  background: rgba(17, 23, 51, .85); box-shadow: 0 0 0 4px rgba(94, 231, 255, .06), var(--shadow);
}
.ip-big:hover { border-color: var(--cyan); }
.ip-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ip-value { font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; }
.ip-copy { font-size: .8rem; color: var(--cyan); }
.ip-big.copied .ip-copy::after { content: " ✓"; }
.status-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-radius: 16px;
  border: 1px solid var(--ring); background: rgba(17, 23, 51, .85); text-align: left; box-shadow: var(--shadow);
}
.status-card strong { display: block; font-size: 1.5rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot-live { background: #4fe0a3; box-shadow: 0 0 0 0 rgba(79, 224, 163, .6); animation: pulse 2s infinite; }
.dot-off { background: #ff5c7a; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(79, 224, 163, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 224, 163, 0); } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head { margin-bottom: 24px; }
.page-head.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 28px; }

.mode-card { color: var(--text); position: relative; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.mode-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--gradient); opacity: .7; }
.mode-card:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(94, 231, 255, .5); }
.mode-icon { font-size: 2rem; margin-bottom: 8px; }
.mode-card p { margin: 0; }

.news-card { margin-bottom: 16px; }
.news-card h3 { color: var(--text); font-size: 1.25rem; }
.meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.meta img { border-radius: 4px; }

.list-card { padding: 8px; }
.activity { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.activity:hover { background: var(--panel-2); text-decoration: none; }
.activity img { border-radius: 8px; }
.activity strong { display: block; font-weight: 600; }
.activity .small { display: block; }
.stats-card { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 18px; padding: 16px; }
.stats-card.stats-4 { grid-template-columns: repeat(4, 1fr); margin: 0 0 20px; }
.stats-card strong { display: block; font-size: 1.4rem; }

/* ---------------------------------------------------------------- forum */
.category { margin-bottom: 30px; }
.category-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 10px 4px; }
.forum-list, .thread-list { padding: 0; overflow: hidden; }
.forum-row, .thread-row {
  display: grid; grid-template-columns: 52px 1fr 90px 90px 240px; align-items: center; gap: 14px;
  padding: 16px 20px; border-top: 1px solid var(--ring);
}
.thread-row { grid-template-columns: 44px 1fr 90px 90px 150px; }
.forum-row:first-child, .thread-row:first-child { border-top: 0; }
.forum-row:hover, .thread-row:hover { background: rgba(22, 29, 63, .6); }
.forum-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--ring); font-size: 1.4rem; }
.forum-name { font-weight: 700; color: var(--text); font-size: 1.05rem; }
.forum-main p { margin: 2px 0 0; }
.forum-count { text-align: center; }
.forum-count strong { display: block; }
.forum-count .small { display: block; }
.forum-last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.forum-last img { border-radius: 8px; }
.forum-last .small { display: block; }
.thread-row .forum-last { display: grid; gap: 0; }
.thread-title { font-weight: 700; color: var(--text); }
.thread-main .small { display: block; }
.avatar { border-radius: 8px; }
.breadcrumb { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }

.post { display: grid; grid-template-columns: 170px 1fr; padding: 0; margin-bottom: 16px; overflow: hidden; }
.post-author {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 20px 12px; background: rgba(8, 11, 23, .45); border-right: 1px solid var(--ring);
}
.post-skin { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.post-name { font-weight: 800; color: var(--text); }
.post-body { padding: 18px 22px; min-width: 0; }
.post-meta { margin-bottom: 8px; }
.post-meta a { color: var(--muted); }
.post-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ring); }
.post-actions form { margin: 0; }
.content { overflow-wrap: anywhere; }
.content img { border-radius: 10px; max-height: 520px; }
.content blockquote { margin: 10px 0; padding: 8px 16px; border-left: 3px solid var(--blue); background: rgba(52, 70, 240, .08); border-radius: 0 10px 10px 0; }
.content pre { background: #060914; border: 1px solid var(--ring); padding: 14px; border-radius: 10px; overflow-x: auto; }
.content code { background: #060914; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.content pre code { padding: 0; }
.content table { border-collapse: collapse; }
.content th, .content td { border: 1px solid var(--ring); padding: 6px 10px; }

.mod-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 16px; flex-wrap: wrap; }
.mod-bar form { margin: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 22px 0; }
.pagination a, .pagination span { min-width: 38px; padding: 8px 12px; text-align: center; border-radius: 10px; border: 1px solid var(--ring); color: var(--text); background: var(--panel); }
.pagination a.current { background: var(--gradient); border-color: transparent; color: #fff; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 14px; }
.form h1 { margin-bottom: 0; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input, textarea, select {
  font: inherit; color: var(--text); background: #0a0e20; border: 1px solid var(--ring);
  border-radius: 10px; padding: 11px 13px; width: 100%;
}
input[type=checkbox] { width: auto; accent-color: var(--blue); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(94, 231, 255, .15); }
textarea { resize: vertical; min-height: 120px; }
.editor { display: grid; gap: 0; }
.editor textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.editor-tools { display: flex; gap: 4px; align-items: center; padding: 6px; background: var(--panel-2); border: 1px solid var(--ring); border-bottom: 0; border-radius: 10px 10px 0 0; }
.editor-tools button { background: transparent; color: var(--text); border: 0; border-radius: 6px; padding: 4px 10px; cursor: pointer; font: inherit; }
.editor-tools button:hover { background: var(--panel); }
.editor-hint { margin-left: auto; color: var(--muted); font-size: .78rem; padding-right: 6px; }
.row-actions { display: flex; gap: 10px; }
.search { display: flex; gap: 10px; margin-bottom: 16px; max-width: 420px; }

/* ---------------------------------------------------------------- team, profile, admin */
.group-title { margin-top: 28px; }
.team-card { display: grid; justify-items: center; gap: 8px; color: var(--text); text-align: center; transition: transform .15s; }
.team-card:hover { transform: translateY(-3px); text-decoration: none; }
.team-card img { filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); }
.profile-head { display: flex; gap: 28px; align-items: center; margin-bottom: 28px; }
.profile-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 12px; }
.profile-stats strong { display: block; }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; border-top: 1px solid var(--ring); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; border-top: 0; }
.table .inline-form input { width: 140px; padding: 6px 10px; }
.table .inline-form select { width: 130px; padding: 6px 10px; }
.user-cell { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 600; }
.user-cell img { border-radius: 5px; }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--ring); background: rgba(8, 11, 23, .8); margin-top: 40px; }
.footer-inner { display: flex; align-items: center; gap: 30px; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.footer p { margin: 8px 0 0; font-size: .85rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }
.ip-pill { display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; cursor: pointer; color: var(--text); background: var(--panel); border: 1px solid var(--ring); border-radius: 999px; padding: 10px 18px; }
.ip-hint { color: var(--muted); font-weight: 500; font-size: .8rem; }
.ip-pill.copied .ip-hint::after { content: " ✓"; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .forum-row { grid-template-columns: 46px 1fr 70px; }
  .thread-row { grid-template-columns: 40px 1fr 70px; }
  .forum-row .forum-count:nth-of-type(2), .forum-last, .thread-row .forum-count:nth-of-type(2) { display: none; }
}
@media (max-width: 760px) {
  .menu-toggle { display: block; margin-left: auto; }
  .nav, .account { display: none; }
  .topbar.open .topbar-inner { flex-wrap: wrap; height: auto; padding-bottom: 14px; }
  .topbar.open .nav, .topbar.open .account { display: flex; width: 100%; flex-wrap: wrap; margin: 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; justify-content: flex-start; border-right: 0; border-bottom: 1px solid var(--ring); padding: 12px 16px; }
  .post-skin { height: 48px; }
  .profile-head { flex-direction: column; text-align: center; }
  .stats-card.stats-4 { grid-template-columns: repeat(2, 1fr); }
  .page-head.row { flex-direction: column; }
}

/* ---------------------------------------------------------------- Minecraft link */
.linked { color: #4fe0a3; font-weight: 800; font-size: .85em; }
.linked-line { margin: 4px 0; }
.link-card { margin-bottom: 20px; }
.linked-box { display: flex; gap: 14px; align-items: center; }
.linked-box img { border-radius: 10px; }
.linked-box div { display: grid; gap: 4px; }
.link-code {
  font: inherit; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.6rem; font-weight: 800;
  letter-spacing: .08em; padding: 14px 20px; border-radius: 12px; cursor: pointer; color: var(--text);
  background: #060914; border: 1px dashed rgba(94, 231, 255, .55);
}
.link-code.copied::after { content: "  \2714 copied"; font-size: .9rem; color: var(--cyan); }
