/* Open 88 layout - basefile (prefix: pg66-) */
/* Palette: #2C3E50 | #FF7F50 | #20B2AA | #CD5C5C | #1C2833 */
/* Code comments in English. Mobile-first, max-width 430px. */

:root {
  --pg66-primary: #FF7F50;
  --pg66-secondary: #20B2AA;
  --pg66-accent: #CD5C5C;
  --pg66-bg: #1C2833;
  --pg66-bg2: #2C3E50;
  --pg66-text: #F5F7FA;
  --pg66-muted: #B0BEC5;
  --pg66-gold: #F2C94C;
  --pg66-radius: 14px;
  --pg66-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  --pg66-header-h: 58px;
  --pg66-bottomnav-h: 62px;
}

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

html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, var(--pg66-bg) 0%, var(--pg66-bg2) 100%);
  color: var(--pg66-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a { color: var(--pg66-primary); text-decoration: none; }

.pg66-wrapper {
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* ===== Header ===== */
.pg66-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  height: var(--pg66-header-h);
  background: rgba(28, 40, 51, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 127, 80, 0.25);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  transition: background 0.3s ease;
}
.pg66-header-scrolled { background: rgba(28, 40, 51, 1); box-shadow: var(--pg66-shadow); }

.pg66-brand { display: flex; align-items: center; gap: 0.6rem; }
.pg66-brand img { width: 30px; height: 30px; border-radius: 8px; }
.pg66-brand-name { font-weight: 800; font-size: 1.6rem; color: var(--pg66-primary); letter-spacing: 0.3px; }

.pg66-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.pg66-btn {
  border: none; cursor: pointer; border-radius: 20px;
  font-size: 1.2rem; font-weight: 700; padding: 0.5rem 1.1rem;
  transition: transform 0.15s ease, opacity 0.2s ease;
  min-height: 34px;
}
.pg66-btn:active { transform: scale(0.94); }
.pg66-btn-login { background: transparent; color: var(--pg66-text); border: 1px solid var(--pg66-secondary); }
.pg66-btn-register { background: linear-gradient(135deg, var(--pg66-primary), var(--pg66-accent)); color: #fff; box-shadow: 0 3px 10px rgba(255,127,80,0.4); }

.pg66-menu-btn {
  background: transparent; border: none; color: var(--pg66-text);
  font-size: 1.8rem; cursor: pointer; padding: 0.4rem 0.6rem; min-width: 40px; min-height: 40px;
}

/* ===== Mobile menu ===== */
.pg66-mobile-menu {
  position: fixed; top: var(--pg66-header-h); left: 0; right: 0;
  max-width: 430px; margin: 0 auto;
  background: var(--pg66-bg2);
  border-bottom: 1px solid rgba(255,127,80,0.2);
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  z-index: 9999;
}
.pg66-menu-open { max-height: 520px; box-shadow: var(--pg66-shadow); }
.pg66-mobile-menu a {
  display: block; padding: 1.1rem 1.4rem; color: var(--pg66-text);
  border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 1.4rem;
}
.pg66-mobile-menu a:active { background: rgba(255,127,80,0.12); }
.pg66-mobile-menu a i { color: var(--pg66-primary); margin-right: 0.7rem; width: 20px; }

/* ===== Main ===== */
.pg66-main { padding-top: calc(var(--pg66-header-h) + 10px); padding-bottom: 90px; }

/* ===== Carousel ===== */
.pg66-carousel {
  position: relative; width: 100%; height: 200px; border-radius: var(--pg66-radius);
  overflow: hidden; margin: 1rem 0; box-shadow: var(--pg66-shadow);
}
.pg66-slides { position: relative; width: 100%; height: 100%; }
.pg66-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease;
  cursor: pointer;
}
.pg66-slide img { width: 100%; height: 100%; object-fit: cover; }
.pg66-slide-active { opacity: 1; }
.pg66-slide-caption {
  position: absolute; left: 1rem; bottom: 1.2rem; color: #fff;
  font-size: 1.4rem; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  z-index: 2;
}
.pg66-dots { position: absolute; bottom: 0.8rem; right: 1rem; display: flex; gap: 0.4rem; z-index: 3; }
.pg66-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.pg66-dot-active { background: var(--pg66-primary); width: 18px; border-radius: 4px; }

/* ===== Section ===== */
.pg66-section { padding: 1.4rem 1.2rem; }
.pg66-section-title {
  font-size: 1.7rem; font-weight: 800; margin-bottom: 0.8rem;
  color: var(--pg66-text); display: flex; align-items: center; gap: 0.5rem;
}
.pg66-section-title i { color: var(--pg66-primary); }
.pg66-section-sub { color: var(--pg66-muted); font-size: 1.25rem; margin-bottom: 1rem; }

.pg66-h1 {
  font-size: 2rem; font-weight: 900; line-height: 1.3;
  color: var(--pg66-primary); margin: 0.5rem 0 1rem; padding: 0 1.2rem;
}

/* ===== Game grid ===== */
.pg66-game-tabs { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.5rem 1.2rem 1rem; scrollbar-width: none; }
.pg66-game-tabs::-webkit-scrollbar { display: none; }
.pg66-game-tab {
  white-space: nowrap; padding: 0.5rem 1rem; border-radius: 20px;
  background: rgba(255,255,255,0.06); color: var(--pg66-muted); font-size: 1.2rem; font-weight: 600;
}
.pg66-game-tab-active { background: linear-gradient(135deg, var(--pg66-primary), var(--pg66-accent)); color: #fff; }

.pg66-game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; padding: 0 1.2rem;
}
.pg66-game-card {
  background: rgba(255,255,255,0.04); border-radius: 12px; padding: 0.6rem;
  text-align: center; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255,255,255,0.06);
}
.pg66-game-card:active { transform: scale(0.95); box-shadow: 0 4px 14px rgba(255,127,80,0.3); }
.pg66-game-card img { width: 100%; height: 78px; object-fit: cover; border-radius: 8px; }
.pg66-game-name { font-size: 1.05rem; color: var(--pg66-text); margin-top: 0.4rem; line-height: 1.2rem; min-height: 2.4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pg66-cat-head { font-size: 1.4rem; font-weight: 700; color: var(--pg66-secondary); margin: 1.4rem 1.2rem 0.6rem; }

/* ===== Cards / Features ===== */
.pg66-card {
  background: rgba(255,255,255,0.04); border-radius: var(--pg66-radius); padding: 1.2rem;
  margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.06);
}
.pg66-card-title { font-size: 1.45rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--pg66-primary); }
.pg66-card p { color: var(--pg66-muted); margin-bottom: 0.6rem; font-size: 1.25rem; }

