/* ============================================================
 * patokbet.click - design-9d26.css
 * Mobile-first premium gaming website styles.
 * All custom classes use the "pg9d-" prefix.
 * Palette: #333333 / #F5F5F5 / #2C3E50 / #DCDCDC
 * ============================================================ */

:root {
  --pg9d-primary: #2C3E50;
  --pg9d-bg: #333333;
  --pg9d-surface: #3c4a5f;
  --pg9d-text: #F5F5F5;
  --pg9d-muted: #DCDCDC;
  --pg9d-accent: #d4af37;
  --pg9d-accent-2: #e6c55a;
  --pg9d-card-bg: #2a3340;
  --pg9d-border: #4a5868;
  --pg9d-success: #2ecc71;
  --pg9d-danger: #e74c3c;
  --pg9d-radius: 12px;
  --pg9d-radius-sm: 8px;
  --pg9d-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  --pg9d-header-h: 56px;
  --pg9d-bottom-h: 64px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--pg9d-bg);
  color: var(--pg9d-text);
  line-height: 1.5;
  font-size: 1.5rem;
  overflow-x: hidden;
}

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

a {
  color: var(--pg9d-accent-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: #ffd966; }

.pg9d-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 14px;
}

.pg9d-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

/* ============================================================
 * HEADER
 * ============================================================ */
.pg9d-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--pg9d-header-h);
  background: linear-gradient(180deg, #2C3E50 0%, #21303f 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

.pg9d-header-hidden {
  transform: translateY(-100%);
}

.pg9d-header-inner {
  max-width: 430px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.pg9d-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pg9d-text);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.3px;
}

.pg9d-logo img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.pg9d-logo .pg9d-logo-text {
  background: linear-gradient(90deg, #ffd966, #d4af37);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pg9d-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg9d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 36px;
  line-height: 1;
}

.pg9d-btn:active { transform: scale(0.96); }

.pg9d-btn-login {
  background: transparent;
  color: var(--pg9d-text);
  border: 1px solid var(--pg9d-muted);
}

.pg9d-btn-login:hover {
  background: rgba(245, 245, 245, 0.08);
}

.pg9d-btn-register {
  background: linear-gradient(90deg, #d4af37, #ffd966);
  color: #2C3E50;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.35);
}

.pg9d-btn-register:hover {
  box-shadow: 0 5px 14px rgba(212, 175, 55, 0.55);
}

.pg9d-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--pg9d-text);
  border: none;
  cursor: pointer;
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pg9d-icon-btn:hover { background: rgba(245, 245, 245, 0.08); }

/* ============================================================
 * MOBILE MENU DRAWER
 * ============================================================ */
.pg9d-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.pg9d-overlay-active {
  opacity: 1;
  visibility: visible;
}

.pg9d-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: #21303f;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 20px 16px;
  overflow-y: auto;
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.45);
}

.pg9d-menu-open {
  transform: translateX(0);
}

.pg9d-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.pg9d-menu-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pg9d-accent-2);
}

.pg9d-menu-section {
  margin-bottom: 22px;
}

.pg9d-menu-section h4 {
  font-size: 1.25rem;
  color: var(--pg9d-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 10px;
}

.pg9d-menu-section a {
  display: block;
  padding: 10px 12px;
  color: var(--pg9d-text);
  font-size: 1.4rem;
  border-radius: var(--pg9d-radius-sm);
  margin-bottom: 4px;
}

.pg9d-menu-section a:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--pg9d-accent-2);
}

/* ============================================================
 * SEARCH BAR
 * ============================================================ */
.pg9d-search-bar {
  display: none;
  padding: 10px 12px;
  background: #21303f;
}

.pg9d-search-active { display: block; }

.pg9d-search-bar input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--pg9d-border);
  background: #1a2632;
  color: var(--pg9d-text);
  font-size: 1.35rem;
  outline: none;
}

/* ============================================================
 * LAYOUT — push content below fixed header
 * ============================================================ */
.pg9d-main {
  padding-top: var(--pg9d-header-h);
  padding-bottom: calc(var(--pg9d-bottom-h) + 16px);
  min-height: 100vh;
}

/* ============================================================
 * HERO + CAROUSEL
 * ============================================================ */
.pg9d-hero {
  position: relative;
  margin: 12px 0 18px;
  border-radius: var(--pg9d-radius);
  overflow: hidden;
  box-shadow: var(--pg9d-shadow);
}

.pg9d-slides {
  position: relative;
  width: 100%;
  height: 200px;
}

.pg9d-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background-size: cover;
  background-position: center;
}

.pg9d-slide-active {
  opacity: 1;
}

.pg9d-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.7) 100%);
}

.pg9d-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.pg9d-slide-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.pg9d-slide-sub {
  font-size: 1.3rem;
  color: var(--pg9d-muted);
  margin: 0 0 10px;
}

