@import url('https://fonts.googleapis.com/css2?family=Marcellus+SC&display=swap');

:root {
  --gold: #d4af37;
  --gold-soft: #f2d479;
  --gold-bright: #ffe7a3;
  --gold-dark: #6e5314;
  --black: #050505;
  --black-soft: #111111;
  --black-panel: #181818;
  --black-panel-deep: #070707;
  --border: #3a2b0f;
  --text: #f6e7bf;
  --muted: #9f8450;
  --danger: #b64646;
  --radius: 18px;
  --grid-line: rgba(212, 175, 55, 0.025);
  --grid-glow: rgba(212, 175, 55, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #050505;
  color: var(--text);
  font-family: "Marcellus SC", serif;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font-family: "Marcellus SC", serif;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
}

a:hover {
  color: var(--gold-bright);
}

img {
  max-width: 100%;
}

.hatchopia-embed {
  width: 100%;
  margin: 0;
  padding: 18px 0 34px;
  background: #050505;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 22px 0;
}

.ui-box,
.faction-card,
.stat,
.activity-card,
.news-item,
.hero-creature,
.archive-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  outline: 1px solid rgba(212, 175, 55, 0.08);
  background:
    repeating-linear-gradient(
      90deg,
      var(--grid-line) 0,
      var(--grid-line) 1px,
      transparent 1px,
      transparent 22px
    ),
    linear-gradient(180deg, #111111 0%, #090909 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.ui-box {
  border-radius: var(--radius);
}

.ui-box::before,
.faction-card::before,
.stat::before,
.activity-card::before,
.news-item::before,
.hero-creature::before,
.archive-window::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top center, var(--grid-glow), transparent 45%);
}

.ui-box > *,
.faction-card > *,
.stat > *,
.activity-card > *,
.news-item > *,
.hero-creature > *,
.archive-window > * {
  position: relative;
  z-index: 2;
}

h1,
h2,
h3,
.label,
.faction-name,
.faction-tagline,
.stat span {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 400;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.label,
.news-label {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  color: var(--gold);
  background: #0a0806;
  font-size: 0.72rem;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn,
.gold-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 7px 12px;
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  background: linear-gradient(180deg, #2a2118, #100d0a);
  color: var(--gold);
  font-family: "Marcellus SC", serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 18px rgba(212,175,55,.10);
}

.btn:hover,
.gold-button:hover {
  color: #fff3d6;
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* Shared nav/status/footer support */
#siteNav {
  position: relative;
  z-index: 1000;
}

#customGameHeader {
  position: relative;
  width: calc(100% - 40px);
  margin: 12px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  padding: 24px;
  overflow: visible;
  background:
    repeating-linear-gradient(135deg, rgba(212,175,55,.10) 0 2px, transparent 2px 12px),
    linear-gradient(180deg, #141414 0%, #050505 100%);
  border: 2px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 0 32px rgba(212,175,55,.08);
}

.headerGlow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(212,175,55,.08), transparent 70%);
}

#customGameHeader button {
  position: relative;
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: .2s ease;
  text-shadow: 0 0 10px rgba(212,175,55,.10);
}

#customGameHeader button:hover {
  color: var(--gold-bright);
  transform: translateY(-1px);
  text-shadow: 0 0 18px rgba(212,175,55,.28);
}

.navDropdown {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.loggedInOnly,
.loggedOutOnly,
.adminOnly {
  display: none !important;
}

.loggedInOnly.showNav,
.loggedOutOnly.showNav,
.adminOnly.showNav {
  display: inline-block !important;
}

.dropdownMenu {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 14px;
  background:
    repeating-linear-gradient(135deg, rgba(212,175,55,.08) 0 2px, transparent 2px 12px),
    linear-gradient(180deg, #181818 0%, #080808 100%);
  border: 1px solid var(--border);
  box-shadow: 0 0 28px rgba(212,175,55,.10);
  z-index: 999999;
}

.dropdownMenu button {
  display: block;
  width: 100%;
  padding: 10px 0;
  text-align: center;
  font-size: 15px;
  color: var(--gold);
  letter-spacing: 1.4px;
}

.navDropdown.open .dropdownMenu {
  display: block;
}

#headerStatus {
  position: relative;
  z-index: 999;
}

.hatchopia-header-wrap {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  gap: 12px;
}

#usernameDisplay {
  color: var(--gold-soft);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
  background:
    radial-gradient(circle at top, rgba(212,175,55,.08), transparent 58%),
    linear-gradient(180deg,var(--black-panel) 0%,var(--black-panel-deep) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  box-shadow: 0 0 22px rgba(0,0,0,.45),0 0 18px rgba(212,175,55,.05);
}

.username-credits,
.header-clock {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.header-clock {
  margin-top: 6px;
}

.notif-wrap {
  position: relative;
}

.notif-bell {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top,rgba(212,175,55,.16),transparent 58%),
    linear-gradient(180deg,#1b1b1b 0%,#070707 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .22s ease;
  box-shadow: 0 0 22px rgba(0,0,0,.42),0 0 14px rgba(212,175,55,.05);
}

.notif-bell:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--gold);
}

.notif-bell-icon {
  width: 28px;
  height: 28px;
  color: var(--gold-soft);
  filter: drop-shadow(0 0 7px rgba(212,175,55,.38));
}

.notif-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg,var(--gold-soft) 0%,#c99b21 100%);
  color: #000;
  border: 1px solid #000;
  font-size: 11px;
  font-weight: bold;
}

