/* ============================================================
   ph-333 basefiles stylesheet
   All custom classes use the ui17- prefix to avoid clashes.
   Palette: #AFEEEE | #DAA520 | #141414 | #FFE135 | #191970
   ============================================================ */

:root {
  --ui17-primary: #191970;
  --ui17-accent: #DAA520;
  --ui17-highlight: #FFE135;
  --ui17-light: #AFEEEE;
  --ui17-bg: #141414;
  --ui17-bg-alt: #1c1c2e;
  --ui17-text: #f5f5f5;
  --ui17-muted: #b8b8c8;
  --ui17-border: rgba(218, 165, 32, 0.35);
  --ui17-card: #20203a;
  --ui17-danger: #e04848;
  --ui17-success: #34c759;
  --ui17-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  background: var(--ui17-bg);
  color: var(--ui17-text);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

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

a { color: var(--ui17-highlight); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; }

/* ---------- Header ---------- */
.ui17-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #191970 0%, #141414 100%);
  border-bottom: 2px solid var(--ui17-accent);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 430px;
  margin: 0 auto;
}
.ui17-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ui17-highlight);
  font-weight: 800;
  font-size: 1.7rem;
  flex: 1;
  min-width: 0;
}
.ui17-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--ui17-accent);
}
.ui17-brand-name {
  color: var(--ui17-highlight);
  white-space: nowrap;
}
.ui17-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ui17-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 36px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.ui17-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.ui17-btn:active { transform: translateY(0); }
.ui17-btn-login {
  background: transparent;
  color: var(--ui17-light);
  border: 1px solid var(--ui17-light);
}
.ui17-btn-register {
  background: linear-gradient(135deg, #FFE135 0%, #DAA520 100%);
  color: #141414;
  box-shadow: var(--ui17-shadow);
}
.ui17-menu-toggle {
  background: transparent;
  border: none;
  color: var(--ui17-light);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px 6px;
}

/* ---------- Mobile menu ---------- */
.ui17-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.ui17-overlay-show { opacity: 1; pointer-events: auto; }
.ui17-mobile-menu {
  position: fixed;
  top: 0; right: -260px;
  width: 240px;
  height: 100vh;
  background: var(--ui17-primary);
  z-index: 9999;
  padding: 70px 14px 24px;
  transition: right .3s ease;
  overflow-y: auto;
  border-left: 2px solid var(--ui17-accent);
}
.ui17-menu-open { right: 0; }
.ui17-mobile-menu a {
  display: block;
  padding: 12px 10px;
  color: var(--ui17-light);
  border-bottom: 1px solid rgba(175, 238, 238, 0.15);
  font-size: 1.45rem;
}
.ui17-mobile-menu a:hover { color: var(--ui17-highlight); background: rgba(255,225,53,0.08); }
.ui17-menu-close {
  position: absolute;
  top: 12px; right: 14px;
  background: transparent;
  border: none;
  color: var(--ui17-light);
  font-size: 2.4rem;
  cursor: pointer;
}

/* ---------- Layout ---------- */
.ui17-main {
  padding-top: 60px;
  padding-bottom: 80px;
}
.ui17-section {
  padding: 18px 12px;
}
.ui17-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.7rem;
  color: var(--ui17-highlight);
  margin-bottom: 10px;
  border-left: 4px solid var(--ui17-accent);
  padding-left: 10px;
}
.ui17-title-active { color: var(--ui17-highlight); }
.ui17-intro { color: var(--ui17-muted); font-size: 1.4rem; margin-bottom: 10px; }

/* ---------- Hero carousel ---------- */
.ui17-hero {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 0;
  background: #0d0d1a;
}
.ui17-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  cursor: pointer;
}
.ui17-hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.ui17-slide-active { opacity: 1; }
.ui17-hero-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: var(--ui17-highlight);
  font-weight: 700;
  font-size: 1.4rem;
}
.ui17-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 6px;
}
.ui17-hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(175,238,238,0.5);
  cursor: pointer;
}
.ui17-dot-active { background: var(--ui17-highlight); }

/* ---------- Game grid ---------- */
.ui17-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ui17-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ui17-game-card {
  background: var(--ui17-card);
  border-radius: 10px;
  border: 1px solid var(--ui17-border);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
  display: flex;
  flex-direction: column;
}
.ui17-game-card:hover {
  transform: translateY(-2px);
  border-color: var(--ui17-highlight);
}
.ui17-game-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background: #0d0d1a;
}
.ui17-game-name {
  font-size: 1.1rem;
  color: var(--ui17-text);
  text-align: center;
  padding: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui17-cat-tag {
  display: inline-block;
  background: var(--ui17-accent);
  color: #141414;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

/* ---------- Generic card / list ---------- */
.ui17-card {
  background: var(--ui17-card);
  border-radius: 12px;
  border: 1px solid var(--ui17-border);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--ui17-shadow);
}
.ui17-card h3 { color: var(--ui17-highlight); font-size: 1.5rem; margin-bottom: 6px; }
.ui17-card p { color: var(--ui17-muted); font-size: 1.35rem; }

.ui17-promo-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--ui17-highlight);
  font-weight: 700;
  border-bottom: 1px dashed var(--ui17-highlight);
}