.pg66-feature-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.7rem; }
.pg66-feature-item { background: rgba(32,178,170,0.1); border-radius: 10px; padding: 0.9rem; text-align: center; }
.pg66-feature-item i { font-size: 2.2rem; color: var(--pg66-secondary); margin-bottom: 0.4rem; }
.pg66-feature-item span { display: block; font-size: 1.15rem; color: var(--pg66-text); font-weight: 600; }

/* ===== Promo link / play now ===== */
.pg66-play-cta {
  display: block; text-align: center; padding: 1.1rem; margin: 1rem 1.2rem;
  background: linear-gradient(135deg, var(--pg66-primary), var(--pg66-accent));
  color: #fff; font-weight: 800; font-size: 1.4rem; border-radius: 30px;
  box-shadow: 0 6px 18px rgba(255,127,80,0.45); cursor: pointer;
}
.pg66-play-cta:active { transform: scale(0.97); }
.pg66-text-link { color: var(--pg66-primary); font-weight: 700; }

/* ===== RTP table ===== */
.pg66-rtp-row { display: flex; justify-content: space-between; padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 1.2rem; }
.pg66-rtp-row span:last-child { color: var(--pg66-gold); font-weight: 700; }

/* ===== Testimonials ===== */
.pg66-testi { background: rgba(255,255,255,0.04); border-radius: 10px; padding: 0.9rem; margin-bottom: 0.7rem; }
.pg66-testi-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.pg66-testi-head i { color: var(--pg66-gold); }
.pg66-testi-name { font-weight: 700; color: var(--pg66-text); font-size: 1.2rem; }
.pg66-testi p { color: var(--pg66-muted); font-size: 1.15rem; }

