/**
 * King Casino Phlwin - Layout Stylesheet
 * CSS class prefix: ui65-
 * Color palette: #FFF176 (yellow), #FF5722 (orange), #2D2D2D (dark),
 *               #F5DEB3 (wheat), #CD853F (peru), #6C757D (gray)
 */

/* ===== CSS Variables ===== */
:root {
  --ui65-yellow: #FFF176;
  --ui65-orange: #FF5722;
  --ui65-dark: #2D2D2D;
  --ui65-wheat: #F5DEB3;
  --ui65-peru: #CD853F;
  --ui65-gray: #6C757D;
  --ui65-bg: #1A1A1A;
  --ui65-card: #333333;
  --ui65-text: #FFFFFF;
  --ui65-text-muted: #B0B0B0;
  --ui65-radius: 10px;
  --ui65-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--ui65-bg);
  color: var(--ui65-text);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

a { color: var(--ui65-yellow); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--ui65-orange); }

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

/* ===== Header ===== */
.ui65-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--ui65-dark) 0%, #1F1F1F 100%);
  border-bottom: 2px solid var(--ui65-peru);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.ui65-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.ui65-header-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.ui65-header-logo span {
  font-size: 16px;
  font-weight: 700;
  color: var(--ui65-yellow);
  letter-spacing: 0.5px;
}

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

.ui65-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.ui65-btn-register {
  background: linear-gradient(135deg, var(--ui65-orange), #E64A19);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.4);
}

.ui65-btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.6);
}

.ui65-btn-login {
  background: transparent;
  color: var(--ui65-yellow);
  border: 1.5px solid var(--ui65-yellow);
}

.ui65-btn-login:hover {
  background: var(--ui65-yellow);
  color: var(--ui65-dark);
}

.ui65-menu-toggle {
  background: none;
  border: none;
  color: var(--ui65-wheat);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* ===== Mobile Menu ===== */
.ui65-mobile-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  z-index: 9999;
  background: linear-gradient(180deg, #1F1F1F, #111111);
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 20px 16px;
}

.proa4d-menu-active { left: 0 !important; }

.ui65-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ui65-peru);
}

.ui65-mobile-menu-header h3 {
  color: var(--ui65-yellow);
  font-size: 18px;
}

.ui65-mobile-menu-close {
  background: none;
  border: none;
  color: var(--ui65-text-muted);
  font-size: 22px;
  cursor: pointer;
}

.ui65-mobile-menu-section {
  margin-bottom: 20px;
}

.ui65-mobile-menu-section h4 {
  color: var(--ui65-peru);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-left: 8px;
}

.ui65-mobile-menu-section a {
  display: block;
  padding: 10px 12px;
  color: var(--ui65-wheat);
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.ui65-mobile-menu-section a:hover {
  background: rgba(255, 241, 118, 0.1);
  color: var(--ui65-yellow);
}

/* ===== Overlay ===== */
.ui65-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  display: none;
}

.proa4d-overlay-active { display: block !important; }

/* ===== Banner / Hero ===== */
.ui65-banner {
  margin-top: 56px;
  position: relative;
  overflow: hidden;
  background: var(--ui65-dark);
  border-bottom: 2px solid var(--ui65-peru);
}

.ui65-banner-slide {
  display: none;
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
}

.ui65-banner-slide:first-child { display: block; }

.ui65-banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.ui65-banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s;
  border: none;
}

.proa4d-dot-active, .ui65-banner-dot:hover {
  background: var(--ui65-yellow);
}

/* ===== Hero CTA ===== */
.ui65-hero-cta {
  text-align: center;
  padding: 30px 16px 20px;
  background: linear-gradient(180deg, var(--ui65-dark), var(--ui65-bg));
}

.ui65-hero-cta h1 {
  font-size: 26px;
  color: var(--ui65-yellow);
  margin-bottom: 8px;
  font-weight: 800;
}

.ui65-hero-cta p {
  color: var(--ui65-text-muted);
  font-size: 14px;
  margin-bottom: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.ui65-hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.ui65-btn-large {
  padding: 12px 32px;
  font-size: 16px;
  border-radius: 8px;
}

/* ===== Main Content ===== */
.ui65-main {
  padding: 20px 12px;
  max-width: 430px;
  margin: 0 auto;
}

/* ===== Section Titles ===== */
.ui65-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ui65-peru);
}

.ui65-section-title h2 {
  font-size: 20px;
  color: var(--ui65-yellow);
  font-weight: 700;
}

.ui65-section-title a {
  font-size: 13px;
  color: var(--ui65-orange);
}

/* ===== Game Grid ===== */
.ui65-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.ui65-game-card {
  background: var(--ui65-card);
  border-radius: var(--ui65-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.ui65-game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ui65-shadow);
}

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

.ui65-game-card .ui65-game-name {
  padding: 6px 8px;
  font-size: 11px;
  color: var(--ui65-wheat);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui65-game-card .ui65-game-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--ui65-orange);
  color: #fff;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ===== Category Tabs ===== */
.ui65-category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.ui65-category-tabs::-webkit-scrollbar { display: none; }