/* ---------- RTP table ---------- */
.ui17-rtp-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(175,238,238,0.15);
  font-size: 1.3rem;
}
.ui17-rtp-row span:last-child { color: var(--ui17-success); font-weight: 700; }

/* ---------- Testimonials ---------- */
.ui17-testimonial {
  background: var(--ui17-card);
  border-left: 3px solid var(--ui17-highlight);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 1.3rem;
  color: var(--ui17-muted);
}
.ui17-testimonial strong { color: var(--ui17-light); display: block; margin-bottom: 2px; }

/* ---------- Payment chips ---------- */
.ui17-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ui17-chip {
  background: var(--ui17-bg-alt);
  border: 1px solid var(--ui17-border);
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 1.2rem;
  color: var(--ui17-light);
}

/* ---------- Winners list ---------- */
.ui17-winner {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  background: var(--ui17-bg-alt);
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 1.25rem;
}
.ui17-winner span:last-child { color: var(--ui17-highlight); font-weight: 700; }

/* ---------- CTA banner ---------- */
.ui17-cta {
  background: linear-gradient(135deg, #191970 0%, #DAA520 130%);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin: 14px 0;
  box-shadow: var(--ui17-shadow);
}
.ui17-cta h3 { color: var(--ui17-highlight); font-size: 1.7rem; margin-bottom: 6px; }
.ui17-cta p { color: var(--ui17-light); font-size: 1.3rem; margin-bottom: 10px; }
.ui17-cta .ui17-btn {
  background: var(--ui17-highlight);
  color: #141414;
  padding: 10px 24px;
  font-size: 1.5rem;
}

/* ---------- FAQ ---------- */
.ui17-faq-item {
  border-bottom: 1px solid var(--ui17-border);
  padding: 10px 0;
}
.ui17-faq-item h4 { color: var(--ui17-light); font-size: 1.4rem; margin-bottom: 4px; }
.ui17-faq-item p { color: var(--ui17-muted); font-size: 1.3rem; }

/* ---------- Footer ---------- */
.ui17-footer {
  background: #0d0d1a;
  border-top: 2px solid var(--ui17-accent);
  padding: 20px 12px 30px;
  color: var(--ui17-muted);
}
.ui17-footer-brand { margin-bottom: 12px; font-size: 1.3rem; }
.ui17-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.ui17-footer-links a {
  color: var(--ui17-light);
  font-size: 1.25rem;
}
.ui17-footer-promos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.ui17-footer-promos .ui17-btn {
  background: var(--ui17-accent);
  color: #141414;
  padding: 6px 10px;
  font-size: 1.2rem;
}
.ui17-copyright {
  font-size: 1.15rem;
  text-align: center;
  color: var(--ui17-muted);
  border-top: 1px dashed var(--ui17-border);
  padding-top: 10px;
}

/* ---------- Bottom nav ---------- */
.ui17-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 62px;
  background: linear-gradient(180deg, #1c1c2e 0%, #141414 100%);
  border-top: 2px solid var(--ui17-accent);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1000;
  max-width: 430px;
  margin: 0 auto;
}
.ui17-navbtn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--ui17-light);
  font-size: 1.05rem;
  min-width: 60px;
  min-height: 60px;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
  text-decoration: none;
  padding: 4px 2px;
}
.ui17-navbtn .material-icons,
.ui17-navbtn i { font-size: 22px; }
.ui17-navbtn:hover { color: var(--ui17-highlight); transform: translateY(-1px); }
.ui17-navbtn:active { transform: scale(0.95); }
.ui17-navbtn-active { color: var(--ui17-highlight); }
.ui17-navbtn-active i,
.ui17-navbtn-active .material-icons { color: var(--ui17-highlight); }
.ui17-nav-badge {
  position: absolute;
  top: 6px; right: 50%;
  margin-right: -22px;
  background: var(--ui17-danger);
  color: #fff;
  font-size: 0.9rem;
  padding: 0 4px;
  border-radius: 8px;
  line-height: 1.4;
}
.ui17-navbtn { position: relative; }

/* ---------- Desktop: hide bottom nav ---------- */
@media (min-width: 769px) {
  .ui17-bottom-nav { display: none; }
  body { max-width: 768px; }
  .ui17-grid { grid-template-columns: repeat(5, 1fr); }
  .ui17-grid-4 { grid-template-columns: repeat(6, 1fr); }
}

/* Small screens ensure tap targets >=44px */
@media (max-width: 360px) {
  .ui17-grid { grid-template-columns: repeat(2, 1fr); }
  .ui17-btn { padding: 8px 10px; font-size: 1.2rem; }
}
