/* ==========================================
   PERFECT WORLD CELESTIAL — MAIN STYLESHEET
   ========================================== */

:root {
  --night: #08051d;
  --indigo: #17105c;
  --violet: #7c4dff;
  --cyan: #62e9ff;
  --gold: #ffd978;
  --white: #f8f7ff;
  --glass: rgba(11, 8, 45, 0.66);
  --border: rgba(219, 237, 255, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  isolation: isolate;
  color: var(--white);
  font-family: "Manrope", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(5, 3, 30, 0.72) 0%, rgba(7, 6, 39, 0.86) 48%, rgba(4, 3, 24, 0.96) 100%),
    url("Images/PW Celestial Image 1.png") center top / cover fixed;
}

/* Lapisan cahaya lembut agar halaman tidak terasa datar. */
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 15% 24%, rgba(85, 219, 255, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 58%, rgba(179, 87, 255, 0.2), transparent 28rem);
  content: "";
  pointer-events: none;
}

::selection {
  color: #0a0821;
  background: var(--gold);
}

/* Header selalu terlihat saat halaman digulir. */
.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 82px;
  padding: 12px clamp(18px, 5vw, 76px);
  background: linear-gradient(90deg, rgba(7, 4, 31, 0.88), rgba(20, 14, 69, 0.72));
  border-bottom: 1px solid rgba(211, 231, 255, 0.2);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.logo-link {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 56px;
}

.logo {
  display: block;
  width: auto;
  max-width: min(220px, 34vw);
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(160, 216, 255, 0.36));
  transition: filter 220ms ease, transform 220ms ease;
}

.logo-link:hover .logo {
  filter: drop-shadow(0 0 18px rgba(255, 223, 122, 0.65));
  transform: scale(1.03);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2.2vw, 34px);
}

.main-nav a {
  position: relative;
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.72rem, 1.15vw, 0.93rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  transition: color 180ms ease;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--gold);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Tombol utama untuk pemain baru membuat akun. */
.main-nav .registration-link {
  padding: 8px 13px;
  color: #1a103b;
  background: linear-gradient(115deg, #ffe9a7, #ffc653 55%, #fff0b5);
  border-radius: 99px;
  box-shadow: 0 5px 14px rgba(255, 188, 61, 0.24);
  text-shadow: none;
}

.main-nav .registration-link::after {
  display: none;
}

.main-nav .registration-link:hover,
.main-nav .registration-link:focus-visible {
  color: #1a103b;
  box-shadow: 0 7px 20px rgba(255, 198, 78, 0.46);
  transform: translateY(-2px);
}

.main-nav a:focus-visible,
.hero-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

main {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

/* Pembuka besar yang menggunakan gambar sebagai karya visual utama. */
.hero {
  display: grid;
  min-height: min(760px, calc(100vh - 82px));
  place-items: center;
  padding: 80px 0;
  text-align: center;
}

.hero-content {
  width: min(700px, 100%);
  padding: clamp(34px, 6vw, 74px);
  background: linear-gradient(135deg, rgba(10, 6, 42, 0.58), rgba(16, 9, 59, 0.25));
  border: 1px solid rgba(234, 242, 255, 0.26);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(1, 0, 19, 0.47), inset 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  animation: rise-in 700ms ease both;
}

.hero-kicker,
.section-heading p {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.4vw, 5.8rem);
  line-height: 1.06;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.68);
}

.hero h1 span {
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255, 201, 81, 0.5);
}

.hero-description {
  max-width: 500px;
  margin: 24px auto 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.8;
}

/* Statistik ringkas server. Angka dapat diubah langsung pada index.html. */
.server-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto 32px;
  overflow: hidden;
  text-align: left;
  background: rgba(5, 3, 30, 0.46);
  border: 1px solid rgba(217, 239, 255, 0.24);
  border-radius: 16px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.server-stat {
  min-width: 0;
  padding: 15px clamp(12px, 2.2vw, 24px);
}