.pg9d-slide-btn {
  display: inline-block;
  background: linear-gradient(90deg, #d4af37, #ffd966);
  color: #2C3E50;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 1.3rem;
}

.pg9d-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.pg9d-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(245, 245, 245, 0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.pg9d-dot-active { background: var(--pg9d-accent); }

/* ============================================================
 * SECTION
 * ============================================================ */
.pg9d-section {
  margin: 22px 0;
}

.pg9d-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pg9d-section-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--pg9d-text);
  position: relative;
  padding-left: 12px;
  margin: 0;
}

.pg9d-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #d4af37, #ffd966);
  border-radius: 2px;
}

.pg9d-section-more {
  font-size: 1.25rem;
  color: var(--pg9d-accent-2);
}

/* ============================================================
 * CATEGORY TABS
 * ============================================================ */
.pg9d-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pg9d-tabs::-webkit-scrollbar { display: none; }

.pg9d-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--pg9d-card-bg);
  color: var(--pg9d-muted);
  font-size: 1.3rem;
  cursor: pointer;
  border: 1px solid var(--pg9d-border);
  white-space: nowrap;
}

.pg9d-tab-active {
  background: linear-gradient(90deg, #d4af37, #ffd966);
  color: #2C3E50;
  border-color: transparent;
  font-weight: 600;
}

/* ============================================================
 * GAME GRID
 * ============================================================ */
.pg9d-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pg9d-game-card {
  position: relative;
  border-radius: var(--pg9d-radius-sm);
  overflow: hidden;
  background: var(--pg9d-card-bg);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  display: block;
  text-align: center;
}

.pg9d-game-card:active {
  transform: scale(0.96);
}

.pg9d-game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.pg9d-game-name {
  font-size: 1.15rem;
  color: var(--pg9d-text);
  padding: 6px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.pg9d-game-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--pg9d-danger);
  color: #fff;
  font-size: 0.95rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pg9d-game-badge.hot { background: #e67e22; }
.pg9d-game-badge.new { background: var(--pg9d-success); }

.pg9d-game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
}

.pg9d-game-card:hover .pg9d-game-overlay { opacity: 1; }

/* ============================================================
 * FEATURED BLOCKS (promo cards)
 * ============================================================ */
.pg9d-feature-card {
  background: linear-gradient(135deg, #2C3E50, #1c2836);
  border: 1px solid var(--pg9d-border);
  border-radius: var(--pg9d-radius);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--pg9d-shadow);
}

.pg9d-feature-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: rgba(212, 175, 55, 0.15);
  color: var(--pg9d-accent-2);
}

.pg9d-feature-text h3 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  color: var(--pg9d-text);
}

.pg9d-feature-text p {
  margin: 0;
  font-size: 1.2rem;
  color: var(--pg9d-muted);
  line-height: 1.4;
}

/* ============================================================
 * SEO CONTENT
 * ============================================================ */
.pg9d-seo-content {
  background: #2a3340;
  border-radius: var(--pg9d-radius);
  padding: 18px 16px;
  margin: 18px 0;
  line-height: 1.65;
}

.pg9d-seo-content h2 {
  color: var(--pg9d-accent-2);
  font-size: 1.8rem;
  margin: 14px 0 8px;
}

.pg9d-seo-content h2:first-child { margin-top: 0; }

.pg9d-seo-content h3 {
  color: var(--pg9d-text);
  font-size: 1.45rem;
  margin: 12px 0 6px;
}

.pg9d-seo-content p {
  color: var(--pg9d-muted);
  font-size: 1.3rem;
  margin: 0 0 10px;
}

.pg9d-seo-content ul {
  padding-left: 18px;
  margin: 0 0 12px;
  color: var(--pg9d-muted);
  font-size: 1.3rem;
}

.pg9d-seo-content li {
  margin-bottom: 6px;
}

/* ============================================================
 * FAQ
 * ============================================================ */
.pg9d-faq-list { margin-top: 8px; }

