/* ph444 official website - Core Stylesheet | prefix: sddf- | Palette: #2E4057 #FFE135 #EEEEEE */
:root {
  --sddf-primary: #2E4057;
  --sddf-accent: #FFE135;
  --sddf-light: #EEEEEE;
  --sddf-dark-2: #1f2d3d;
  --sddf-dark-3: #243a55;
  --sddf-text-dim: #c7d0db;
  --sddf-success: #2ecc71;
  --sddf-danger: #e74c3c;
  --sddf-radius: 12px;
  --sddf-radius-lg: 18px;
  --sddf-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  --sddf-transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--sddf-primary);
  color: var(--sddf-light);
  line-height: 1.5rem;
  font-size: 1.5rem;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--sddf-accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.sddf-skip-link {
  position: absolute; left: -999px; top: 0; z-index: 9999;
  background: var(--sddf-accent); color: var(--sddf-primary);
  padding: 8px 16px; border-radius: 0 0 8px 0;
}
.sddf-skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.sddf-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, var(--sddf-dark-2) 0%, var(--sddf-primary) 100%);
  border-bottom: 2px solid rgba(255, 225, 53, 0.35);
  padding: 0 12px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  transition: box-shadow var(--sddf-transition);
}
.sddf-header-scrolled { box-shadow: 0 4px 14px rgba(0,0,0,0.45); }
.sddf-header-brand {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.sddf-header-logo {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid rgba(255, 225, 53, 0.55);
  background: var(--sddf-dark-3);
}
.sddf-header-title {
  font-size: 1.5rem; font-weight: 700;
  color: var(--sddf-accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 130px;
}
.sddf-header-actions {
  display: flex; align-items: center; gap: 6px;
}
.sddf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 34px; padding: 0 14px;
  border-radius: 999px;
  font-size: 1.25rem; font-weight: 700;
  transition: transform var(--sddf-transition), box-shadow var(--sddf-transition);
  white-space: nowrap;
}
.sddf-btn:active { transform: scale(0.96); }
.sddf-btn-register {
  background: var(--sddf-accent);
  color: var(--sddf-primary);
  box-shadow: 0 2px 8px rgba(255, 225, 53, 0.4);
}
.sddf-btn-login {
  background: transparent;
  color: var(--sddf-accent);
  border: 1.5px solid var(--sddf-accent);
}
.sddf-nav-toggle {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255, 225, 53, 0.12);
  color: var(--sddf-accent);
}

/* ---------- Mobile dropdown menu ---------- */
.sddf-mobile-menu {
  position: fixed; top: 56px; left: 0; right: 0;
  background: var(--sddf-dark-2);
  border-bottom: 2px solid var(--sddf-accent);
  padding: 8px 12px 14px;
  z-index: 9999;
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-top: 0; padding-bottom: 0;
}
.sddf-mobile-menu.sddf-is-open {
  max-height: 80vh; overflow-y: auto;
  padding-top: 8px; padding-bottom: 14px;
}
.sddf-mobile-menu a {
  display: block;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 225, 53, 0.15);
  color: var(--sddf-light);
  font-size: 1.4rem;
}
.sddf-mobile-menu a:active { background: rgba(255, 225, 53, 0.08); }

/* ---------- Layout ---------- */
.sddf-main {
  padding-top: 56px;
  padding-bottom: 80px;
  max-width: 430px;
  margin: 0 auto;
}
.sddf-section { padding: 22px 14px 10px; }
.sddf-section-title {
  font-size: 1.75rem; font-weight: 700;
  color: var(--sddf-accent);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.sddf-section-sub { color: var(--sddf-text-dim); font-size: 1.3rem; margin-bottom: 12px; }
.sddf-container { width: 100%; }

/* ---------- Carousel ---------- */
.sddf-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--sddf-radius-lg);
  margin: 14px 0 4px;
  box-shadow: var(--sddf-shadow);
}
.sddf-carousel-track { display: flex; transition: transform 0.5s ease; }
.sddf-carousel-slide { min-width: 100%; position: relative; cursor: pointer; }
.sddf-carousel-slide img {
  width: 100%; height: 200px; object-fit: cover;
}
.sddf-carousel-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: var(--sddf-accent);
  font-weight: 700;
  font-size: 1.35rem;
}
.sddf-carousel-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.sddf-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background var(--sddf-transition);
}
.sddf-carousel-dot.sddf-active {
  background: var(--sddf-accent);
}

