/* Patokbet Homes - Core Base Styles
   Mobile-first design for 320-430px viewports.
   Palette: #FFD700 (gold) | #FFFFBA (cream) | #FFAA00 (amber) | #262626 (dark) | #FFC0CB (pink)
   All custom classes prefixed with ui3d- */

:root {
  --ui3d-gold: #FFD700;
  --ui3d-cream: #FFFFBA;
  --ui3d-amber: #FFAA00;
  --ui3d-dark: #262626;
  --ui3d-dark-2: #1c1c1c;
  --ui3d-dark-3: #333333;
  --ui3d-pink: #FFC0CB;
  --ui3d-white: #ffffff;
  --ui3d-muted: #c9c4b0;
  --ui3d-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  --ui3d-radius: 12px;
  --ui3d-radius-sm: 8px;
  --ui3d-maxw: 430px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--ui3d-dark);
  color: var(--ui3d-cream);
  line-height: 1.55;
  font-size: 15px;
  max-width: var(--ui3d-maxw);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

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

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

/* ===== Header ===== */
.ui3d-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #1c1c1c 0%, #262626 100%);
  border-bottom: 2px solid var(--ui3d-gold);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--ui3d-shadow);
}

.ui3d-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ui3d-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--ui3d-gold);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ui3d-dark-3);
}

.ui3d-brand-text { display: flex; flex-direction: column; min-width: 0; }
.ui3d-brand-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ui3d-gold);
  letter-spacing: 0.4px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ui3d-brand-tag {
  font-size: 10px;
  color: var(--ui3d-pink);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.ui3d-header-actions { display: flex; gap: 6px; align-items: center; }

.ui3d-btn {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ui3d-btn:active { transform: scale(0.96); }

.ui3d-btn-login {
  background: transparent;
  color: var(--ui3d-cream);
  border: 1.5px solid var(--ui3d-gold);
}
.ui3d-btn-login:hover { background: rgba(255, 215, 0, 0.12); }

.ui3d-btn-register {
  background: linear-gradient(135deg, var(--ui3d-gold) 0%, var(--ui3d-amber) 100%);
  color: var(--ui3d-dark);
  box-shadow: 0 3px 10px rgba(255, 170, 0, 0.4);
}
.ui3d-btn-register:hover { filter: brightness(1.08); }

.ui3d-menu-toggle {
  background: transparent;
  border: none;
  color: var(--ui3d-gold);
  font-size: 22px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
}
.ui3d-menu-toggle:hover { background: rgba(255, 215, 0, 0.1); }

/* ===== Mobile Slide Menu ===== */
.ui3d-slide-menu {
  position: fixed;
  top: 0;
  right: -85%;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: var(--ui3d-dark-2);
  z-index: 100;
  transition: right 0.28s ease;
  overflow-y: auto;
  padding: 18px 16px 80px;
  border-left: 2px solid var(--ui3d-gold);
}
.ui3d-slide-menu.ui3d-open { right: 0; }

.ui3d-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.ui3d-overlay.ui3d-open { opacity: 1; visibility: visible; }

.ui3d-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
}
.ui3d-menu-title { color: var(--ui3d-gold); font-weight: 700; font-size: 16px; }
.ui3d-menu-close {
  background: transparent;
  border: none;
  color: var(--ui3d-cream);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.ui3d-menu-cta { display: flex; gap: 8px; margin-bottom: 18px; }
.ui3d-menu-cta .ui3d-btn { flex: 1; }

.ui3d-menu-section-title {
  color: var(--ui3d-pink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 192, 203, 0.25);
}

.ui3d-menu-list { list-style: none; }
.ui3d-menu-list li a {
  display: block;
  padding: 10px 8px;
  color: var(--ui3d-cream);
  font-size: 14px;
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ui3d-menu-list li a:hover {
  background: rgba(255, 215, 0, 0.1);
  color: var(--ui3d-gold);
  text-decoration: none;
}

/* ===== Layout containers ===== */
.ui3d-main { padding: 0 12px 100px; }
.ui3d-section { margin: 18px 0; }
.ui3d-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.ui3d-section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ui3d-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ui3d-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--ui3d-gold), var(--ui3d-amber));
  border-radius: 2px;
  display: inline-block;
}
.ui3d-more { font-size: 12px; color: var(--ui3d-pink); font-weight: 600; }

