/* ---------- Base ---------- */
:root {
  --navy: #0a2342;
  --blue: #123f73;
  --sky: #2b83c6;
  --cyan: #4cc9c9;
  --ice: #c4f1f1;
  --text-soft: rgba(219, 234, 254, 0.7);
  --text-dim: rgba(219, 234, 254, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
  background: var(--blue);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::selection { background: rgba(196, 241, 241, 0.3); color: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ol { list-style: decimal inside; }
button { font: inherit; color: inherit; cursor: pointer; }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }

main { position: relative; z-index: 10; flex-grow: 1; }

.gradient-text { color: var(--cyan); }

/* ---------- Background glow + stars ---------- */
.bg-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
}
.pulse { animation: pulse 2s ease-in-out infinite; }
.ping  { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }

@keyframes pulse { 50% { opacity: 0.3; } }
@keyframes ping { 75%, 100% { transform: scale(2.5); opacity: 0; } }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Navbar ---------- */
.header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}
.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--sky);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; border-radius: 8px; }
.brand-name { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.05em; transition: color 0.2s; }
.brand-name:hover { color: var(--ice); }

.nav-links { display: none; align-items: center; gap: 2rem; font-size: 0.875rem; font-weight: 500; color: rgba(219, 234, 254, 0.8); }
.nav-links a:hover, .mobile-menu a:hover { color: var(--ice); }
.nav-links a { transition: color 0.2s; }

.menu-btn { background: none; border: none; padding: 0.5rem; color: rgba(219, 234, 254, 0.8); position: relative; z-index: 50; }
.menu-btn:hover { color: #fff; }
.menu-btn .icon { width: 24px; height: 24px; }
.menu-btn .icon-close { display: none; }
.menu-btn.open .icon-close { display: block; }
.menu-btn.open .icon-open { display: none; }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(10, 35, 66, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  z-index: 100;
  padding: 0 1.5rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}
.mobile-menu.open { max-height: 400px; opacity: 1; padding: 1.5rem; }
.mobile-menu a { display: block; text-align: center; padding: 0.75rem 0; font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, 0.03); }
.mobile-menu a:last-child { border-bottom: none; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu-btn, .mobile-menu { display: none; }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  padding: 3rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: rgba(219, 234, 254, 0.5);
}
.footer-title { font-weight: 600; color: rgba(255, 255, 255, 0.8); margin-bottom: 0.25rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: #fff; }
.footer-note { font-size: 0.75rem; color: rgba(219, 234, 254, 0.3); max-width: 20rem; text-align: center; }

@media (min-width: 768px) {
  .footer-inner { flex-direction: row; }
  .footer-note { text-align: right; }
}

/* ---------- Home: hero ---------- */
.hero-wrap { max-width: 80rem; margin: 0 auto; padding: 4rem 1.5rem 6rem; }
.hero { text-align: center; max-width: 48rem; margin: 0 auto 7rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(76, 201, 201, 0.1);
  border: 1px solid rgba(76, 201, 201, 0.2);
  border-radius: 999px;
  color: var(--ice);
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(12px);
}
.pill-lg { font-size: 0.875rem; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan);  }
.hero .pill:first-child { margin-bottom: 2rem; }
.hero .icon { width: 24px; height: 24px; }

.hero h1 { font-size: 3rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 1.5rem; }
.hero p.lead { font-size: 1.125rem; line-height: 1.7; color: rgba(219, 234, 254, 0.7); margin-bottom: 2.5rem; }

.ip-row { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 0.75rem; }
.ip-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  margin-bottom: 1.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.ip-chip:hover { background: rgba(255, 255, 255, 0.1); }
.ip-chip .green-dot { width: 6px; height: 6px; border-radius: 50%; background: #4cc9c9; }
.ip-chip .icon { width: 14px; height: 14px; color: #4cc9c9; }
.ip-row .pill { margin-top: 0.25rem; margin-bottom: 2rem; }

.btn-row { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.btn {
  width: 100%;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--cyan);
  color: var(--navy);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.25);
}
.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 20px 25px rgba(0, 0, 0, 0.35); }
.btn-primary .icon { width: 20px; height: 20px; transition: transform 0.2s; }
.btn-primary:hover .icon { transform: rotate(6deg); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); backdrop-filter: blur(12px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

@media (min-width: 640px) {
  .btn-row { flex-direction: row; }
  .btn { width: auto; }
}
@media (min-width: 768px) {
  .hero h1 { font-size: 4.5rem; }
  .hero p.lead { font-size: 1.25rem; }
}

/* ---------- Home: sections ---------- */
.section { margin-bottom: 7rem; scroll-margin-top: 6rem; }
.section-head { text-align: center; margin-bottom: 4rem; }
.section-head h2, .section h2 { font-size: 1.875rem; font-weight: 700; }
.section-head h2 { margin-bottom: 1rem; }
.section-head p { color: var(--text-dim); max-width: 32rem; margin: 0 auto; }

.grid-features { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-features { grid-template-columns: repeat(2, 1fr); } .section-head h2, .section h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .grid-features { grid-template-columns: repeat(3, 1fr); } }

.card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(196, 241, 241, 0.4); }
.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(76, 201, 201, 0.1);
  border: 1px solid rgba(76, 201, 201, 0.2);
  color: var(--ice);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform 0.3s;
}
.card-icon .icon { width: 24px; height: 24px; }
.card:hover .card-icon { transform: scale(1.1); }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.card p { color: var(--text-dim); font-size: 0.875rem; line-height: 1.7; }

