/* ==========================================
   DSIX30 — Global Stylesheet
   Dark gaming aesthetic, sleek & professional
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-base:       #0a0b0e;
  --bg-surface:    #111318;
  --bg-elevated:   #181c24;
  --bg-card:       #1e2330;

  --accent:        #5b9cf6;
  --accent-dim:    rgba(91, 156, 246, 0.15);
  --accent-glow:   rgba(91, 156, 246, 0.08);

  --green:         #3ecf8e;
  --green-dim:     rgba(62, 207, 142, 0.15);

  --amber:         #f5a623;
  --amber-dim:     rgba(245, 166, 35, 0.15);

  --red:           #f06060;
  --red-dim:       rgba(240, 96, 96, 0.15);

  --text-primary:  #e8ecf4;
  --text-secondary:#8a95aa;
  --text-muted:    #4e5669;

  --border:        rgba(255, 255, 255, 0.07);
  --border-hover:  rgba(255, 255, 255, 0.14);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Inter', sans-serif;

  --nav-height:    64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 11, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-logo img {
  height: 28px;
  width: auto;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex: 1;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover {
  background: #7aafff;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8125rem;
}

/* ── Hero ── */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(91,156,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-glow);
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 .accent { color: var(--accent); }

.hero p.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Sections ── */
.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-icon.blue  { background: var(--accent-dim);  color: var(--accent); }
.card-icon.green { background: var(--green-dim);   color: var(--green); }
.card-icon.amber { background: var(--amber-dim);   color: var(--amber); }
.card-icon.red   { background: var(--red-dim);     color: var(--red); }

.card h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.15s;
}
.card-link:hover { gap: 0.6rem; }

/* ── Stat chips ── */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  flex: 1;
  min-width: 130px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.accent  { color: var(--accent); }
.stat-value.green   { color: var(--green); }
.stat-value.amber   { color: var(--amber); }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.data-table thead tr {
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

table.data-table td {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}

table.data-table tbody tr:last-child td { border-bottom: none; }

table.data-table tbody tr:hover td {
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
}

table.data-table td.bold { color: var(--text-primary); font-weight: 600; }
table.data-table td.win  { color: var(--green); }
table.data-table td.loss { color: var(--red); }
table.data-table td.draw { color: var(--amber); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

.badge-win   { background: var(--green-dim);  color: var(--green); }
.badge-loss  { background: var(--red-dim);    color: var(--red); }
.badge-draw  { background: var(--amber-dim);  color: var(--amber); }
.badge-info  { background: var(--accent-dim); color: var(--accent); }

/* ── Page header (sub-pages) ── */
.page-header {
  padding: 3.5rem 2rem 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 2rem;
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse at top left, rgba(91,156,246,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
}

/* ── Player search bar ── */
.search-bar {
  display: flex;
  gap: 0.75rem;
  max-width: 560px;
  margin-top: 1.5rem;
}

.search-bar input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}

.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus { border-color: var(--accent); }

/* ── Divider ── */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Footer ── */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

footer.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
footer.site-footer a:hover { color: var(--text-primary); }

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.2s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Mobile dropdown menu ── */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(10, 11, 14, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem 1rem;
  position: sticky;
  top: var(--nav-height);
  z-index: 99;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu a.active {
  color: var(--accent);
}

/* ── Responsive nav ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 4rem 1.25rem 3rem; }
  .section { padding: 3rem 1.25rem; }
  .page-header { padding: 2.5rem 1.25rem 1.5rem; }
  .search-bar { flex-direction: column; }
}

/* ── Utility ── */
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-amber   { color: var(--amber); }
.text-muted   { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Info grid (Minecraft / sub-pages) ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.info-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.info-tile:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.info-tile-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.info-tile-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.info-tile-text span {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ── Stream cards ── */
.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.stream-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.stream-card:hover { border-color: #9147ff; }

.stream-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}

.stream-live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e91916;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.stream-body {
  padding: 1rem 1.25rem;
}

.stream-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stream-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto;
}

/* ── Select input ── */
select.ds-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
}

select.ds-select:focus { border-color: var(--accent); color: var(--text-primary); }