/* ===== Hero / Carousel ===== */
.ui3d-hero {
  position: relative;
  border-radius: var(--ui3d-radius);
  overflow: hidden;
  margin: 12px 0;
  box-shadow: var(--ui3d-shadow);
  background: var(--ui3d-dark-3);
}
.ui3d-hero-track {
  display: flex;
  transition: transform 0.5s ease;
}
.ui3d-hero-slide {
  flex: 0 0 100%;
  position: relative;
}
.ui3d-hero-slide img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.ui3d-hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: var(--ui3d-cream);
}
.ui3d-hero-caption h2 {
  font-size: 18px;
  color: var(--ui3d-gold);
  margin-bottom: 4px;
  font-weight: 800;
}
.ui3d-hero-caption p { font-size: 12px; color: var(--ui3d-cream); }

.ui3d-hero-dots {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  gap: 5px;
}
.ui3d-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}
.ui3d-hero-dot.ui3d-active { background: var(--ui3d-gold); width: 18px; border-radius: 4px; }

/* ===== Promo CTA Banner ===== */
.ui3d-promo-banner {
  background: linear-gradient(135deg, #FFAA00 0%, #FFD700 60%, #FFC0CB 100%);
  border-radius: var(--ui3d-radius);
  padding: 14px;
  margin: 14px 0;
  color: var(--ui3d-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(255, 170, 0, 0.35);
}
.ui3d-promo-banner-text { flex: 1; min-width: 0; }
.ui3d-promo-banner-text strong { display: block; font-size: 16px; font-weight: 800; }
.ui3d-promo-banner-text span { font-size: 12px; opacity: 0.85; }
.ui3d-promo-banner .ui3d-btn {
  background: var(--ui3d-dark);
  color: var(--ui3d-gold);
  border: none;
  padding: 10px 16px;
  font-size: 13px;
}

/* ===== Category Chips ===== */
.ui3d-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ui3d-chips::-webkit-scrollbar { display: none; }
.ui3d-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 18px;
  background: var(--ui3d-dark-3);
  color: var(--ui3d-cream);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 215, 0, 0.2);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.ui3d-chip:hover { border-color: var(--ui3d-gold); color: var(--ui3d-gold); }
.ui3d-chip.ui3d-active {
  background: linear-gradient(135deg, var(--ui3d-gold), var(--ui3d-amber));
  color: var(--ui3d-dark);
  border-color: transparent;
}

/* ===== Game Grid ===== */
.ui3d-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (min-width: 360px) {
  .ui3d-grid { gap: 10px; }
}
@media (min-width: 400px) {
  .ui3d-grid.ui3d-grid-5 { grid-template-columns: repeat(5, 1fr); }
}

.ui3d-card {
  background: var(--ui3d-dark-3);
  border-radius: var(--ui3d-radius-sm);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 215, 0, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}
.ui3d-card:hover, .ui3d-card:focus {
  transform: translateY(-2px);
  border-color: var(--ui3d-gold);
  box-shadow: 0 6px 14px rgba(255, 170, 0, 0.25);
}
.ui3d-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #000;
}
.ui3d-card-name {
  padding: 5px 6px 6px;
  font-size: 11px;
  color: var(--ui3d-cream);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.ui3d-card-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(135deg, var(--ui3d-pink), var(--ui3d-amber));
  color: var(--ui3d-dark);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.ui3d-card-play {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ui3d-card:hover .ui3d-card-play { opacity: 1; }
.ui3d-card-play span {
  background: var(--ui3d-gold);
  color: var(--ui3d-dark);
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
}

/* ===== Feature / Info cards ===== */
.ui3d-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.ui3d-feature {
  background: var(--ui3d-dark-3);
  border-radius: var(--ui3d-radius);
  padding: 14px 12px;
  text-align: center;
  border: 1px solid rgba(255, 215, 0, 0.12);
}
.ui3d-feature-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ui3d-gold), var(--ui3d-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--ui3d-dark);
}
.ui3d-feature h3 { font-size: 14px; color: var(--ui3d-gold); margin-bottom: 4px; font-weight: 700; }
.ui3d-feature p { font-size: 11px; color: var(--ui3d-muted); line-height: 1.5; }

