:root {
  --bg: #05080f;
  --panel: rgba(7, 12, 22, 0.92);
  --text: #f7f2e7;
  --muted: #a9b2c2;
  --gold: #e8bd6b;
  --cyan: #27d9ef;
  --cyan-soft: rgba(39, 217, 239, 0.25);
  --orange: #ff7a24;
  --orange-soft: rgba(255, 122, 36, 0.26);
  --border: rgba(255, 255, 255, 0.11);
  --header-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Bai Jamjuree", system-ui, sans-serif;
  overflow-x: hidden;
}

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

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(2, 5, 11, 0.48), rgba(2, 5, 11, 0.88)),
    url("assets/background.webp") center / cover no-repeat;
  transform: scale(1.04);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 46%, rgba(0, 214, 255, 0.16), transparent 33%),
    radial-gradient(circle at 75% 46%, rgba(255, 100, 25, 0.16), transparent 33%),
    radial-gradient(circle at 50% 15%, rgba(232, 189, 107, 0.12), transparent 28%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  padding: 0 clamp(20px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(4, 8, 15, 0.74);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Cinzel", serif;
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 700;
  color: #f2d397;
}

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

.brand-dot {
  color: #d9dee7;
  font-size: 0.72em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  font-weight: 600;
}

.nav a {
  position: relative;
  color: #c6ccd6;
  transition: color 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff0c7;
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 12px var(--gold);
}

.hero {
  width: min(1400px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 7vw, 92px) 0 42px;
}

.hero-heading {
  text-align: center;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 1;
  letter-spacing: -0.035em;
  text-shadow: 0 0 35px rgba(232, 189, 107, 0.18);
}

.hero h1 span {
  color: #e5c98f;
  font-size: 0.62em;
}

.subtitle {
  display: inline-block;
  margin: 20px 0 0;
  padding: 0 42px;
  position: relative;
  letter-spacing: 0.38em;
  font-weight: 700;
  color: #dcbcf7;
}

.subtitle::before,
.subtitle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c681ff);
}

.subtitle::before {
  left: 0;
}

.subtitle::after {
  right: 0;
  transform: rotate(180deg);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.game-card {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 18, 29, 0.92), rgba(5, 9, 16, 0.98));
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
  transform: translateY(0);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.game-card:hover {
  transform: translateY(-8px);
}

.pal-card {
  border-color: rgba(39, 217, 239, 0.48);
}

.pal-card:hover {
  box-shadow: 0 34px 90px rgba(0,0,0,0.5), 0 0 34px var(--cyan-soft);
}

.conan-card {
  border-color: rgba(255, 122, 36, 0.48);
}

.conan-card:hover {
  box-shadow: 0 34px 90px rgba(0,0,0,0.5), 0 0 34px var(--orange-soft);
}

.card-art {
  position: relative;
  height: 335px;
  overflow: hidden;
}

.card-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.game-card:hover .card-art img {
  transform: scale(1.045);
}

.art-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 9, 16, 0.96) 100%);
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 38px 36px;
  margin-top: -24px;
  position: relative;
  z-index: 2;
}

.server-status {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(5,9,16,0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #c7ced9;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6cff9c;
  box-shadow: 0 0 10px #6cff9c;
}

.card-content h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(35px, 4vw, 56px);
  line-height: 1.05;
}

.pal-card h2,
.pal-card .domain {
  text-shadow: 0 0 24px rgba(39,217,239,0.2);
}

.conan-card h2,
.conan-card .domain {
  text-shadow: 0 0 24px rgba(255,122,36,0.2);
}

.domain {
  margin: 10px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.pal-card .domain {
  color: var(--cyan);
}

.conan-card .domain {
  color: var(--orange);
}

.description {
  margin: 18px 0 28px;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.7;
}

.join-button {
  margin-top: auto;
  min-height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border-radius: 14px;
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 800;
  letter-spacing: 0.035em;
  border: 1px solid rgba(255,255,255,0.48);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.join-button:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.12);
}

.join-button:active {
  transform: translateY(0) scale(0.99);
}

.join-button.cyan {
  background: linear-gradient(180deg, #1dc7df, #08778f);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.13), 0 0 26px rgba(39,217,239,0.35);
}

.join-button.orange {
  background: linear-gradient(180deg, #ff7927, #a92b0d);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.13), 0 0 26px rgba(255,122,36,0.35);
}

.button-icon {
  font-size: 1.2em;
}

.footer {
  width: min(1400px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 34px;
  text-align: center;
  color: #919bab;
}

.footer-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232,189,107,0.36);
  border-radius: 50%;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-weight: 800;
}

.footer p {
  margin: 8px 0 4px;
  color: #d3d8e1;
}

.footer span {
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .site-header {
    height: 68px;
  }

  .nav a:first-child {
    display: none;
  }

  .hero {
    padding-top: 44px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 0;
  }
}

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

  .brand {
    font-size: 17px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .nav {
    gap: 14px;
    font-size: 0.9rem;
  }

  .hero {
    width: min(100% - 22px, 1400px);
  }

  .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.16em;
  }

  .subtitle {
    font-size: 0.78rem;
    letter-spacing: 0.24em;
  }

  .card-art {
    height: 235px;
  }

  .card-content {
    padding: 0 20px 22px;
  }

  .description {
    font-size: 0.95rem;
  }

  .join-button {
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
