:root {
  --gold: #FFB000;
  --gold-bright: #FCE33D;
  --gold-deep: #e09a00;
  --gold-shadow: rgba(176, 120, 0, 0.28);
  --page-gradient: linear-gradient(180deg, #FCE33D 0%, #FFB000 55%, #f5a800 100%);
  --card-bg: #ffffff;
  --card-border: #f0d889;
  --card-radius: 14px;
  --card-shadow: 0 5px 8px -5px var(--gold-shadow), 0 8px 28px -8px rgba(176, 120, 0, 0.35);
  --text-primary: #1d2429;
  --text-muted: #6b5a2e;
  --creeper: #55c93a;
  --blaze: #FFB000;
  --warden: #2ce8e0;
  --font-display: 'Fredoka One', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  background: var(--page-gradient);
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: transparent;
  position: relative;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.flip {
  transform: scaleX(-1);
}

/* Hero chickens only */
.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 20px;
}

.hero-chickens {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-chicken {
  position: absolute;
  width: clamp(64px, 9vw, 110px);
  opacity: 0.85;
  filter: drop-shadow(0 8px 14px rgba(120, 80, 0, 0.22));
  --bob-duration: 3.2s;
  --bob-delay: 0s;
  --bob-height: 28px;
  animation: chicken-bob var(--bob-duration) ease-in-out var(--bob-delay) infinite;
  will-change: transform;
}

.hero-chicken.flip {
  animation-name: chicken-bob-flip;
}

.hero-chicken.big {
  width: clamp(110px, 16vw, 180px);
  opacity: 0.95;
  z-index: 1;
}

.hc1 { top: 8%; left: 3%; }
.hc2 { top: 12%; right: 4%; width: clamp(80px, 11vw, 130px); }
.hc3 { top: 42%; left: 1%; }
.hc4 { top: 48%; right: 2%; width: clamp(72px, 10vw, 120px); }
.hc5 { top: 72%; left: 6%; }
.hc6 { top: 70%; right: 5%; }
.hc7 { top: 22%; left: 18%; width: clamp(56px, 8vw, 96px); opacity: 0.7; }
.hc8 { top: 28%; right: 16%; width: clamp(58px, 8vw, 100px); opacity: 0.7; }
.hc9 { top: 58%; left: 14%; }
.hc10 { top: 62%; right: 14%; width: clamp(70px, 10vw, 118px); }
.hc11 { bottom: 4%; left: 28%; width: clamp(60px, 8vw, 100px); }
.hc12 { bottom: 6%; right: 26%; }

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: rise-in 0.7s ease both;
}

.hero-visual {
  position: relative;
  width: min(340px, 82vw);
  margin: 0 auto 10px;
}

.hero-logo {
  width: min(260px, 70vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 12px 24px rgba(120, 80, 0, 0.22));
  animation: soft-float 4.5s ease-in-out infinite;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: #fff;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: #fff;
  box-shadow: var(--card-shadow);
}

.nav-icon {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

.btn--header-join {
  margin-left: 4px;
  background: var(--gold-bright);
  border-color: var(--gold);
  color: var(--text-primary);
  padding: 10px 16px;
  white-space: nowrap;
}

/* Hero */
.hero-tag {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
}

.hero-copy {
  margin: 0 auto 28px;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 500;
}

.ip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: stretch;
}

.status-pill,
.player-count,
.ip-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-weight: 600;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c4a14a;
  box-shadow: 0 0 0 4px rgba(252, 227, 61, 0.45);
}

.status-pill.is-online .status-dot {
  background: #2f9e44;
  box-shadow: 0 0 0 4px rgba(47, 158, 68, 0.2);
}

.status-pill.is-offline .status-dot {
  background: #d9480f;
  box-shadow: 0 0 0 4px rgba(217, 72, 15, 0.18);
}

.ip-btn {
  appearance: none;
  cursor: pointer;
  padding: 12px 22px;
  min-width: 240px;
  font-family: var(--font-body);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ip-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.ip-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ip-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold);
  line-height: 1.2;
}

.ip-hint {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.player-count {
  display: grid;
  align-content: center;
  padding: 12px 20px;
  text-align: center;
}

.player-count strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
}

.player-count span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.section {
  padding: 28px 0 12px;
}

.section--alt .card {
  background: #fffef8;
}

.section-head {
  text-align: center;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 400;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.update-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
}

.update-empty img {
  width: 72px;
  height: 72px;
  opacity: 0.9;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.mode-card {
  padding: 22px 18px;
  text-align: center;
  transition: transform 0.18s ease;
}

.mode-card:hover {
  transform: translateY(-4px);
}

.mode-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 8px rgba(120, 80, 0, 0.2));
}

.mode-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}

.mode-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.store-card {
  position: relative;
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-card--featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fffef5, #fff);
}

.store-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--gold-deep);
}

.store-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
}

.rank-creeper { color: var(--creeper); }
.rank-blaze { color: var(--blaze); }
.rank-warden { color: var(--warden); }

.price {
  margin: 0;
}