/* ===== SEO Content ===== */
.ui3d-content {
  background: var(--ui3d-dark-3);
  border-radius: var(--ui3d-radius);
  padding: 16px 14px;
  margin: 16px 0;
  border-left: 3px solid var(--ui3d-gold);
}
.ui3d-content h2 {
  color: var(--ui3d-gold);
  font-size: 17px;
  margin-bottom: 8px;
  font-weight: 800;
}
.ui3d-content h3 {
  color: var(--ui3d-pink);
  font-size: 14px;
  margin: 12px 0 5px;
  font-weight: 700;
}
.ui3d-content p { font-size: 13px; color: var(--ui3d-cream); margin-bottom: 8px; }
.ui3d-content ul { padding-left: 20px; margin: 6px 0 10px; }
.ui3d-content li { font-size: 13px; color: var(--ui3d-cream); margin-bottom: 4px; }
.ui3d-content a { color: var(--ui3d-gold); }

.ui3d-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}
.ui3d-inline-links a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  background: var(--ui3d-dark-2);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 14px;
  color: var(--ui3d-cream);
}
.ui3d-inline-links a:hover { color: var(--ui3d-gold); border-color: var(--ui3d-gold); text-decoration: none; }

/* ===== Partners strip ===== */
.ui3d-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 0;
}
.ui3d-partner {
  background: var(--ui3d-dark-3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--ui3d-muted);
  border: 1px solid rgba(255, 215, 0, 0.1);
  font-weight: 600;
}

/* ===== Footer ===== */
.ui3d-footer {
  background: var(--ui3d-dark-2);
  border-top: 2px solid var(--ui3d-gold);
  padding: 18px 14px 24px;
  margin-top: 20px;
}
.ui3d-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.ui3d-footer-col h4 {
  color: var(--ui3d-gold);
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.ui3d-footer-col ul { list-style: none; }
.ui3d-footer-col li { margin-bottom: 5px; }
.ui3d-footer-col a { color: var(--ui3d-cream); font-size: 12px; }
.ui3d-footer-col a:hover { color: var(--ui3d-gold); }
.ui3d-footer-desc { font-size: 12px; color: var(--ui3d-muted); margin-bottom: 10px; line-height: 1.6; }
.ui3d-footer-bottom {
  border-top: 1px dashed rgba(255, 215, 0, 0.2);
  padding-top: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--ui3d-muted);
}
.ui3d-footer-bottom p { margin-bottom: 4px; }
.ui3d-disclaimer {
  background: rgba(255, 192, 203, 0.08);
  border: 1px solid rgba(255, 192, 203, 0.25);
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  color: var(--ui3d-pink);
  margin-top: 10px;
  text-align: center;
}