/* connection guide */
.guide {
  max-width: 56rem;
  margin: 0 auto 7rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  scroll-margin-top: 6rem;
}
.guide h2 { text-align: center; margin-bottom: 2.5rem; }
.guide-grid { display: grid; grid-template-columns: 1fr; }
.guide-col { padding: 1.5rem 0; }
.guide-col:first-child { padding-top: 0; }
.guide-col + .guide-col { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.guide-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.guide-title h3 { font-size: 1.25rem; font-weight: 700; }
.tag { padding: 0.125rem 0.5rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; border-radius: 4px; color: var(--ice); }
.tag-sky { background: rgba(255, 255, 255, 0.15); }
.tag-cyan { background: rgba(76, 201, 201, 0.2); }
.guide ol { font-size: 0.875rem; color: rgba(219, 234, 254, 0.7); }
.guide li { margin-bottom: 0.75rem; }
.guide strong { color: #fff; }
code { background: rgba(255, 255, 255, 0.1); padding: 0.125rem 0.375rem; border-radius: 4px; color: var(--ice); font-family: ui-monospace, Menlo, Consolas, monospace; }
code.white { color: #fff; }

@media (min-width: 768px) {
  .guide { padding: 3rem; }
  .guide-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .guide-col { padding: 0 1rem 0 0; }
  .guide-col + .guide-col { border-top: none; border-left: 1px solid rgba(255, 255, 255, 0.1); padding: 0 0 0 2rem; }
}

 /* ---------- Rules page ---------- */
.rules-main { max-width: 64rem; margin: 0 auto; padding: 2rem 1rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--ice); }
.back-link .icon { width: 16px; height: 16px; transition: transform 0.2s; }
.back-link:hover .icon { transform: translateX(-4px); }

.page-title { text-align: center; font-size: 1.875rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 2.5rem; }


.rules-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.rule { padding: 1.25rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; backdrop-filter: blur(12px); }
.rule-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.rule-head h3 { font-size: 1rem; font-weight: 700; }
.rule-icon { padding: 0.5rem; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; }
.rule-icon.rose { color: #4cc9c9; }
.rule-icon.amber { color: #4cc9c9; }
.rule-icon.sky { color: #4cc9c9; }
.rule-icon.emerald { color: #4cc9c9; }
.rule p { font-size: 0.875rem; color: rgba(219, 234, 254, 0.7); line-height: 1.7; }

.terms {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(24px);
}
.terms-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 1.5rem; margin-bottom: 2rem; }
.terms-head h2 { font-size: 1.5rem; font-weight: 700; }
.terms-head p { font-size: 0.75rem; color: rgba(219, 234, 254, 0.4); margin-top: 0.25rem; }
.updated { font-size: 0.75rem; font-weight: 600; color: var(--ice); background: rgba(196, 241, 241, 0.1); padding: 0.25rem 0.75rem; border-radius: 999px; border: 1px solid rgba(196, 241, 241, 0.2); }

.terms-list { max-height: 60vh; overflow-y: auto; padding-right: 1rem; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.1) transparent; }
.clause { margin-bottom: 1.5rem; }
.clause h4 { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; transition: color 0.2s; }
.clause:hover h4 { color: var(--ice); }
.clause .num { font-size: 0.75rem; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--cyan); font-family: ui-monospace, Menlo, Consolas, monospace; }
.clause p { font-size: 0.875rem; color: rgba(219, 234, 254, 0.6); padding-left: 2rem; line-height: 1.7; }

.terms-foot { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1.5rem; margin-top: 2rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.75rem; color: rgba(219, 234, 254, 0.4); }
.terms-foot span { display: flex; align-items: center; gap: 0.5rem; }
.terms-foot .icon { width: 16px; height: 16px; color: var(--cyan); }

@media (min-width: 640px) {
  .rules-main { padding: 3rem 1.5rem; }
  .page-title { font-size: 3rem; }
    .terms-foot { flex-direction: row; }
}
@media (min-width: 768px) {
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .terms { padding: 3rem; }
}

/* ---------- Store page ---------- */
.store-main { display: flex; align-items: center; justify-content: center; padding: 1.5rem; text-align: center; }
.store-main h1 { font-size: 3rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; }
@media (min-width: 768px) { .store-main h1 { font-size: 4.5rem; } }

.nav-links a.active, .mobile-menu a.active { color: var(--ice); }
.page-sub { text-align: center; color: var(--text-dim); max-width: 36rem; margin: -1.5rem auto 2.5rem; }
.content-main { max-width: 64rem; margin: 0 auto; padding: 3rem 1.5rem; }
.guide.standalone { margin-top: 1rem; }
.prose-list { margin: 0.5rem 0 0.5rem 2rem; font-size: 0.875rem; color: rgba(219, 234, 254, 0.6); line-height: 1.7; }
.footer-links { flex-wrap: wrap; justify-content: center; }
.btn-primary { color: var(--navy); }
.inline-link { color: var(--ice); text-decoration: underline; }

/* ---------- News + Events ---------- */
.article-list { width: 100%; max-width: 48rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }
.post {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}
.post header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; font-size: 0.75rem; }
.post time { color: var(--text-dim); }
.post-tag { padding: 0.125rem 0.625rem; border-radius: 999px; background: rgba(76, 201, 201, 0.15); border: 1px solid rgba(76, 201, 201, 0.3); color: var(--ice); font-weight: 600; }
.post h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.post p { font-size: 0.875rem; line-height: 1.7; color: rgba(219, 234, 254, 0.7); }

.post.event { display: flex; gap: 1.25rem; align-items: flex-start; }
.event-date { flex-shrink: 0; width: 4rem; padding: 0.5rem 0; text-align: center; background: var(--cyan); color: var(--navy); border-radius: 12px; }
.event-date strong { display: block; font-size: 1.5rem; line-height: 1.1; }
.event-date span { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.event-meta { color: var(--ice) !important; font-weight: 600; margin-bottom: 0.5rem; }

@media (max-width: 900px) { .nav-links { gap: 1.25rem; font-size: 0.8125rem; } }

.empty { text-align: center; max-width: 36rem; margin: 0 auto; padding: 2.5rem 1.5rem; color: var(--text-dim); border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 16px; line-height: 1.7; }
.article-list:has(article) ~ .empty { display: none; }
.post p { white-space: pre-line; }
.post.past { opacity: 0.6; }
.content-main, .rules-main { width: 100%; }

/* ---------- Enhanced background ---------- */
body {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(76, 201, 201, 0.28), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 30%, rgba(43, 131, 198, 0.35), transparent 65%),
    radial-gradient(ellipse 60% 50% at 0% 70%, rgba(43, 131, 198, 0.25), transparent 65%),
    linear-gradient(180deg, #0a2342 0%, #0d2d55 40%, #123f73 75%, #0a2342 100%);
  background-attachment: fixed;
}
.bg-fx { position: fixed; }
.bg-fx::before, .bg-fx::after {
  content: ""; position: absolute; inset: -50%;
  background-repeat: repeat;
}
.bg-fx::before {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 200px 150px, #c4f1f1, transparent),
    radial-gradient(1px 1px at 60px 190px, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 260px 40px, rgba(255,255,255,.7), transparent);
  background-size: 300px 220px;
  opacity: .55;
  animation: starDrift 120s linear infinite;
}
.bg-fx::after {
  background-image:
    radial-gradient(2px 2px at 80px 120px, rgba(196,241,241,.9), transparent),
    radial-gradient(1.5px 1.5px at 340px 260px, #fff, transparent),
    radial-gradient(2px 2px at 460px 60px, rgba(255,255,255,.8), transparent);
  background-size: 520px 380px;
  opacity: .5;
  animation: starDrift 200s linear infinite reverse, pulse 6s ease-in-out infinite;
}
.star { box-shadow: 0 0 8px 2px rgba(196, 241, 241, 0.6); }
@keyframes starDrift { to { transform: translate(300px, 220px); } }
@media (prefers-reduced-motion: reduce) { .bg-fx::before, .bg-fx::after { animation: none; } }
