/**
 * ph222 win - Theme stylesheet
 * Palette: #0C0C0C (bg) | #EEE8AA (light text) | #B8860B (accent / brand)
 * All class names use the v329- prefix to avoid collisions.
 * Comments in English per project convention.
 */

:root {
  --v329-bg: #0C0C0C;
  --v329-bg-soft: #161616;
  --v329-bg-card: #1d1b14;
  --v329-text: #EEE8AA;
  --v329-text-dim: #bfb88a;
  --v329-primary: #B8860B;
  --v329-primary-soft: #d4a017;
  --v329-accent: #EEE8AA;
  --v329-danger: #d94a4a;
  --v329-border: rgba(184, 134, 11, 0.28);
  --v329-radius: 1.2rem;
  --v329-radius-sm: 0.8rem;
  --v329-shadow: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.45);
  --v329-header-h: 5.6rem;
  --v329-bottom-h: 6.4rem;
}

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

html { font-size: 62.5%; scroll-behavior: smooth; }

body {
  background: var(--v329-bg);
  color: var(--v329-text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--v329-header-h);
}

a { color: var(--v329-accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--v329-primary-soft); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { color: var(--v329-accent); font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.2rem; margin: 1.2rem 0; }
h2 { font-size: 1.9rem; margin: 1rem 0; }
h3 { font-size: 1.6rem; margin: .8rem 0; }
p { margin-bottom: 1rem; color: var(--v329-text-dim); }

.v329-container { width: 100%; max-width: 430px; margin: 0 auto; padding: 0 1.2rem; }
.v329-wrapper { width: 100%; }

/* ============ HEADER ============ */
.v329-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--v329-header-h);
  background: linear-gradient(180deg, #0a0a0a 0%, #0C0C0C 100%);
  border-bottom: 1px solid var(--v329-border);
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
}
.v329-brand { display: flex; align-items: center; gap: .6rem; color: var(--v329-accent); font-weight: 800; font-size: 1.6rem; }
.v329-brand img { width: 2.8rem; height: 2.8rem; border-radius: .4rem; }
.v329-brand .v329-brand-name { background: linear-gradient(90deg, var(--v329-accent), var(--v329-primary-soft)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.v329-header-actions { display: flex; align-items: center; gap: .6rem; }
.v329-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .7rem 1.2rem;
  font-size: 1.3rem; font-weight: 700;
  border-radius: 2rem; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  min-height: 3.6rem; text-decoration: none;
}
.v329-btn:hover { transform: translateY(-1px); }
.v329-btn-primary {
  background: linear-gradient(135deg, var(--v329-primary), var(--v329-primary-soft));
  color: #0C0C0C; box-shadow: 0 .3rem .8rem rgba(184, 134, 11, .35);
}
.v329-btn-outline {
  background: transparent; color: var(--v329-accent);
  border-color: var(--v329-border);
}
.v329-btn-ghost { background: rgba(238, 232, 170, .08); color: var(--v329-accent); }

.v329-menu-btn {
  background: transparent; border: none; color: var(--v329-accent);
  font-size: 1.8rem; cursor: pointer; padding: .4rem .6rem;
  min-width: 4.4rem; min-height: 4.4rem;
}

/* Slide-down mobile menu */
.v329-mobile-menu {
  position: fixed; top: 0; right: -85%;
  width: 80%; max-width: 320px; height: 100vh;
  background: #0a0a0a; padding: var(--v329-header-h) 1.6rem 2rem;
  transform: translateX(0); transition: transform .28s ease;
  z-index: 9999; overflow-y: auto;
  border-left: 1px solid var(--v329-border);
}
.v329-mobile-menu.v329-menu-open { right: 0; }
.v329-mobile-menu a {
  display: block; padding: 1.2rem 1rem;
  color: var(--v329-text); border-bottom: 1px solid rgba(184,134,11,.16);
  font-size: 1.5rem; font-weight: 600;
}
.v329-mobile-menu a:hover { background: rgba(184, 134, 11, .08); color: var(--v329-accent); }
.v329-menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 9998;
}
.v329-menu-backdrop.v329-backdrop-on { opacity: 1; pointer-events: auto; }

/* ============ HERO / CAROUSEL ============ */
.v329-hero { padding: 1rem 0 .4rem; }
.v329-carousel { position: relative; border-radius: var(--v329-radius); overflow: hidden; box-shadow: var(--v329-shadow); }
.v329-slides { position: relative; }
.v329-slide {
  position: relative; display: none;
  cursor: pointer; min-height: 17rem;
}
.v329-slide img { width: 100%; height: 100%; object-fit: cover; min-height: 17rem; }
.v329-slide.v329-slide-active { display: block; }
.v329-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,12,12,0) 35%, rgba(12,12,12,.85) 100%);
}
.v329-slide-caption {
  position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1rem; z-index: 2;
  color: var(--v329-accent); font-weight: 700; font-size: 1.5rem; text-shadow: 0 .2rem .4rem rgba(0,0,0,.6);
}
.v329-slide-caption small { display: block; color: var(--v329-text-dim); font-weight: 500; margin-top: .2rem; }

