:root {
  --bg: #120d12;
  --panel: rgba(20, 17, 24, 0.78);
  --panel-strong: rgba(32, 24, 35, 0.92);
  --text: #fff8df;
  --muted: #c8bfae;
  --gold: #ffbd34;
  --gold-2: #ffe07a;
  --orange: #e06125;
  --red: #7c261f;
  --stone: #7c7f86;
  --border: rgba(255, 206, 98, 0.28);
  --shadow: rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 12%, rgba(255, 223, 126, 0.72), transparent 18rem),
    radial-gradient(circle at 14% 80%, rgba(224, 97, 37, 0.55), transparent 24rem),
    radial-gradient(circle at 82% 80%, rgba(255, 189, 52, 0.32), transparent 20rem),
    linear-gradient(135deg, #0e0c0c 0%, #21151a 44%, #09080a 100%);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent 95%, rgba(255,255,255,0.045) 100%);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
  opacity: 0.35;
  z-index: -1;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.4) 1px, transparent 1.2px),
    radial-gradient(circle, rgba(255,189,52,0.28) 1px, transparent 1.2px);
  background-size: 88px 88px, 132px 132px;
  background-position: 0 0, 30px 60px;
  opacity: 0.28;
  z-index: -1;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand img {
  width: 180px;
  max-width: 42vw;
  filter: drop-shadow(0 18px 16px var(--shadow));
}

nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
nav a {
  color: var(--gold-2);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
}
nav a:hover, nav a:focus { border-color: var(--border); background: rgba(255, 189, 52, 0.08); }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto 56px; }
.panel {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), rgba(11, 10, 13, 0.78));
  box-shadow: 0 22px 60px var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border-radius: 26px;
}

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: end;
  padding: clamp(28px, 5vw, 66px);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  pointer-events: none;
}
.hero-copy, .hero-card { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-2);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
}
h1 {
  margin: 0;
  font-size: clamp(3.5rem, 11vw, 9rem);
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow: 0 7px 0 #611b19, 0 16px 30px rgba(0,0,0,0.55);
  background: linear-gradient(180deg, #fff2a2 0%, var(--gold) 35%, #cf571e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2px #5b1a17;
}
.tagline {
  max-width: 680px;
  margin: 28px 0 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  font-size: clamp(1rem, 2vw, 1.26rem);
  line-height: 1.6;
  color: #fff3d2;
}
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button, button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  border: 2px solid #5b1a17;
  box-shadow: 0 7px 0 #5b1a17, 0 14px 22px rgba(0,0,0,0.32);
  text-transform: uppercase;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease, filter 130ms ease;
}
.button:hover, button:hover { transform: translateY(-2px); filter: brightness(1.06); }
.button:active, button:active { transform: translateY(4px); box-shadow: 0 3px 0 #5b1a17, 0 8px 18px rgba(0,0,0,0.28); }
.primary { background: linear-gradient(180deg, #ffe88d, var(--gold) 46%, #e06125); color: #2a110d; }
.ghost { background: rgba(255,255,255,0.05); color: var(--gold-2); }
.hero-card {
  padding: 28px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(255,255,255,0.12);
}
.card-label { display: block; color: var(--gold-2); text-transform: uppercase; letter-spacing: 0.12em; }
.hero-card strong {
  display: block;
  margin: 12px 0 5px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

#minecraftHost {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.muted { color: var(--muted); font-family: system-ui, sans-serif; letter-spacing: 0; }
.hero-card button { width: 100%; margin-top: 22px; background: linear-gradient(180deg, #474b55, #2c2f37); color: #f2f2f2; border-color: #111; box-shadow: 0 7px 0 #111, 0 14px 22px rgba(0,0,0,0.3); }
#copyNotice { min-height: 22px; margin: 12px 0 0; color: var(--gold-2); font-family: system-ui, sans-serif; letter-spacing: 0; }

.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.join-card, .discord-widget-card, .videos-section, .rules-section { padding: clamp(24px, 4vw, 38px); }
h2 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.3rem); text-transform: uppercase; text-shadow: 0 4px 0 #321010; }
h3 { margin: 10px 0 8px; font-size: 1.5rem; text-transform: uppercase; }
p { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: 0; line-height: 1.65; }
.discord-widget-wrap { min-height: 315px; display: grid; }
#discordWidget { width: 100%; min-height: 315px; border: 0; border-radius: 16px; display: none; }
#discordWidget[src] { display: block; }
#discordWidget[src] + #discordWidgetFallback { display: none; }

.videos-section, .rules-section { margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; flex-wrap: wrap; }
.section-heading p:last-child { max-width: 560px; color: var(--muted); margin: 0; }
.video-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.video-card, .loading-card, .empty-card {
  background: rgba(9, 9, 12, 0.72);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  overflow: hidden;
  min-height: 220px;
}
.video-card a { color: inherit; text-decoration: none; display: block; height: 100%; }
.video-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #121212; }
.video-body { padding: 16px; }
.video-title { margin: 0 0 12px; font-family: system-ui, sans-serif; letter-spacing: 0; font-size: 1rem; line-height: 1.35; }
.video-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-family: system-ui, sans-serif; font-size: 0.86rem; }
.loading-card, .empty-card { display: grid; place-items: center; padding: 24px; color: var(--muted); font-family: system-ui, sans-serif; grid-column: 1 / -1; }
.video-errors { color: #ffd59c; font-size: 0.9rem; }

.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.rules-grid > div { border: 1px solid rgba(255,255,255,0.1); border-radius: 18px; padding: 22px; background: rgba(255,255,255,0.04); }
.rule-number { color: var(--gold-2); font-size: 2rem; }
footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto 36px; color: var(--muted); text-align: center; }
footer p { font-size: 0.9rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .grid-two, .video-grid, .rules-grid { grid-template-columns: 1fr; }
  .site-header { align-items: flex-start; }
}

@media (max-width: 560px) {
  .site-header { flex-direction: column; }
  nav { justify-content: flex-start; }
  .hero { padding: 26px 20px; }
  h1 { -webkit-text-stroke-width: 1px; }
  .button, button { width: 100%; }
}