/* ===== Winners ===== */
.pg66-winner { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 1.15rem; }
.pg66-winner span:last-child { color: var(--pg66-gold); font-weight: 700; }

/* ===== Payment / app ===== */
.pg66-pay-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.pg66-pay-chip { background: rgba(255,255,255,0.08); padding: 0.4rem 0.8rem; border-radius: 16px; font-size: 1.1rem; color: var(--pg66-text); }
.pg66-app-cta { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.pg66-app-btn { flex: 1; text-align: center; padding: 0.8rem; border-radius: 10px; background: rgba(32,178,170,0.15); color: var(--pg66-text); font-weight: 700; font-size: 1.15rem; cursor: pointer; }

/* ===== FAQ ===== */
.pg66-faq-item { border-bottom: 1px solid rgba(255,255,255,0.07); padding: 0.8rem 0; }
.pg66-faq-q { font-weight: 700; color: var(--pg66-text); font-size: 1.3rem; margin-bottom: 0.3rem; }
.pg66-faq-a { color: var(--pg66-muted); font-size: 1.2rem; }

/* ===== Footer ===== */
.pg66-footer { background: var(--pg66-bg2); padding: 1.6rem 1.2rem 2rem; border-top: 1px solid rgba(255,127,80,0.2); }
.pg66-footer-brand { font-size: 1.5rem; font-weight: 800; color: var(--pg66-primary); margin-bottom: 0.5rem; }
.pg66-footer-desc { color: var(--pg66-muted); font-size: 1.15rem; margin-bottom: 1rem; }
.pg66-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 0.9rem; }
.pg66-footer-links a { color: var(--pg66-text); font-size: 1.15rem; }
.pg66-footer-promos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.pg66-footer-promos button { background: linear-gradient(135deg, var(--pg66-primary), var(--pg66-accent)); border: none; color: #fff; padding: 0.5rem 0.9rem; border-radius: 16px; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.pg66-footer-copy { color: var(--pg66-muted); font-size: 1.1rem; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 0.8rem; text-align: center; }

/* ===== Bottom nav ===== */
.pg66-bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 430px; margin: 0 auto;
  height: var(--pg66-bottomnav-h);
  background: rgba(28,40,51,0.98);
  border-top: 1px solid rgba(255,127,80,0.3);
  display: flex; justify-content: space-around; align-items: center;
  z-index: 1000; box-shadow: 0 -4px 18px rgba(0,0,0,0.4);
}
.pg66-bottomnav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; min-width: 60px; min-height: 60px; gap: 2px;
  background: transparent; border: none; color: var(--pg66-muted); cursor: pointer;
  text-decoration: none; transition: color 0.2s ease, transform 0.15s ease;
}
.pg66-bottomnav-btn i, .pg66-bottomnav-btn .material-icons-outlined,
.pg66-bottomnav-btn .ion { font-size: 24px; }
.pg66-bottomnav-btn span { font-size: 1rem; }
.pg66-bottomnav-btn:active { transform: scale(0.9); }
.pg66-bottomnav-active { color: var(--pg66-primary); }
.pg66-bottomnav-active i, .pg66-bottomnav-active .material-icons-outlined { color: var(--pg66-primary); }
.pg66-nav-badge { position: relative; }
.pg66-nav-badge::after { content: '1'; position: absolute; top: -2px; right: 18px; background: var(--pg66-accent); color: #fff; font-size: 0.9rem; padding: 0 4px; border-radius: 8px; }

/* ===== Desktop ===== */
@media (min-width: 769px) {
  .pg66-bottomnav { display: none; }
  .pg66-wrapper { max-width: 900px; }
  .pg66-game-grid { grid-template-columns: repeat(6, 1fr); }
  .pg66-feature-grid { grid-template-columns: repeat(4,1fr); }
  .pg66-footer-links a:hover { color: var(--pg66-primary); }
}

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