/* The Dudes — dugout theme. Dark slate + amber. */
:root {
  --bg: #14161c;
  --bg-soft: #1b1e27;
  --panel: #20242f;
  --panel-edge: #2e3444;
  --text: #eef0f4;
  --muted: #9aa3b5;
  --accent: #f2a93b;
  --accent-deep: #c77f1a;
  --good: #4ade80;
  --bad: #f87171;
  --info: #7cc4ff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(242, 169, 59, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.55;
}

body.modal-open { overflow: hidden; }

h1, h2 { margin: 0; line-height: 1.2; letter-spacing: 0.5px; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.35rem; }
h2.subheading { font-size: 1.05rem; color: var(--muted); }
p { margin: 0.4em 0; }
a { color: var(--accent); }

[hidden] { display: none !important; }

/* ---------- floating background icons ---------- */
.floating-icon-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.floating-icon { position: absolute; opacity: 0.05; filter: grayscale(0.4); }
.floating-icon.icon-a { top: 12%; left: 4%; width: 90px; }
.floating-icon.icon-b { bottom: 10%; right: 6%; width: 130px; }
.floating-icon.icon-c { top: 55%; left: 85%; width: 70px; }

/* ---------- gate ---------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.auth-layout { width: min(480px, 100%); }

/* ---------- generic panels ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.auth-panel { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.title-with-icon { display: flex; align-items: center; gap: 10px; }
.title-with-icon h1, .title-with-icon h2 { flex: 1; }
.auth-panel .title-with-icon { justify-content: center; }
.inline-server-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: var(--accent) url("server-icon-64.png") center/cover no-repeat;
  box-shadow: 0 0 0 2px rgba(242, 169, 59, 0.35);
}
.lead { color: var(--muted); }

/* ---------- forms ---------- */
.stack-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field > span { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .search-row input {
  background: #12141b;
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 13px;
  font-size: 1rem;
  width: 100%;
}
.field input:focus, .search-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.25);
}
.auth-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.form-feedback { min-height: 1.2em; font-size: 0.9rem; }
.error-text { color: var(--bad); }
.success-text { color: var(--good); }
.helper-text { color: var(--muted); font-size: 0.9rem; }
.auth-status-line { min-height: 1.2em; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn.primary { background: var(--accent); color: #1c1206; box-shadow: 0 4px 14px rgba(242, 169, 59, 0.35); }
.btn.primary:hover { background: #ffbe55; }
.btn.primary:active { transform: scale(0.97); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--panel-edge); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-compact { padding: 7px 12px; font-size: 0.85rem; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.button-row.center { justify-content: center; }

/* ---------- hero / topbar ---------- */
.site-shell { position: relative; z-index: 1; }
.hero-header {
  position: relative;
  border-bottom: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(242, 169, 59, 0.08), transparent 55%);
  overflow: hidden;
}
.header-overlay { position: absolute; inset: 0; pointer-events: none; }
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--panel-edge);
  background: rgba(20, 22, 28, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand-logo { border-radius: 10px; }
.topnav { display: flex; gap: 14px; margin-left: auto; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.topnav a:hover { color: var(--accent); }
.topbar-status { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status-dot.online { background: var(--good); box-shadow: 0 0 8px var(--good); }
.status-dot.offline { background: var(--bad); }
.header-content {
  position: relative;
  max-width: 1060px;
  margin: 0 auto;
  padding: 34px 22px 26px;
  text-align: center;
}
.hero-brand-wrap { position: relative; display: inline-block; margin-bottom: 10px; }
.logo { border-radius: 22px; box-shadow: var(--shadow); }
.hero-orbit {
  position: absolute; inset: -10px;
  border: 2px dashed rgba(242, 169, 59, 0.4);
  border-radius: 30px;
  animation: orbit 24s linear infinite;
}
@keyframes orbit { to { transform: rotate(360deg); } }

/* ---------- chips / info ---------- */
.server-chip-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.server-chip {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 150px;
}
.server-chip strong { display: block; font-size: 1rem; }
.info-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--panel-edge);
}
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--muted); }

/* ---------- status ---------- */
.status-panel { max-width: 640px; margin: 18px auto 0; text-align: left; }
.status-top { margin-bottom: 8px; }
.status-bar { height: 10px; border-radius: 6px; background: #12141b; overflow: hidden; border: 1px solid var(--panel-edge); }
.status-fill { height: 100%; width: 0; border-radius: 6px; background: var(--muted); transition: width 0.6s ease; }
.status-fill.online { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); width: 100% !important; }
.status-fill.live-pulse { animation: pulse 1.6s ease; }
@keyframes pulse { 0% { filter: brightness(1.6); } 100% { filter: brightness(1); } }
.status-pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.status-pill {
  background: #12141b;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- layout ---------- */
.container { max-width: 1060px; margin: 0 auto; padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.content-grid { display: grid; gap: 18px; }
.content-grid.two-up { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.section-heading.tight-top { margin-top: 18px; }
.clean-list { margin: 8px 0 0; padding-left: 20px; color: var(--text); }
.clean-list li { margin: 6px 0; }

/* ---------- tiles / notes ---------- */
.stats-tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.stats-tile-grid.wide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stats-tile { background: #12141b; border: 1px solid var(--panel-edge); border-radius: 12px; padding: 12px; }
.stats-tile strong { display: block; font-size: 1.05rem; margin-top: 4px; word-break: break-word; }
.notes-list { display: grid; gap: 10px; margin-top: 12px; }
.note-card {
  display: flex; justify-content: space-between; gap: 10px;
  background: #12141b; border: 1px solid var(--panel-edge);
  border-radius: 12px; padding: 10px 14px;
}

/* ---------- players / tracker ---------- */
.player-list { display: flex; flex-wrap: wrap; gap: 8px; }
.player-item, .tag-button {
  background: #12141b; color: var(--text);
  border: 1px solid var(--panel-edge); border-radius: 999px;
  padding: 7px 15px; font-size: 0.9rem; cursor: pointer;
}
.player-item:hover, .tag-button:hover { border-color: var(--accent); color: var(--accent); }
.tracker-list { display: flex; flex-direction: column; gap: 8px; }
.tracker-row { display: flex; align-items: center; gap: 10px; background: #12141b; border: 1px solid var(--panel-edge); border-radius: 10px; padding: 8px 12px; }
.tracker-badge { font-size: 0.72rem; font-weight: 800; letter-spacing: 1px; border-radius: 6px; padding: 3px 8px; background: var(--panel-edge); }
.tracker-badge.join { background: rgba(74, 222, 128, 0.18); color: var(--good); }
.tracker-badge.leave { background: rgba(248, 113, 113, 0.15); color: var(--bad); }
.directory-row, .leaderboard-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--panel-edge);
}
.directory-row:last-child, .leaderboard-row:last-child { border-bottom: none; }
.directory-you-badge {
  background: var(--accent); color: #1c1206;
  font-size: 0.7rem; font-weight: 800; border-radius: 6px; padding: 2px 7px; margin-left: 6px;
}
.player-admin-suffix { color: var(--accent); font-size: 0.8em; font-weight: 700; }
.search-row { display: flex; gap: 10px; margin: 12px 0; }

/* ---------- chat ---------- */
.live-chat-panel .live-chat-messages {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 320px; overflow-y: auto;
  background: #12141b; border: 1px solid var(--panel-edge);
  border-radius: 12px; padding: 12px; margin-bottom: 12px;
}
.live-chat-row { display: flex; gap: 8px; align-items: baseline; font-size: 0.92rem; }
.live-chat-badge { font-size: 0.68rem; font-weight: 800; border-radius: 6px; padding: 2px 7px; flex: none; }
.live-chat-badge.web { background: rgba(242, 169, 59, 0.2); color: var(--accent); }
.live-chat-badge.minecraft { background: rgba(124, 196, 255, 0.15); color: var(--info); }
.live-chat-user { color: var(--accent); }
.live-chat-text { color: var(--text); word-break: break-word; }
.live-chat-form .live-chat-field { margin-bottom: 10px; }

/* ---------- highlights ---------- */
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.highlight-card { background: #12141b; border: 1px solid var(--panel-edge); border-radius: 12px; padding: 14px; }
.highlight-card.featured { border-color: var(--accent); }
.highlight-card-image { width: 100%; border-radius: 8px; margin-bottom: 8px; }
.highlight-tag { background: var(--accent); color: #1c1206; font-size: 0.72rem; font-weight: 800; border-radius: 6px; padding: 2px 8px; }

/* ---------- map ---------- */
.map-frame { width: 100%; height: 480px; border: 1px solid var(--panel-edge); border-radius: 12px; background: #0d0f14; }

/* ---------- footer ---------- */
.site-footer { text-align: center; color: var(--muted); padding: 26px 12px 34px; font-size: 0.88rem; }

/* ---------- modals ---------- */
.age-gate-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.age-gate-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); }
.age-gate-modal__panel {
  position: relative; width: min(460px, 100%);
  background: var(--panel); border: 1px solid var(--panel-edge);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.age-gate-modal__panel h2 { margin-bottom: 8px; }
.age-gate-modal__text, .age-gate-modal__note { color: var(--muted); font-size: 0.93rem; }
.age-gate-modal__actions { margin-top: 16px; }

/* ---------- reveal animation ---------- */
.js-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js-reveal.is-visible { opacity: 1; transform: none; }

.interactive-pop { transition: transform 0.2s ease; }
.interactive-pop:hover { transform: scale(1.06) rotate(-2deg); }

@media (max-width: 640px) {
  .topnav { display: none; }
  .map-frame { height: 340px; }
  .section-heading { flex-direction: column; }
}
