/* DiscordFun: glass dashboard in the same space look as the landing page (style.css). */
:root {
  --void: #06041a; --violet: #7c3aed; --lilac: #c4b5fd; --cyan: #22d3ee; --ice: #e8f7ff;
  --glass: rgba(255, 255, 255, 0.07); --glass-edge: rgba(255, 255, 255, 0.22);
  --field: rgba(6, 4, 26, 0.55); --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* ---- login button (used on the landing page too) ---- */
.login-wrap { margin-top: 28px; }
.discord-btn {
  display: inline-block; padding: 14px 30px; border-radius: 16px; font-weight: 700; font-size: 1.05rem;
  color: #fff !important; text-decoration: none; background: linear-gradient(100deg, #5865f2, #7c3aed);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.discord-btn:hover, .discord-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(88, 101, 242, 0.6); }
.discord-btn.alt { margin-left: 12px; background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); box-shadow: none; }
.discord-btn.alt:hover, .discord-btn.alt:focus-visible { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
@media (max-width: 520px) { .discord-btn.alt { margin: 12px 0 0; } }
.login-note { font-size: 0.9rem !important; color: rgba(232, 247, 255, 0.6) !important; font-weight: 400 !important; }
.login-error { color: var(--bad) !important; }

/* ---- dashboard ---- */
body.app {
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse at 50% 120%, #1b0b4a 0%, var(--void) 60%) fixed;
  color: var(--ice); min-height: 100vh; margin: 0; overflow-x: hidden;
}
.app #stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.app .nebula {
  position: fixed; border-radius: 50%; filter: blur(90px); opacity: 0.5; z-index: 0;
  animation: drift 24s ease-in-out infinite alternate;
}
.app .nebula.a { width: 46vmax; height: 46vmax; background: var(--violet); top: -14vmax; left: -12vmax; }
.app .nebula.b { width: 38vmax; height: 38vmax; background: var(--cyan); bottom: -16vmax; right: -10vmax; opacity: 0.3; animation-duration: 30s; }
@keyframes drift { to { transform: translate(5vmax, 4vmax) scale(1.12); } }

.shell { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 24px 18px 70px; display: grid; gap: 16px; }
.glass {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 22px;
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 24px 80px rgba(8, 4, 40, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 24px; }
.brand h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0;
  background: linear-gradient(100deg, var(--lilac), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand p { margin: 4px 0 0; color: rgba(232, 247, 255, 0.75); font-size: 0.95rem; }
.who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.who form { margin: 0; }
.who-text { display: grid; gap: 3px; justify-items: start; }
.who-name { font-weight: 500; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-edge); background: var(--field); }

.badge { padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; border: 1px solid var(--glass-edge); background: rgba(255, 255, 255, 0.08); }
.role-root { color: #fde68a; border-color: rgba(253, 230, 138, 0.5); }
.role-bot { color: var(--cyan); border-color: rgba(34, 211, 238, 0.5); }
.role-pending { color: var(--warn); border-color: rgba(251, 191, 36, 0.5); }
.role-denied, .role-banned { color: var(--bad); border-color: rgba(248, 113, 113, 0.5); }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.tab {
  padding: 10px 18px; border-radius: 15px; color: rgba(232, 247, 255, 0.82); text-decoration: none; font-weight: 500;
  border: 1px solid transparent; transition: background 0.15s, color 0.15s;
}
.tab:hover, .tab:focus-visible { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tab.active {
  color: #fff; background: linear-gradient(135deg, rgba(124, 58, 237, 0.55), rgba(34, 211, 238, 0.3));
  border-color: var(--glass-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.content { display: grid; gap: 16px; }
.panel { padding: 22px 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel h2 { margin: 0; font-size: 1.3rem; color: var(--lilac); }
.panel h3 { margin: 0; font-size: 1.05rem; }
.muted { color: rgba(232, 247, 255, 0.62); font-size: 0.95rem; line-height: 1.5; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.welcome .prewrap { font-size: 1.08rem; }
.status-card { max-width: 620px; margin: 8vh auto 0; text-align: center; display: grid; gap: 14px; justify-items: center; }
.status-card p { line-height: 1.6; }
.reason-label { color: var(--lilac); font-weight: 700; margin-bottom: -6px; }
.reason { white-space: pre-wrap; background: var(--field); padding: 12px 16px; border-radius: 14px; border: 1px solid var(--glass-edge); }

/* ---- buttons and fields ---- */
.btn {
  font: inherit; font-weight: 500; cursor: pointer; color: var(--ice); padding: 10px 18px; border-radius: 13px;
  border: 1px solid var(--glass-edge); background: rgba(255, 255, 255, 0.09); transition: background 0.15s, transform 0.1s;
}
.btn:hover:not(:disabled), .btn:focus-visible { background: rgba(255, 255, 255, 0.18); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(120deg, var(--violet), #0ea5c6); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(120deg, #8b52f0, #22d3ee); }
.btn.danger { background: rgba(220, 38, 38, 0.35); border-color: rgba(248, 113, 113, 0.6); }
.btn.danger:hover:not(:disabled) { background: rgba(220, 38, 38, 0.55); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: 0.88rem; border-radius: 11px; }

input, select, textarea {
  font: inherit; color: var(--ice); background: var(--field); border: 1px solid var(--glass-edge);
  border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .tab:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: rgba(232, 247, 255, 0.4); }
select option { background: #120a36; color: var(--ice); }
textarea { resize: vertical; line-height: 1.5; }
textarea.code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88rem; }
label.field { display: grid; gap: 6px; font-size: 0.88rem; color: rgba(232, 247, 255, 0.75); }
label.check { display: inline-flex; align-items: center; gap: 8px; width: auto; white-space: nowrap; }
label.check input { width: auto; }
.add-form { display: grid; gap: 10px; margin: 6px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--glass-edge); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.toolbar input[type="search"] { flex: 1 1 220px; }

/* ---- news / faq items ---- */
.item { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); display: grid; gap: 6px; }
.item:last-child { border-bottom: 0; }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-actions { display: inline-flex; gap: 6px; }
.item-meta { color: rgba(232, 247, 255, 0.55); font-size: 0.85rem; }
.item-form { display: grid; gap: 10px; }
.item-form .row { display: flex; gap: 8px; }

/* ---- users ---- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 0.88rem; cursor: pointer; padding: 6px 14px; border-radius: 999px; color: var(--ice); background: transparent; border: 1px solid var(--glass-edge); }
.chip.on { background: linear-gradient(135deg, rgba(124, 58, 237, 0.55), rgba(34, 211, 238, 0.3)); border-color: rgba(255, 255, 255, 0.4); }
.user-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.user-row:last-child { border-bottom: 0; }
.user-name { font-weight: 500; }
.user-sub { font-size: 0.82rem; color: rgba(232, 247, 255, 0.55); overflow-wrap: anywhere; }
.user-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.ban-box { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.ban-box input { flex: 1 1 260px; }
.reason-note { grid-column: 2 / -1; font-size: 0.88rem; color: var(--bad); overflow-wrap: anywhere; }

/* ---- commands ---- */
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; }
.cmd { padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.cmd h2 { margin: 0; font-size: 1.15rem; color: var(--cyan); font-family: ui-monospace, Menlo, Consolas, monospace; }
.cmd.horde h2 { color: #fca5a5; }
.cmd.alliance h2 { color: #93c5fd; }
.cmd-form { display: grid; gap: 12px; }
.cmd .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmd .fields .wide { grid-column: 1 / -1; }
.result { font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.result.ok { color: var(--ok); }
.result.bad { color: var(--bad); }
.result a { color: var(--cyan); }
.notice { padding: 10px 14px; border-radius: 12px; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.4); color: #fde68a; font-size: 0.92rem; }
.file-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.json-state { font-size: 0.85rem; }
.json-state.ok { color: var(--ok); }
.json-state.bad { color: var(--bad); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- log lists ---- */
.log-list { display: grid; gap: 2px; font-size: 0.93rem; }
.logrow { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); align-items: start; }
.logrow time, .logrow .when { color: rgba(232, 247, 255, 0.55); font-size: 0.82rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.logrow .msg { overflow-wrap: anywhere; line-height: 1.45; }
.msg code { background: var(--field); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; }
.msg .chan { color: #a5b4fc; background: rgba(88, 101, 242, 0.25); padding: 0 6px; border-radius: 5px; }
.msg a { color: var(--cyan); }
.msg .stamp { background: rgba(255, 255, 255, 0.1); padding: 0 6px; border-radius: 5px; }
.tag { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(34, 211, 238, 0.18); color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.4); }
.arow { display: grid; grid-template-columns: 150px 110px 1fr; gap: 14px; padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); align-items: start; }
.arow .who2 { overflow-wrap: anywhere; }
.arow .sub { display: block; font-size: 0.8rem; color: rgba(232, 247, 255, 0.55); }
.ev-login { color: var(--ok); } .ev-logout { color: rgba(232, 247, 255, 0.7); }
.ev-role_change { color: var(--warn); } .ev-apply { color: var(--cyan); }

#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 10;
  padding: 12px 20px; border-radius: 14px; background: rgba(20, 12, 60, 0.92); border: 1px solid var(--glass-edge);
  transition: opacity 0.2s, transform 0.2s; max-width: min(92vw, 520px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { border-color: rgba(248, 113, 113, 0.7); }

@media (max-width: 720px) {
  .logrow, .arow { grid-template-columns: 1fr; gap: 2px; }
  .user-row { grid-template-columns: auto 1fr; }
  .user-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .cmd .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .app .nebula { animation: none; } .discord-btn, .btn { transition: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(20, 12, 60, 0.88); }
}

/* ---- legal pages and footer links ---- */
.legal { padding: 28px 30px; line-height: 1.6; }
.legal h1 { margin: 0 0 4px; }
.legal h2 { margin: 26px 0 6px; font-size: 1.15rem; color: #cbb8ff; }
.legal p, .legal li { color: rgba(232, 247, 255, 0.88); font-weight: 400; }
.legal ul { padding-left: 22px; }
.legal a, .site-links a { color: #9bd8ff; }
.legal-nav { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.site-links { margin-top: 26px; font-size: 0.85rem !important; text-align: center; color: rgba(232, 247, 255, 0.55) !important; }
@media (max-width: 520px) { .legal { padding: 20px 16px; } }

/* ================= LFG Larry additions ================= */
body.landing { display: grid; place-items: center; }
.hero { position: relative; z-index: 1; text-align: center; padding: 24px; max-width: 640px; }
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.4rem); margin: 0 0 8px; letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--lilac), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.15rem; color: rgba(232, 247, 255, 0.85); line-height: 1.5; }
.role-admin { color: var(--cyan); border-color: rgba(34, 211, 238, 0.5); }
.role-support { color: #c4b5fd; border-color: rgba(196, 181, 253, 0.5); }
.role-user { color: var(--ok); border-color: rgba(74, 222, 128, 0.5); }
.tab-end { margin-left: auto; align-self: center; }

.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.server-card {
  display: grid; gap: 8px; justify-items: start; padding: 16px; border-radius: 18px; text-decoration: none; color: var(--ice);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-edge); transition: background 0.15s, transform 0.15s;
}
.server-card:hover, .server-card:focus-visible { background: rgba(255, 255, 255, 0.13); transform: translateY(-2px); }
.server-icon { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.server-icon.blank { display: inline-grid; place-items: center; font-weight: 700; font-size: 1.3rem; background: rgba(124, 58, 237, 0.4); }
.server-icon.blank.small { width: 36px; height: 36px; border-radius: 50%; font-size: 1rem; }
.server-name { font-weight: 700; overflow-wrap: anywhere; }
.server-sub { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.event-card { padding: 16px 18px; border-radius: 18px; border: 1px solid var(--glass-edge); background: rgba(255, 255, 255, 0.06); display: grid; gap: 8px; align-content: start; }
.event-card.horde { border-left: 4px solid #f87171; }
.event-card.alliance { border-left: 4px solid #60a5fa; }
.event-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; flex-wrap: wrap; }
.event-title { font-weight: 700; font-size: 1.1rem; color: var(--ice); text-decoration: none; }
.event-title:hover { text-decoration: underline; }
.event-when { margin: 0; font-weight: 500; }
.event-id { margin: 0; font-size: 0.78rem !important; }
.slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slot { font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: var(--field); border: 1px solid var(--glass-edge); }
.event-detail.horde { border-left: 5px solid #f87171; }
.event-detail.alliance { border-left: 5px solid #60a5fa; }
.roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.role-col h3 { margin-bottom: 8px; color: var(--cyan); }
.person { margin: 4px 0; overflow-wrap: anywhere; }
.sub-h { margin: 18px 0 4px; }

.settings-form { display: grid; gap: 18px; }
.setting-row { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.setting-row:last-of-type { border-bottom: 0; }
.setting-row .help { margin: 0; font-size: 0.86rem; }
.create-form { display: grid; gap: 14px; max-width: 640px; }
.create-form .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.create-form .fields .wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .create-form .fields { grid-template-columns: 1fr; } }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 18px; }
.pager a { text-decoration: none; }
.hero .site-links, .landing .site-links { margin-top: 36px; }
#toast { white-space: pre-line; }