.server-stat + .server-stat {
  border-left: 1px solid rgba(217, 239, 255, 0.2);
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(229, 245, 255, 0.72);
  font-size: clamp(0.62rem, 1vw, 0.71rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-value {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1rem, 2.2vw, 1.34rem);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 0 16px rgba(255, 211, 104, 0.38);
}

.status-online {
  color: #83ff9d;
  text-shadow: 0 0 16px rgba(93, 255, 132, 0.46);
}

.status-dot {
  width: 9px;
  height: 9px;
  background: #70ff8c;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(112, 255, 140, 0.15), 0 0 15px rgba(112, 255, 140, 0.8);
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 23px;
  color: #1a103b;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  background: linear-gradient(115deg, #ffe9a7, #ffc653 55%, #fff0b5);
  border-radius: 99px;
  box-shadow: 0 9px 22px rgba(255, 188, 61, 0.3);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.hero-button:hover {
  box-shadow: 0 12px 30px rgba(255, 198, 78, 0.52);
  transform: translateY(-3px);
}

/* Kartu informasi dibuat transparan agar gambar tetap terasa tanpa mengganggu teks. */
.info-section {
  padding: clamp(72px, 11vw, 132px) 0;
  scroll-margin-top: 92px;
}

.section-heading {
  margin-bottom: 24px;
  padding-left: 22px;
  border-left: 3px solid var(--gold);
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.04em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.64);
}

.content-box {
  min-height: 220px;
  padding: clamp(24px, 4vw, 42px);
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.94rem, 1.45vw, 1.04rem);
  line-height: 1.9;
  background: linear-gradient(130deg, rgba(8, 5, 35, 0.86), rgba(23, 18, 75, 0.68));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.content-box:hover {
  border-color: rgba(137, 233, 255, 0.5);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35), 0 0 30px rgba(90, 205, 255, 0.1);
  transform: translateY(-3px);
}