.v329-carousel-prev, .v329-carousel-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(12,12,12,.6); color: var(--v329-accent);
  border: 1px solid var(--v329-border); border-radius: 50%;
  width: 3.2rem; height: 3.2rem; font-size: 1.4rem; cursor: pointer; z-index: 3;
}
.v329-carousel-prev { left: .8rem; }
.v329-carousel-next { right: .8rem; }
.v329-dots { position: absolute; bottom: .6rem; left: 0; right: 0; display: flex; justify-content: center; gap: .5rem; z-index: 3; }
.v329-dot { width: .8rem; height: .8rem; background: rgba(238,232,170,.4); border-radius: 50%; cursor: pointer; transition: all .2s ease; }
.v329-dot.v329-dot-active { background: var(--v329-primary); width: 2rem; border-radius: .6rem; }

/* ============ SECTIONS ============ */
.v329-section { padding: 1.6rem 0; }
.v329-section-title {
  display: flex; align-items: center; gap: .8rem;
  margin-bottom: 1rem; color: var(--v329-accent);
  font-size: 1.8rem; font-weight: 800;
}
.v329-section-title i { color: var(--v329-primary); }
.v329-section-title::after { content: ""; flex: 1; height: 1px; background: var(--v329-border); }

.v329-card {
  background: var(--v329-bg-card); border: 1px solid var(--v329-border);
  border-radius: var(--v329-radius-sm); padding: 1.2rem;
  box-shadow: var(--v329-shadow); margin-bottom: 1.2rem;
}
.v329-grid { display: grid; gap: 1rem; }
.v329-grid-2 { grid-template-columns: repeat(2, 1fr); }
.v329-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ============ GAME LIST ============ */
.v329-game-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem;
}
.v329-game-card {
  background: var(--v329-bg-card); border: 1px solid var(--v329-border);
  border-radius: var(--v329-radius-sm); padding: .8rem;
  text-align: center; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.v329-game-card:hover { transform: translateY(-2px); border-color: var(--v329-primary); box-shadow: 0 .5rem 1.4rem rgba(184,134,11,.28); }
.v329-game-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: .6rem; margin-bottom: .5rem; }
.v329-game-name { font-size: 1.2rem; color: var(--v329-text); font-weight: 600; line-height: 1.3; word-break: break-word; }

.v329-category-head {
  display: flex; align-items: center; gap: .8rem;
  margin: 1.4rem 0 .8rem; color: var(--v329-primary-soft); font-size: 1.6rem; font-weight: 800;
}
.v329-category-head i { color: var(--v329-primary); }

/* Search box */
.v329-search {
  display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem;
  background: var(--v329-bg-card); border: 1px solid var(--v329-border);
  border-radius: 2rem; margin-bottom: 1rem;
}
.v329-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--v329-text); font-size: 1.4rem;
}
.v329-search input::placeholder { color: var(--v329-text-dim); }

/* ============ INFO / FEATURES / FAQ ============ */
.v329-feature-row {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem;
  background: var(--v329-bg-card); border-radius: var(--v329-radius-sm);
  border-left: .3rem solid var(--v329-primary); margin-bottom: .8rem;
}
.v329-feature-row .v329-feature-ic { color: var(--v329-primary); font-size: 2rem; flex-shrink: 0; }
.v329-feature-row h4 { color: var(--v329-accent); margin: 0 0 .3rem; font-size: 1.4rem; }
.v329-feature-row p { margin: 0; font-size: 1.3rem; }

