/* ==========================================================================
   PH Online Casino — shared stylesheet
   Mobile-first (320-430px canvas), centered column on desktop.
   Directory-first: compact lists, chips, restrained cards, no big imagery.
   ========================================================================== */

:root {
  --bg: #0b101d;
  --surface: #131a2c;
  --surface-2: #1a2340;
  --border: #27334f;
  --text: #e9edf7;
  --muted: #9fabc6;
  --gold: #f2c14e;
  --gold-deep: #d9a531;
  --ink: #171208;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(3, 6, 14, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

a { color: var(--gold); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 16, 29, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2px;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover { text-decoration: none; color: var(--gold); }

.brand-mark { display: inline-flex; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 38px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

.site-nav {
  display: none;
  width: 100%;
  flex-direction: column;
  padding: 6px 0 12px;
}

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

.site-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
}

.site-nav a:hover { background: var(--surface-2); text-decoration: none; }

.site-nav a.active {
  color: var(--gold);
  font-weight: 600;
  background: rgba(242, 193, 78, 0.08);
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.crumbs {
  margin: 0;
  padding: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { display: flex; gap: 6px; align-items: center; }
.crumbs li + li::before { content: "›"; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current="page"] { color: var(--text); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding: 26px 0 30px;
  background:
    radial-gradient(600px 220px at 18% 0%, rgba(242, 193, 78, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(26, 35, 64, 0.55), rgba(11, 16, 29, 0));
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.hero .lede {
  margin: 0 0 18px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15.5px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-deep); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(242, 193, 78, 0.1); text-decoration: none; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
}

.stat b {
  display: block;
  color: var(--gold);
  font-size: 18px;
  line-height: 1.2;
}

.stat span { font-size: 12px; color: var(--muted); line-height: 1.35; display: block; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 30px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section h2 {
  margin: 0 0 6px;
  font-size: clamp(19px, 4.4vw, 24px);
  line-height: 1.3;
}

.section .section-intro {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 68ch;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Category name lists (module 2 / link page)
   -------------------------------------------------------------------------- */

.cat-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-block h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.35;
}

.cat-block h3 a { color: var(--text); }
.cat-block h3 a:hover { color: var(--gold); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}

.section-alt .chips li { background: var(--bg); }

.cat-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Category / game card grids
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-width: 0;
}

.section-alt .card { background: var(--bg); }

.card b { display: block; font-size: 15px; line-height: 1.35; margin-bottom: 3px; }
.card b a { color: var(--text); }
.card b a:hover { color: var(--gold); }
.card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   Featured website introductions
   -------------------------------------------------------------------------- */

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.intro-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}

.section-alt .intro-card { background: var(--bg); }

.intro-card .intro-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.intro-card h3 { margin: 0; font-size: 16px; }

.tag {
  display: inline-block;
  background: rgba(242, 193, 78, 0.1);
  color: var(--gold);
  border: 1px solid rgba(242, 193, 78, 0.35);
  border-radius: 999px;
  font-size: 11.5px;
  padding: 2px 9px;
  line-height: 1.5;
}

.intro-card p { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }

.route-hint {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  color: var(--muted);
  background: rgba(11, 16, 29, 0.6);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   News list
   -------------------------------------------------------------------------- */

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

.news-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.section-alt .news-row { background: var(--bg); }

.news-row .news-date { font-weight: 600; font-size: 15px; }
.news-row .route-hint { align-self: flex-start; }
.news-row .news-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.news-row .news-topics li {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
}

/* --------------------------------------------------------------------------
   Site rows (name / domain / category) — login page
   -------------------------------------------------------------------------- */

.site-rows {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-row {
  display: grid;
  gap: 2px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 0;
}

.section-alt .site-row { background: var(--bg); }

.site-row .s-name { font-weight: 600; font-size: 15px; }
.site-row .s-domain {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.site-row .s-cat { font-size: 12.5px; color: var(--gold); }

/* Letter index (static example) */

.letter-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.letter-index li {
  min-width: 32px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  padding: 3px 6px;
}

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  counter-increment: step;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px 12px 52px;
  font-size: 14.5px;
  color: var(--text);
}

.section-alt .steps li { background: var(--bg); }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: rgba(242, 193, 78, 0.12);
  color: var(--gold);
  border: 1px solid rgba(242, 193, 78, 0.4);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
}

.steps b { display: block; margin-bottom: 2px; font-size: 15px; }
.steps li span { color: var(--muted); font-size: 13.5px; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-group { display: grid; gap: 8px; }

.faq-group h3 {
  margin: 18px 0 2px;
  font-size: 16.5px;
}

details.faq {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
}

.section-alt details.faq { background: var(--bg); }

details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 44px 12px 14px;
  font-weight: 600;
  font-size: 15px;
  position: relative;
  line-height: 1.45;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
}

details.faq[open] summary::after { content: "–"; }

details.faq .faq-body {
  padding: 0 14px 13px;
  color: var(--muted);
  font-size: 14.5px;
}

details.faq .faq-body a { color: var(--gold); }

/* --------------------------------------------------------------------------
   Prose (about / contact / news page text)
   -------------------------------------------------------------------------- */

.prose { max-width: 72ch; }
.prose p { margin: 0 0 14px; color: var(--text); font-size: 15.5px; }
.prose p muted, .prose .muted { color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; font-size: 15px; }

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.link-cards a {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
}

.section-alt .link-cards a { background: var(--bg); }

.link-cards a:hover { border-color: var(--gold); text-decoration: none; }
.link-cards a span {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */

.cta-box {
  background: linear-gradient(180deg, rgba(26, 35, 64, 0.8), rgba(19, 26, 44, 0.9));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
}

.cta-box p { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; }

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.cta-actions .btn { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: #090d18;
  padding: 26px 0 18px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.footer-brand {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--gold);
}

.site-footer p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }

.footer-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
  margin: 0 0 8px;
}

.footer-nav { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--muted); font-size: 13.5px; }
.footer-nav a:hover { color: var(--gold); }

.footer-bottom {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

/* Keep both hero buttons on one row down to 320px. */
@media (max-width: 379px) {
  .hero-actions .btn {
    font-size: 12.5px;
    padding-left: 8px;
    padding-right: 8px;
    letter-spacing: 0;
  }
}

@media (min-width: 560px) {
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-row {
    grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr) minmax(110px, 0.8fr);
    align-items: center;
  }
  .cta-actions { flex-direction: row; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 760px) {
  .cat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .intro-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .news-row .route-hint { align-self: auto; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    width: auto;
    padding: 0;
    gap: 2px;
    flex-wrap: wrap;
  }
  .site-nav a { padding: 8px 10px; font-size: 14px; }
  .cat-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding: 40px 0 44px; }
}

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