.notif-panel {
  display: none;
  position: absolute;
  top: 74px;
  right: 0;
  width: 370px;
  max-height: 500px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top,rgba(212,175,55,.07),transparent 50%),
    linear-gradient(180deg,#181818 0%,#090909 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 0 34px rgba(0,0,0,.65),0 0 22px rgba(212,175,55,.06);
}

.notif-panel.open {
  display: block;
}

.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(212,175,55,.12);
}

.notif-title {
  color: var(--gold-soft);
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.notif-mark {
  background: linear-gradient(180deg,#1a1a1a 0%,#0c0c0c 100%);
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 10px;
  letter-spacing: .08em;
  cursor: pointer;
}

.notif-item {
  position: relative;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(212,175,55,.06);
  cursor: pointer;
  transition: .2s ease;
}

.notif-item:hover {
  background: linear-gradient(90deg,rgba(212,175,55,.06),transparent);
}

.notif-item.unread {
  background: linear-gradient(90deg,rgba(212,175,55,.10),rgba(212,175,55,.02));
}

.notif-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg,var(--gold-soft),#c99b21);
}

.notif-item-title {
  color: var(--gold-soft);
  font-size: 13px;
  margin-bottom: 6px;
}

.notif-item-body {
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.notif-time {
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
}

.notif-empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

#playerActivity {
  display: flex;
  justify-content: center;
  margin: 0 auto 20px;
}

#playerActivityBar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid rgba(212,175,55,.85);
  border-radius: 999px;
  background: linear-gradient(180deg,rgba(28,22,10,.98),rgba(3,3,3,.98));
  color: #f7d979;
  font-size: 14px;
  letter-spacing: .6px;
  text-shadow: 0 0 8px rgba(212,175,55,.35);
  box-shadow: 0 0 14px rgba(212,175,55,.28), inset 0 0 10px rgba(212,175,55,.08);
}

#playerActivityBar .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #42e878;
  box-shadow: 0 0 8px #42e878,0 0 14px rgba(66,232,120,.7);
}

#playerActivityBar .divider {
  color: rgba(212,175,55,.55);
}

#onlineNow,
#active24h {
  color: #fff3b0;
}

.site-footer {
  margin-top: 60px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20,20,20,.95), rgba(5,5,5,.98));
}

.site-footer p {
  margin: 8px 0;
  line-height: 1.5;
  font-size: 13px;
}

/* Homepage */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  min-height: 520px;
  padding: 38px;
}

.hero-content,
.hero-creature {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin: 18px 0;
  color: var(--gold-soft);
  font-size: clamp(2.6rem, 5.4vw, 5.4rem);
  line-height: 0.92;
  text-shadow: 0 0 24px rgba(212,175,55,.22);
}

.hero p {
  max-width: 680px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-creature {
  display: grid;
  place-items: center;
  min-height: 390px;
  border-radius: 18px;
}

.hero-creature img {
  width: 300px;
  max-width: 78%;
  filter: drop-shadow(0 22px 30px rgba(0,0,0,.7));
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 2.15rem;
  text-shadow: 0 0 18px rgba(212,175,55,.18);
}

.section-heading p {
  margin: 0;
  font-size: .95rem;
}

.faction-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.faction-card {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px 14px;
  text-align: center;
  border-radius: 14px;
  transition: .2s ease;
}

.faction-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-dark);
  box-shadow: 0 0 28px rgba(212,175,55,.14),0 12px 32px rgba(0,0,0,.5);
}

.faction-name {
  color: var(--gold);
  font-size: 1rem;
}

.faction-tagline {
  margin-top: 10px;
  color: var(--muted);
  font-size: .8rem;
}

.archive {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 22px;
  padding: 38px;
}

.archive-window {
  display: grid;
  place-items: center;
  min-height: 330px;
  border-radius: 18px;
}

.archive-window img {
  width: 250px;
  max-width: 75%;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.65));
}

.archive-info h2 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 2.2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.stat {
  padding: 16px;
  border-radius: 14px;
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 1.25rem;
  font-weight: 400;
}

.stat span {
  color: var(--muted);
  font-size: .8rem;
}

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

.activity-card {
  padding: 22px;
  border-radius: 14px;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border: 1px solid var(--gold-dark);
  border-radius: 14px;
  color: var(--gold);
  background:
    radial-gradient(circle at top, rgba(212,175,55,.22), transparent 55%),
    linear-gradient(145deg, #2a2118, #090806);
  font-size: 1.5rem;
}

.activity-card h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 1.25rem;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.news-item {
  padding: 24px;
  border-radius: 14px;
}

.news-item h3 {
  margin: 12px 0;
  color: var(--gold);
  font-size: 1.45rem;
}

.cta {
  padding: 38px;
  text-align: center;
}

.cta h2 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 2.45rem;
}

@media (max-width: 900px) {
  #customGameHeader {
    width: calc(100% - 24px);
    gap: 20px;
    padding: 20px 14px;
  }

  #customGameHeader button {
    font-size: 15px;
    letter-spacing: 1.2px;
  }

  .dropdownMenu {
    min-width: 180px;
  }

  .hatchopia-header-wrap {
    position: static;
    justify-content: center;
    margin: 12px auto;
    flex-wrap: wrap;
  }

  .notif-panel {
    right: 50%;
    transform: translateX(50%);
    width: min(370px, calc(100vw - 28px));
  }

  .hero,
  .archive {
    grid-template-columns: 1fr;
  }

  .faction-grid,
  .activity-grid,
  .news-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 30px;
  }

  .archive,
  .cta {
    padding: 30px;
  }

  .hero-creature {
    min-height: 300px;
  }

  .hero-creature img,
  .archive-window img {
    width: 210px;
  }
}