/* ===== Bottom Navigation ===== */
.ui3d-bottomnav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--ui3d-maxw);
  background: linear-gradient(180deg, #1c1c1c 0%, #000 100%);
  border-top: 2px solid var(--ui3d-gold);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  z-index: 60;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.5);
}
.ui3d-navitem {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ui3d-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
  min-height: 52px;
  position: relative;
}
.ui3d-navitem:hover { color: var(--ui3d-gold); text-decoration: none; }
.ui3d-navitem.ui3d-active { color: var(--ui3d-gold); }
.ui3d-navitem.ui3d-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--ui3d-gold);
  border-radius: 0 0 3px 3px;
}
.ui3d-navitem.ui3d-promo {
  color: var(--ui3d-dark);
  background: linear-gradient(135deg, var(--ui3d-gold), var(--ui3d-amber));
  border-radius: 20px;
  margin: 0 2px;
  padding-top: 4px;
  font-weight: 800;
}
.ui3d-navitem.ui3d-promo:hover { color: var(--ui3d-dark); filter: brightness(1.08); }
.ui3d-navitem.ui3d-promo .ui3d-nav-icon { color: var(--ui3d-dark); }

.ui3d-nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ui3d-nav-icon svg { width: 20px; height: 20px; display: block; }
.ui3d-nav-label { font-size: 10px; line-height: 1; letter-spacing: 0.3px; }

/* ===== Utility ===== */
.ui3d-hidden { display: none !important; }
.ui3d-center { text-align: center; }
.ui3d-mt-12 { margin-top: 12px; }

/* ===== Help page reading tools ===== */
.ui3d-page-intro { padding: 18px 14px 12px; border-bottom: 1px solid rgba(255,215,0,.25); }
.ui3d-page-intro h1 { color: var(--ui3d-gold); font-size: 24px; line-height: 1.15; margin-bottom: 8px; letter-spacing: -.3px; }
.ui3d-page-intro p { color: var(--ui3d-cream); font-size: 13px; }
.ui3d-answer { border: 1px solid var(--ui3d-amber); background: rgba(255,170,0,.12); padding: 12px; margin: 14px 0; border-radius: 6px; }
.ui3d-answer strong { color: var(--ui3d-gold); }
.ui3d-faq-list { display: grid; gap: 8px; }
.ui3d-faq-item { background: var(--ui3d-dark-3); border-left: 3px solid var(--ui3d-pink); padding: 12px; border-radius: 5px; }
.ui3d-faq-item h3 { color: var(--ui3d-gold); font-size: 14px; margin-bottom: 5px; }
.ui3d-faq-item p { font-size: 13px; color: var(--ui3d-cream); }
.ui3d-checklist { list-style: none; padding: 0; display: grid; gap: 7px; }
.ui3d-checklist li { background: var(--ui3d-dark-2); padding: 10px 10px 10px 30px; position: relative; border-radius: 4px; font-size: 13px; }
.ui3d-checklist li::before { content: "✓"; position: absolute; left: 10px; color: var(--ui3d-gold); font-weight: 800; }
.ui3d-steprail { display: grid; gap: 8px; counter-reset: rail; }
.ui3d-steprail li { list-style: none; counter-increment: rail; padding: 11px 12px 11px 42px; background: var(--ui3d-dark-3); position: relative; font-size: 13px; border-radius: 5px; }
.ui3d-steprail li::before { content: counter(rail); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; line-height: 22px; text-align: center; background: var(--ui3d-gold); color: var(--ui3d-dark); border-radius: 50%; font-weight: 800; }
.ui3d-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ui3d-mini { background: var(--ui3d-dark-3); padding: 10px; border-top: 2px solid var(--ui3d-amber); border-radius: 4px; }
.ui3d-mini h3 { color: var(--ui3d-pink); font-size: 13px; margin-bottom: 4px; }
.ui3d-mini p { font-size: 12px; color: var(--ui3d-cream); }
.ui3d-page-cta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ui3d-page-cta .ui3d-btn { flex: 1; min-width: 120px; }
.ui3d-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ui3d-table th, .ui3d-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(255,215,0,.18); vertical-align: top; }
.ui3d-table th { color: var(--ui3d-gold); }

/* ===== Wide screen handling - keep mobile canvas ===== */
@media (min-width: 431px) {
  body { box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); }
}