.ui65-cat-tab {
  padding: 8px 16px;
  background: var(--ui65-card);
  border: 1.5px solid transparent;
  border-radius: 20px;
  color: var(--ui65-text-muted);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.ui65-cat-tab:hover { color: var(--ui65-yellow); border-color: var(--ui65-peru); }

.proa4d-tab-active {
  background: var(--ui65-peru) !important;
  color: #fff !important;
  border-color: var(--ui65-yellow) !important;
}

/* ===== Why Choose Section ===== */
.ui65-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.ui65-feature-card {
  background: var(--ui65-card);
  border-radius: var(--ui65-radius);
  padding: 16px 12px;
  text-align: center;
  border: 1px solid rgba(205, 133, 63, 0.3);
}

.ui65-feature-card i, .ui65-feature-card span.material-symbols-outlined {
  font-size: 28px;
  color: var(--ui65-yellow);
  margin-bottom: 8px;
}

.ui65-feature-card h3 {
  font-size: 14px;
  color: var(--ui65-wheat);
  margin-bottom: 4px;
}

.ui65-feature-card p {
  font-size: 12px;
  color: var(--ui65-text-muted);
}

/* ===== Promo Banner ===== */
.ui65-promo-banner {
  background: linear-gradient(135deg, var(--ui65-orange), #BF360C);
  border-radius: var(--ui65-radius);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 24px;
}

.ui65-promo-banner h3 {
  color: var(--ui65-yellow);
  font-size: 20px;
  margin-bottom: 6px;
}

.ui65-promo-banner p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin-bottom: 14px;
}

/* ===== Footer ===== */
.ui65-footer {
  background: linear-gradient(180deg, var(--ui65-dark), #111);
  border-top: 2px solid var(--ui65-peru);
  padding: 24px 16px 16px;
  margin-top: 20px;
}

.ui65-footer-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(205, 133, 63, 0.3);
}

.ui65-footer-partners img {
  height: 28px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.ui65-footer-partners img:hover { opacity: 1; }

.ui65-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-bottom: 16px;
}

.ui65-footer-links a {
  font-size: 12px;
  color: var(--ui65-text-muted);
}

.ui65-footer-links a:hover { color: var(--ui65-yellow); }

.ui65-footer-copy {
  text-align: center;
  font-size: 12px;
  color: var(--ui65-gray);
}

/* ===== Bottom Navigation ===== */
.ui65-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #1F1F1F, #111);
  border-top: 2px solid var(--ui65-peru);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  padding: 0 4px;
}

.ui65-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 56px;
  background: none;
  border: none;
  color: var(--ui65-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 2px;
}

.ui65-bottom-nav-btn i,
.ui65-bottom-nav-btn span.material-symbols-outlined,
.ui65-bottom-nav-btn span.bi {
  font-size: 22px;
  transition: color 0.2s, transform 0.2s;
}

.ui65-bottom-nav-btn span:last-child {
  font-size: 10px;
  font-family: 'Segoe UI', sans-serif;
}

.ui65-bottom-nav-btn:hover,
.proa4d-nav-active {
  color: var(--ui65-yellow);
}

.proa4d-nav-active i,
.proa4d-nav-active span.material-symbols-outlined,
.proa4d-nav-active span.bi {
  transform: scale(1.15);
  color: var(--ui65-yellow);
}

/* ===== Back to Top ===== */
.ui65-scroll-top {
  position: fixed;
  bottom: 72px;
  right: 16px;
  z-index: 999;
  width: 40px;
  height: 40px;
  background: var(--ui65-peru);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--ui65-shadow);
  transition: background 0.3s;
}

.ui65-scroll-top:hover { background: var(--ui65-orange); }

/* ===== Help Page Content ===== */
.ui65-content-section {
  margin-top: 56px;
  padding: 20px 16px 20px;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
}

.ui65-content-section h1 {
  font-size: 22px;
  color: var(--ui65-yellow);
  margin-bottom: 12px;
  line-height: 1.3;
}

.ui65-content-section h2 {
  font-size: 18px;
  color: var(--ui65-peru);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ui65-peru);
}

.ui65-content-section h3 {
  font-size: 16px;
  color: var(--ui65-wheat);
  margin: 14px 0 8px;
}

.ui65-content-section p {
  font-size: 14px;
  color: var(--ui65-text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

.ui65-content-section ul, .ui65-content-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.ui65-content-section li {
  font-size: 14px;
  color: var(--ui65-text-muted);
  margin-bottom: 6px;
  line-height: 1.6;
}

.ui65-cta-box {
  background: linear-gradient(135deg, var(--ui65-orange), #BF360C);
  border-radius: var(--ui65-radius);
  padding: 20px;
  text-align: center;
  margin: 20px 0;
}

.ui65-cta-box h3 {
  color: var(--ui65-yellow);
  font-size: 18px;
  margin-bottom: 8px;
}

.ui65-cta-box p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ===== Responsive ===== */
@media (min-width: 769px) {
  .ui65-bottom-nav { display: none; }
  .ui65-main { max-width: 768px; padding: 24px 20px; }
  .ui65-content-section { max-width: 768px; }
  .ui65-game-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .ui65-features { grid-template-columns: repeat(3, 1fr); }
  .ui65-banner-slide { aspect-ratio: 21/8; }
}

@media (max-width: 768px) {
  .ui65-main { padding-bottom: 80px; }
  .ui65-content-section { padding-bottom: 80px; }
}

@media (max-width: 360px) {
  .ui65-game-grid { grid-template-columns: repeat(2, 1fr); }
  .ui65-hero-cta h1 { font-size: 22px; }
}