.v329-faq { background: var(--v329-bg-card); border: 1px solid var(--v329-border); border-radius: var(--v329-radius-sm); margin-bottom: .8rem; overflow: hidden; }
.v329-faq summary { padding: 1rem 1.2rem; cursor: pointer; font-weight: 700; color: var(--v329-accent); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.v329-faq summary::-webkit-details-marker { display: none; }
.v329-faq summary::after { content: "+"; font-size: 1.6rem; color: var(--v329-primary); }
.v329-faq[open] summary::after { content: "-"; }
.v329-faq-body { padding: 0 1.2rem 1rem; color: var(--v329-text-dim); font-size: 1.3rem; }

/* Testimonials */
.v329-testimonial { background: var(--v329-bg-card); border: 1px solid var(--v329-border); border-radius: var(--v329-radius-sm); padding: 1rem; margin-bottom: .8rem; }
.v329-testimonial-stars { color: var(--v329-primary); margin-bottom: .4rem; }
.v329-testimonial-name { font-weight: 700; color: var(--v329-accent); font-size: 1.3rem; }

/* Payment chips */
.v329-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.v329-chip { padding: .6rem 1rem; background: var(--v329-bg-card); border: 1px solid var(--v329-border); border-radius: 2rem; font-size: 1.2rem; color: var(--v329-text); }

/* CTA banner */
.v329-cta {
  background: linear-gradient(135deg, #1a1606 0%, #2a210a 100%);
  border: 1px solid var(--v329-border);
  border-radius: var(--v329-radius); padding: 1.6rem;
  text-align: center; margin: 1.4rem 0;
}
.v329-cta h3 { color: var(--v329-accent); margin-bottom: .6rem; }
.v329-cta p { color: var(--v329-text-dim); margin-bottom: 1rem; }

/* Winners list */
.v329-winner { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; background: var(--v329-bg-card); border: 1px solid var(--v329-border); border-radius: var(--v329-radius-sm); margin-bottom: .6rem; }
.v329-winner-name { color: var(--v329-accent); font-weight: 700; }
.v329-winner-amount { color: var(--v329-primary-soft); font-weight: 800; }

/* Inline SEO link */
.v329-seo-link { color: var(--v329-primary-soft); font-weight: 700; border-bottom: 1px dashed var(--v329-primary); }
.v329-seo-link:hover { color: var(--v329-accent); }

/* ============ FOOTER ============ */
.v329-footer {
  background: #060606; border-top: 1px solid var(--v329-border);
  padding: 1.6rem 1.2rem 9rem;
}
.v329-footer h4 { color: var(--v329-accent); margin-bottom: .8rem; font-size: 1.4rem; }
.v329-footer p { color: var(--v329-text-dim); font-size: 1.3rem; margin-bottom: 1rem; }
.v329-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1.2rem; }
.v329-footer-links a { color: var(--v329-text-dim); font-size: 1.2rem; }
.v329-footer-links a:hover { color: var(--v329-primary-soft); }
.v329-footer-cTA { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.v329-footer-copy { font-size: 1.1rem; color: #666; text-align: center; padding-top: 1rem; border-top: 1px solid rgba(184,134,11,.15); }

/* ============ BOTTOM NAV ============ */
.v329-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--v329-bottom-h);
  background: linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  border-top: 1px solid var(--v329-border);
  display: flex; justify-content: space-around; align-items: stretch;
  z-index: 1000; padding-bottom: env(safe-area-inset-bottom, 0);
}
.v329-bottom-nav-btn {
  flex: 1; min-width: 6rem; min-height: 6rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .2rem; color: var(--v329-text-dim); background: transparent;
  border: none; cursor: pointer; padding: .4rem; text-decoration: none;
  transition: color .2s ease, transform .15s ease;
}
.v329-bottom-nav-btn .v329-ic { font-size: 2.2rem; line-height: 1; }
.v329-bottom-nav-btn .v329-lbl { font-size: 1.1rem; font-weight: 600; }
.v329-bottom-nav-btn:hover { color: var(--v329-accent); transform: translateY(-2px); }
.v329-bottom-nav-btn.v329-bottom-nav-active { color: var(--v329-primary-soft); }
.v329-bottom-nav-btn.v329-bottom-nav-active .v329-ic {
  background: linear-gradient(135deg, var(--v329-primary), var(--v329-primary-soft));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Reveal animation */
.v329-reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.v329-reveal.v329-revealed { opacity: 1; transform: translateY(0); }

/* Tag pill */
.v329-tag { display: inline-block; padding: .2rem .8rem; background: rgba(184,134,11,.15); color: var(--v329-primary-soft); border-radius: 2rem; font-size: 1.1rem; margin-right: .4rem; }

/* ============ DESKTOP ============ */
@media (min-width: 769px) {
  body { padding-top: var(--v329-header-h); }
  .v329-container { max-width: 960px; }
  .v329-game-list { grid-template-columns: repeat(6, 1fr); }
  .v329-grid-3 { grid-template-columns: repeat(6, 1fr); }
  .v329-bottom-nav { display: none; }
  .v329-footer { padding-bottom: 2rem; }
  main { padding-bottom: 1rem !important; }
  .v329-grid-2 { grid-template-columns: repeat(4, 1fr); }
}

/* ============ MOBILE TWEAKS ============ */
@media (max-width: 768px) {
  main { padding-bottom: calc(var(--v329-bottom-h) + 1.6rem); }
  .v329-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Ultra-small (iPhone SE) */
@media (max-width: 360px) {
  html { font-size: 55%; }
  .v329-game-list { grid-template-columns: repeat(2, 1fr); }
  .v329-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* Accessibility: tap targets at least 44px */
.v329-btn, .v329-menu-btn, .v329-bottom-nav-btn { min-height: 44px; min-width: 44px; }