.pg9d-faq-item {
  background: #2a3340;
  border: 1px solid var(--pg9d-border);
  border-radius: var(--pg9d-radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.pg9d-faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: var(--pg9d-text);
  font-size: 1.35rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pg9d-faq-q .pg9d-faq-icon { color: var(--pg9d-accent-2); transition: transform 0.25s; }

.pg9d-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 16px;
  color: var(--pg9d-muted);
  font-size: 1.25rem;
}

.pg9d-faq-open .pg9d-faq-a {
  max-height: 320px;
  padding-bottom: 14px;
}

.pg9d-faq-open .pg9d-faq-icon { transform: rotate(45deg); }

/* ============================================================
 * CTA STRIP
 * ============================================================ */
.pg9d-cta {
  background: linear-gradient(135deg, #2C3E50, #3c4a5f);
  border-radius: var(--pg9d-radius);
  padding: 20px 16px;
  text-align: center;
  margin: 20px 0;
  border: 1px solid var(--pg9d-border);
}

.pg9d-cta h3 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  color: var(--pg9d-accent-2);
}

.pg9d-cta p {
  margin: 0 0 14px;
  color: var(--pg9d-muted);
  font-size: 1.25rem;
}

.pg9d-cta .pg9d-btn { padding: 12px 26px; font-size: 1.4rem; }

/* ============================================================
 * FOOTER
 * ============================================================ */
.pg9d-footer {
  background: #1c2836;
  padding: 22px 14px calc(var(--pg9d-bottom-h) + 22px);
  margin-top: 26px;
  border-top: 1px solid var(--pg9d-border);
}

.pg9d-footer-inner {
  max-width: 430px;
  margin: 0 auto;
}

.pg9d-footer-brand {
  text-align: center;
  margin-bottom: 18px;
}

.pg9d-footer-brand .pg9d-logo {
  justify-content: center;
  margin-bottom: 8px;
}

.pg9d-footer-brand p {
  color: var(--pg9d-muted);
  font-size: 1.2rem;
  line-height: 1.55;
  margin: 0;
}

.pg9d-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.pg9d-footer-links a {
  color: var(--pg9d-muted);
  font-size: 1.2rem;
  padding: 6px 4px;
}

.pg9d-footer-links a:hover { color: var(--pg9d-accent-2); }

.pg9d-footer-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 18px;
}

.pg9d-footer-promo .pg9d-btn {
  background: linear-gradient(90deg, #d4af37, #ffd966);
  color: #2C3E50;
  padding: 9px 16px;
  font-size: 1.2rem;
}

.pg9d-footer-bottom {
  text-align: center;
  color: #8aa0b3;
  font-size: 1.15rem;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
 * MOBILE BOTTOM NAVIGATION
 * ============================================================ */
.pg9d-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--pg9d-bottom-h);
  background: linear-gradient(180deg, #2C3E50 0%, #1c2836 100%);
  border-top: 1px solid var(--pg9d-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.35);
}

.pg9d-bottom-nav .pg9d-nav-btn {
  flex: 1;
  min-width: 60px;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--pg9d-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s ease, transform 0.15s ease;
  padding: 4px 2px;
}

.pg9d-bottom-nav .pg9d-nav-btn .pg9d-nav-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.pg9d-bottom-nav .pg9d-nav-btn:active {
  transform: scale(0.92);
}

.pg9d-bottom-nav .pg9d-nav-btn:hover {
  color: var(--pg9d-accent-2);
}

.pg9d-bottom-nav .pg9d-nav-btn.is-active {
  color: var(--pg9d-accent-2);
}

.pg9d-bottom-nav .pg9d-nav-btn.is-active .pg9d-nav-icon {
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
}

/* Center highlight button */
.pg9d-nav-btn.pg9d-nav-center {
  position: relative;
}

.pg9d-nav-btn.pg9d-nav-center .pg9d-nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #ffd966);
  color: #2C3E50;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin-top: -18px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
  border: 3px solid #1c2836;
}

/* ============================================================
 * BACK TO TOP
 * ============================================================ */
.pg9d-top-btn {
  position: fixed;
  right: 14px;
  bottom: calc(var(--pg9d-bottom-h) + 14px);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pg9d-primary);
  color: var(--pg9d-text);
  border: 1px solid var(--pg9d-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.8rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  z-index: 900;
}

.pg9d-top-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================================================
 * UTILITY
 * ============================================================ */
.pg9d-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pg9d-text-center { text-align: center; }
.pg9d-mt-12 { margin-top: 12px; }
.pg9d-mt-18 { margin-top: 18px; }
.pg9d-mt-24 { margin-top: 24px; }

.pg9d-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--pg9d-accent-2);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ============================================================
 * RESPONSIVE — desktop adjustments
 * ============================================================ */
@media (min-width: 768px) {
  body { background: #2a3340; }
  .pg9d-container, .pg9d-wrapper, .pg9d-header-inner, .pg9d-footer-inner {
    max-width: 430px;
  }
  .pg9d-bottom-nav { display: none; }
  .pg9d-main {
    padding-bottom: 30px;
  }
  .pg9d-footer {
    padding-bottom: 24px;
  }
}

@media (min-width: 769px) {
  .pg9d-bottom-nav { display: none !important; }
  .pg9d-main { padding-bottom: 32px; }
}

@media (max-width: 768px) {
  .pg9d-main {
    padding-bottom: calc(var(--pg9d-bottom-h) + 16px);
  }
}

@media (max-width: 360px) {
  .pg9d-grid { grid-template-columns: repeat(2, 1fr); }
  .pg9d-btn { padding: 7px 11px; font-size: 1.2rem; }
}