.price span {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
}

.store-card ul {
  margin: 0 0 auto;
  padding: 0 0 0 18px;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.store-card ul strong {
  color: var(--text-primary);
}

.store-card--creeper ul strong { color: var(--creeper); }
.store-card--blaze ul strong { color: var(--blaze); }
.store-card--warden ul strong { color: var(--warden); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.btn--gold {
  background: var(--gold);
  border-color: var(--gold-deep);
  color: #fff;
}

.btn--bright {
  background: var(--gold-bright);
  border-color: var(--gold);
  color: var(--text-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 20px;
  text-align: center;
}

.stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
}

.stat-value--sm {
  font-size: 1.25rem;
  word-break: break-word;
}

.player-search {
  padding: 22px 24px;
}

.player-search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.player-search-head img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.player-search-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
}

.player-search-head p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.player-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.player-search-row input {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: var(--card-shadow);
  outline: none;
}

.player-search-row input:focus {
  border-color: var(--gold);
}

.community-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  margin-bottom: 8px;
}

.community-art {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  max-height: 280px;
}

.community-layout h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
}

.community-layout p {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.forum-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  margin-bottom: 8px;
}

.forum-banner h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
}

.forum-banner p {
  margin: 0;
  color: var(--text-muted);
  max-width: 520px;
}

.site-footer {
  margin-top: 36px;
  padding: 28px 0 40px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--card-border);
  box-shadow: 0 -8px 24px -12px var(--gold-shadow);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: grid;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
}

.footer-brand p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--gold-deep);
}

.footer-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Player page */
.player-page {
  padding: 40px 0 60px;
}

.player-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 28px 24px;
  text-align: center;
}

.player-skin {
  width: 180px;
  height: auto;
  margin: 0 auto 18px;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgba(120, 80, 0, 0.25));
}

.player-name {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--gold);
}

.player-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.player-meta .card {
  padding: 14px;
}

.player-meta .stat-label {
  margin-bottom: 4px;
}

.player-soon {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.forum-page {
  padding: 36px 0 56px;
}

.forum-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  align-items: start;
}

.forum-login,
.forum-board {
  padding: 26px 24px;
}

.forum-login h1,
.forum-board-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
}

.forum-lead,
.forum-board-head p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-weight: 500;
}

.login-stack {
  display: grid;
  gap: 12px;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.login-btn img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.login-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.2);
}

.login-btn--mc {
  background: var(--gold-bright);
  border-color: var(--gold);
  color: var(--text-primary);
}

.login-btn--discord {
  background: #5865F2;
  border-color: #4752c4;
  color: #fff;
}

.login-btn--google {
  background: #fff;
  border-color: #dadce0;
  color: #3c4043;
}

.login-mark--g {
  background: #fff;
  color: #4285f4;
  border: 1px solid #dadce0;
}

.login-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.forum-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.forum-cats li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #fffef8;
}

.forum-cats img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.forum-cats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.forum-cats span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }
}

.back-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Join modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 0, 0.55);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  padding: 28px 28px 24px;
  animation: rise-in 0.25s ease both;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-card h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
}

.join-visuals {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.join-logo {
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
  filter: drop-shadow(0 8px 16px rgba(120, 80, 0, 0.25));
}

.join-howto {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #111;
}

.join-steps {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.7;
}

.join-steps strong {
  color: var(--text-primary);
}

.join-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-feedback {
  font-size: 0.85rem;
  font-weight: 700;
}

.join-mascot {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes chicken-bob {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(calc(var(--bob-height) * -1)); }
  55% { transform: translateY(calc(var(--bob-height) * -0.35)); }
  70% { transform: translateY(calc(var(--bob-height) * -0.85)); }
}

@keyframes chicken-bob-flip {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  40% { transform: scaleX(-1) translateY(calc(var(--bob-height) * -1)); }
  55% { transform: scaleX(-1) translateY(calc(var(--bob-height) * -0.35)); }
  70% { transform: scaleX(-1) translateY(calc(var(--bob-height) * -0.85)); }
}

@media (max-width: 960px) {
  .mode-grid,
  .store-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .community-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 14px 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .site-nav.nav-open {
    display: flex;
  }

  .site-nav a,
  .btn--header-join {
    width: 100%;
    justify-content: flex-start;
  }

  .site-nav a {
    background: #fff;
  }

  .btn--header-join {
    margin-left: 0;
    justify-content: center;
  }

  .forum-banner,
  .join-actions {
    flex-direction: column;
    text-align: center;
  }

  .forum-banner .btn,
  .join-actions .btn {
    width: 100%;
  }

  .join-visuals {
    grid-template-columns: 1fr;
  }

  .join-logo {
    max-width: 140px;
  }

  .hero-chicken {
    opacity: 0.7;
  }

  .hero-chicken.big {
    width: clamp(90px, 22vw, 140px);
  }
}

@media (max-width: 560px) {
  .mode-grid,
  .store-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .ip-btn,
  .status-pill,
  .player-count {
    width: 100%;
  }
}