/* ---------- Game grid ---------- */
.sddf-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 0 6px;
}
.sddf-cat-title {
  font-size: 1.55rem; font-weight: 700;
  color: var(--sddf-accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.sddf-cat-link {
  font-size: 1.2rem; color: var(--sddf-light);
  text-decoration: underline;
}
.sddf-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sddf-game-card {
  background: var(--sddf-dark-3);
  border-radius: var(--sddf-radius);
  padding: 6px;
  text-align: center;
  transition: transform var(--sddf-transition), box-shadow var(--sddf-transition);
  border: 1px solid rgba(255, 225, 53, 0.08);
}
.sddf-game-card:active { transform: scale(0.95); }
.sddf-game-card img { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.sddf-game-name {
  font-size: 1.15rem; color: var(--sddf-light);
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Feature cards ---------- */
.sddf-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sddf-feature-card {
  background: var(--sddf-dark-3);
  border-radius: var(--sddf-radius);
  padding: 14px 10px;
  text-align: center;
  border: 1px solid rgba(255, 225, 53, 0.12);
}
.sddf-feature-icon { font-size: 26px; color: var(--sddf-accent); margin-bottom: 6px; }
.sddf-feature-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; color: var(--sddf-accent); }
.sddf-feature-desc { font-size: 1.15rem; color: var(--sddf-text-dim); line-height: 1.4rem; }

/* ---------- Promo / Winners / Testimonials ---------- */
.sddf-card-list { display: flex; flex-direction: column; gap: 10px; }
.sddf-card {
  background: var(--sddf-dark-3);
  border-radius: var(--sddf-radius);
  padding: 12px;
  display: flex; gap: 10px; align-items: center;
  border-left: 3px solid var(--sddf-accent);
}
.sddf-card-icon { font-size: 24px; color: var(--sddf-accent); flex-shrink: 0; }
.sddf-card-body h4 { font-size: 1.3rem; color: var(--sddf-accent); margin-bottom: 2px; }
.sddf-card-body p { font-size: 1.15rem; color: var(--sddf-text-dim); }
.sddf-card-amount { color: var(--sddf-success); font-weight: 700; }

.sddf-promo-banner {
  background: linear-gradient(135deg, var(--sddf-dark-3) 0%, var(--sddf-primary) 100%);
  border-radius: var(--sddf-radius-lg);
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(255, 225, 53, 0.3);
  margin: 10px 0;
}
.sddf-promo-banner h3 { color: var(--sddf-accent); font-size: 1.7rem; margin-bottom: 6px; }
.sddf-promo-banner p { color: var(--sddf-light); font-size: 1.25rem; margin-bottom: 10px; }

/* ---------- Payment methods ---------- */
.sddf-pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sddf-pay-item {
  background: var(--sddf-light);
  color: var(--sddf-primary);
  border-radius: 8px;
  padding: 10px 4px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.sddf-faq-item {
  background: var(--sddf-dark-3);
  border-radius: var(--sddf-radius);
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 225, 53, 0.1);
}
.sddf-faq-q {
  padding: 12px 14px;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--sddf-light);
}
.sddf-faq-q i { color: var(--sddf-accent); }
.sddf-faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 14px;
  color: var(--sddf-text-dim);
  font-size: 1.2rem;
}
.sddf-faq-item.sddf-faq-open .sddf-faq-a { max-height: 200px; padding: 0 14px 12px; }
.sddf-faq-item.sddf-faq-open .sddf-faq-toggle { transform: rotate(45deg); }

/* ---------- App CTA ---------- */
.sddf-app-cta {
  background: linear-gradient(135deg, var(--sddf-accent) 0%, #ffd400 100%);
  color: var(--sddf-primary);
  border-radius: var(--sddf-radius-lg);
  padding: 18px;
  display: flex; align-items: center; gap: 12px;
  margin: 12px 0;
}
.sddf-app-cta-icon { font-size: 38px; }
.sddf-app-cta-body { flex: 1; min-width: 0; }
.sddf-app-cta-body h3 { font-size: 1.5rem; margin-bottom: 2px; }
.sddf-app-cta-body p { font-size: 1.15rem; opacity: 0.85; }
.sddf-app-cta .sddf-btn {
  background: var(--sddf-primary); color: var(--sddf-accent);
}

/* ---------- SEO text ---------- */
.sddf-seo-text {
  background: var(--sddf-dark-2);
  border-radius: var(--sddf-radius);
  padding: 14px;
  color: var(--sddf-text-dim);
  font-size: 1.2rem;
  line-height: 1.7rem;
}
.sddf-seo-text h2 { color: var(--sddf-accent); font-size: 1.5rem; margin: 10px 0 6px; }
.sddf-seo-text h3 { color: var(--sddf-light); font-size: 1.3rem; margin: 8px 0 4px; }
.sddf-seo-text p { margin-bottom: 8px; }
.sddf-seo-text strong { color: var(--sddf-accent); }
.sddf-seo-text a { color: var(--sddf-accent); text-decoration: underline; }

/* ---------- Footer ---------- */
.sddf-footer {
  background: var(--sddf-dark-2);
  border-top: 2px solid var(--sddf-accent);
  padding: 18px 14px 14px;
  margin-top: 12px;
}
.sddf-footer-brand {
  color: var(--sddf-accent); font-weight: 700; font-size: 1.4rem; margin-bottom: 4px;
}
.sddf-footer-desc { color: var(--sddf-text-dim); font-size: 1.15rem; margin-bottom: 10px; }
.sddf-footer-promos {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.sddf-footer-promos .sddf-btn {
  background: var(--sddf-accent); color: var(--sddf-primary);
  padding: 6px 12px; font-size: 1.15rem; min-height: 30px;
}
.sddf-footer-links {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px; margin-bottom: 10px;
}
.sddf-footer-links a {
  font-size: 1.15rem; color: var(--sddf-light);
  padding: 4px 0;
}
.sddf-footer-bottom {
  border-top: 1px solid rgba(255, 225, 53, 0.2);
  padding-top: 8px;
  font-size: 1.1rem;
  color: var(--sddf-text-dim);
  text-align: center;
}

/* ---------- Bottom nav ---------- */
.sddf-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 62px;
  background: var(--sddf-dark-2);
  border-top: 2px solid var(--sddf-accent);
  display: flex; justify-content: space-around; align-items: stretch;
  z-index: 1000;
}
.sddf-bottom-nav-btn {
  flex: 1; min-width: 60px; min-height: 60px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--sddf-light); font-size: 1rem; gap: 2px;
  transition: background var(--sddf-transition), color var(--sddf-transition);
  position: relative;
}
.sddf-bottom-nav-btn:active { transform: scale(0.92); }
.sddf-bottom-nav-btn .material-icons,
.sddf-bottom-nav-btn ion-icon,
.sddf-bottom-nav-btn i { font-size: 22px; color: var(--sddf-text-dim); transition: color var(--sddf-transition); }
.sddf-bottom-nav-btn:hover { background: rgba(255, 225, 53, 0.08); }
.sddf-bottom-nav-btn:hover .material-icons,
.sddf-bottom-nav-btn:hover ion-icon,
.sddf-bottom-nav-btn:hover i,
.sddf-bottom-nav-active,
.sddf-bottom-nav-active .material-icons,
.sddf-bottom-nav-active ion-icon,
.sddf-bottom-nav-active i { color: var(--sddf-accent); }
.sddf-bottom-nav-badge {
  position: absolute; top: 4px; right: 14px;
  background: var(--sddf-danger); color: #fff;
  font-size: 0.9rem; font-weight: 700;
  padding: 1px 5px; border-radius: 999px;
}

/* ---------- Back to top ---------- */
.sddf-back-top {
  position: fixed; bottom: 76px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sddf-accent); color: var(--sddf-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity var(--sddf-transition), visibility var(--sddf-transition);
  z-index: 999;
  box-shadow: var(--sddf-shadow);
}
.sddf-back-top.sddf-show { opacity: 1; visibility: visible; }

/* ---------- Desktop (>= 769px) ---------- */
@media (min-width: 769px) {
  .sddf-bottom-nav { display: none; }
  .sddf-main { padding-bottom: 24px; max-width: 760px; }
  .sddf-game-grid { grid-template-columns: repeat(6, 1fr); }
  .sddf-feature-grid { grid-template-columns: repeat(4, 1fr); }
  .sddf-carousel-slide img { height: 320px; }
}

/* ---------- Small mobile tweaks ---------- */
@media (max-width: 360px) {
  .sddf-header-title { max-width: 90px; font-size: 1.3rem; }
  .sddf-game-grid { grid-template-columns: repeat(2, 1fr); }
  .sddf-pay-grid { grid-template-columns: repeat(3, 1fr); }
}