.game-title,
.sub-title,
.sub-tittle {
  display: inline-block;
  margin-top: 10px;
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.game-title {
  font-size: clamp(1.1rem, 1.7vw, 1.38rem);
}

.sub-title,
.sub-tittle {
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}

.rarity {
  display: inline-block;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  text-shadow: 0 0 12px currentColor;
}

.rarity.common { color: #ffffff; }
.rarity.uncommon { color: #72ff87; }
.rarity.rare { color: #70baff; }
.rarity.epic { color: #cf8cff; }
.rarity.legendary { color: #ffe76b; }
.rarity.mythical { color: #ff8f9e; }
.rarity.celestial { color: #72f3ff; }

/* Papan peringkat Top Donatur */
.donor-board {
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(130deg, rgba(8, 5, 35, 0.88), rgba(37, 22, 82, 0.72));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.donor-intro {
  max-width: 700px;
  margin: 0 0 25px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
}

.donor-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(217, 239, 255, 0.17);
  border-radius: 14px;
}

.donor-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  text-align: left;
}

.donor-table th {
  padding: 15px 20px;
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(4, 2, 29, 0.72);
}

.donor-table th:first-child,
.donor-table td:first-child {
  width: 105px;
  text-align: center;
}

.donor-table td {
  padding: 14px 20px;
  color: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(217, 239, 255, 0.12);
  transition: background 180ms ease;
}

.donor-table td:last-child {
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
}

.donor-table tbody tr:hover td {
  background: rgba(99, 78, 194, 0.22);
}

.rank-badge {
  display: inline-grid;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.84);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.83rem;
  font-weight: 800;
  place-items: center;
  background: rgba(139, 181, 255, 0.13);
  border: 1px solid rgba(190, 223, 255, 0.24);
  border-radius: 50%;
}

.rank-1 .rank-badge {
  color: #2a1a00;
  background: linear-gradient(135deg, #fff1a9, #e8a71a);
  border-color: #ffe49a;
  box-shadow: 0 0 18px rgba(255, 203, 76, 0.45);
}

.rank-2 .rank-badge {
  color: #182033;
  background: linear-gradient(135deg, #f3f8ff, #9bacce);
  border-color: #e2eeff;
  box-shadow: 0 0 14px rgba(198, 221, 255, 0.35);
}

.rank-3 .rank-badge {
  color: #2c1308;
  background: linear-gradient(135deg, #ffc891, #bc6c32);
  border-color: #ffc18c;
  box-shadow: 0 0 14px rgba(241, 148, 75, 0.3);
}

/* Area download dan panduan pemain baru */
.download-shell {
  display: grid;
  gap: 22px;
}

.download-group,
.registration-guide {
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(130deg, rgba(8, 5, 35, 0.88), rgba(30, 20, 77, 0.72));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.download-group-heading,
.registration-guide-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.download-kicker {
  margin: 0 0 7px;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.download-group h3,
.registration-guide h3 {
  margin: 0 0 9px;
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.03em;
}

.download-group-heading > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.75;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.download-card {
  display: flex;
  flex-direction: column;
  min-height: 172px;
  padding: 22px;
  color: var(--white);
  text-decoration: none;
  background: rgba(6, 4, 34, 0.62);
  border: 1px solid rgba(200, 232, 255, 0.22);
  border-radius: 15px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.download-card:hover,
.download-card:focus-visible {
  border-color: rgba(114, 243, 255, 0.68);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 0 28px rgba(85, 207, 255, 0.16);
  outline: none;
  transform: translateY(-4px);
}

.download-card-primary {
  background: linear-gradient(145deg, rgba(111, 67, 202, 0.6), rgba(7, 8, 49, 0.76));
  border-color: rgba(255, 215, 122, 0.52);
}

.download-badge {
  width: fit-content;
  margin-bottom: auto;
  padding: 4px 9px;
  color: #1b123d;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold);
  border-radius: 99px;
}

.download-card:not(.download-card-primary) .download-badge {
  color: #dffbff;
  background: rgba(103, 226, 255, 0.15);
  border: 1px solid rgba(103, 226, 255, 0.28);
}

.download-card-title {
  margin-top: 24px;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.download-card-source {
  margin-top: 7px;
  color: rgba(230, 246, 255, 0.69);
  font-size: 0.83rem;
}

.patcher-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.56fr);
  gap: 25px;
  align-items: stretch;
}

.patcher-group .download-group-heading {
  margin-bottom: 0;
}

.patcher-card {
  min-height: 150px;
  background: linear-gradient(145deg, rgba(49, 132, 172, 0.42), rgba(7, 8, 49, 0.76));
}

.registration-guide {
  background: linear-gradient(130deg, rgba(36, 21, 74, 0.76), rgba(8, 5, 35, 0.9));
}

.registration-steps {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.registration-steps li {
  display: grid;
  grid-template-columns: 37px 1fr;
  gap: 14px;
  align-items: start;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.registration-steps strong {
  color: var(--white);
}

.registration-steps a {
  color: var(--cyan);
  font-weight: 700;
}

.step-number {
  display: grid;
  width: 31px;
  height: 31px;
  color: #21133e;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 800;
  place-items: center;
  background: linear-gradient(135deg, #ffe9a7, #ffc653);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 205, 82, 0.3);
}

footer {
  margin-top: 36px;
  padding: 30px 20px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  text-align: center;
  background: rgba(4, 2, 22, 0.76);
  border-top: 1px solid rgba(211, 231, 255, 0.14);
}

footer p {
  margin: 0;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet dan ponsel */
@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .site-header {
    flex-direction: column;
    gap: 7px;
    padding: 10px 14px 8px;
  }

  .logo-link,
  .logo {
    height: 46px;
  }

  .main-nav {
    justify-content: flex-start;
    width: 100%;
    gap: 20px;
    padding: 3px 2px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .main-nav a {
    flex: 0 0 auto;
    font-size: 0.72rem;
  }

  main {
    width: min(100% - 28px, 1160px);
  }

  .hero {
    min-height: 620px;
    padding: 56px 0;
  }

  .hero-content {
    border-radius: 20px;
  }

  .server-stats {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .server-stat + .server-stat {
    border-top: 1px solid rgba(217, 239, 255, 0.2);
    border-left: 0;
  }

  .stat-value {
    justify-content: center;
  }

  .donor-board {
    padding: 20px;
  }

  .download-group,
  .registration-guide {
    padding: 20px;
  }

  .download-grid,
  .patcher-group {
    grid-template-columns: 1fr;
  }

  .patcher-group .download-group-heading {
    margin-bottom: 0;
  }

  .info-section {
    scroll-margin-top: 122px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
