/* ============================================================
 * kingph apk - Core base stylesheet
 * All custom classes use the v240- prefix for namespace isolation.
 * Mobile-first design, viewport capped at 430px.
 * Palette: #FFAA00 / #E5E5E5 / #FFCC02 / #FFD700 / #1C2833
 * ============================================================ */

:root {
  --v240-primary: #FFAA00;
  --v240-accent: #FFCC02;
  --v240-gold: #FFD700;
  --v240-text: #E5E5E5;
  --v240-bg: #1C2833;
  --v240-bg-alt: #243447;
  --v240-bg-card: #2b3e52;
  --v240-border: rgba(255, 170, 0, 0.25);
  --v240-radius: 14px;
  --v240-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

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

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

a {
  color: var(--v240-accent);
  text-decoration: none;
}

/* ---------- Layout primitives ---------- */
.v240-wrapper {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.4rem;
}

.v240-container {
  padding: 2rem 0;
}

main.v240-main {
  padding-bottom: 90px; /* room for fixed bottom nav on mobile */
}

/* ---------- Header ---------- */
.v240-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #1C2833 0%, #243447 100%);
  border-bottom: 2px solid var(--v240-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.v240-header-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.2rem;
  gap: 0.6rem;
}

.v240-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.v240-brand img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.v240-brand-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--v240-gold);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.v240-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Buttons ---------- */
.v240-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.v240-btn:active {
  transform: scale(0.94);
}

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

.v240-btn-register {
  background: linear-gradient(135deg, var(--v240-primary), var(--v240-gold));
  color: #1C2833;
  box-shadow: 0 4px 12px rgba(255, 170, 0, 0.35);
}

.v240-btn-promo {
  background: linear-gradient(135deg, #FFAA00, #FFD700);
  color: #1C2833;
  padding: 1rem 1.6rem;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(255, 204, 2, 0.4);
}

/* ---------- Menu toggle ---------- */
.v240-menu-toggle {
  background: transparent;
  border: none;
  color: var(--v240-accent);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
}

/* ---------- Mobile menu ---------- */
.v240-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 78%;
  max-width: 320px;
  height: 100vh;
  background: var(--v240-bg-alt);
  z-index: 9999;
  padding: 6rem 1.5rem 2rem;
  transform: translateX(110%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  border-left: 2px solid var(--v240-primary);
}

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

.v240-mobile-menu a {
  display: block;
  padding: 1rem 0.8rem;
  color: var(--v240-text);
  font-size: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.v240-mobile-menu a:hover,
.v240-mobile-menu a:focus {
  color: var(--v240-gold);
  background: rgba(255, 170, 0, 0.08);
}

.v240-menu-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  color: var(--v240-accent);
  font-size: 2rem;
  cursor: pointer;
}

/* ---------- Carousel ---------- */
.v240-carousel {
  position: relative;
  margin-top: 6rem;
  border-radius: var(--v240-radius);
  overflow: hidden;
  box-shadow: var(--v240-shadow);
}

.v240-carousel-slide {
  display: none;
  position: relative;
}

.v240-carousel-slide.v240-active {
  display: block;
}

.v240-carousel-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.v240-carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(0deg, rgba(28, 40, 51, 0.92), transparent);
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
}

.v240-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.v240-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
}

.v240-carousel-dot.v240-active {
  background: var(--v240-gold);
  width: 22px;
  border-radius: 6px;
}

/* ---------- Sections ---------- */
.v240-section {
  margin: 2.2rem 0;
}

.v240-section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--v240-gold);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.v240-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin: 1rem 0 0.5rem;
  line-height: 1.25;
}

.v240-lead {
  color: var(--v240-text);
  font-size: 1.45rem;
  margin: 0 0 1.2rem;
}

/* ---------- Game grid ---------- */
.v240-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.v240-game-card {
  background: var(--v240-bg-card);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  padding: 0.6rem 0.4rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.v240-game-card:hover,
.v240-game-card:active {
  transform: translateY(-2px);
  border-color: var(--v240-primary);
}

.v240-game-card img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.4rem;
}

.v240-game-card .v240-game-name {
  font-size: 1.1rem;
  color: var(--v240-text);
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Cards / Features ---------- */
.v240-card {
  background: var(--v240-bg-card);
  border-radius: var(--v240-radius);
  padding: 1.4rem;
  box-shadow: var(--v240-shadow);
  border: 1px solid var(--v240-border);
  margin-bottom: 1.2rem;
}

.v240-card h3 {
  margin: 0 0 0.6rem;
  color: var(--v240-gold);
  font-size: 1.6rem;
}

.v240-card p {
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
}

.v240-feature-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.v240-feature-icon {
  font-size: 2.2rem;
  color: var(--v240-primary);
  flex-shrink: 0;
}

.v240-list {
  margin: 0;
  padding-left: 1.4rem;
}

.v240-list li {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

/* ---------- Testimonials ---------- */
.v240-testimonial {
  background: var(--v240-bg-card);
  border-left: 4px solid var(--v240-primary);
  padding: 1rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 0.8rem;
  font-style: italic;
}

.v240-testimonial strong {
  color: var(--v240-gold);
  font-style: normal;
}

/* ---------- Payment / app CTA ---------- */
.v240-pay-row,
.v240-winner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.v240-pay-chip {
  background: var(--v240-bg-alt);
  border: 1px solid var(--v240-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 1.2rem;
  color: var(--v240-text);
}

.v240-app-cta {
  background: linear-gradient(135deg, #243447, #1C2833);
  border: 1px solid var(--v240-primary);
  border-radius: var(--v240-radius);
  padding: 1.6rem;
  text-align: center;
}

.v240-app-cta h3 {
  color: var(--v240-gold);
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

/* ---------- Footer ---------- */
.v240-footer {
  background: #15202b;
  border-top: 2px solid var(--v240-primary);
  padding: 2rem 0 5rem;
  color: var(--v240-text);
  font-size: 1.3rem;
}

.v240-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin: 1rem 0;
}

.v240-footer-links a {
  color: var(--v240-accent);
  font-size: 1.25rem;
}

.v240-footer-brand {
  margin-bottom: 1rem;
  color: #c9d2da;
}

.v240-copyright {
  margin-top: 1rem;
  color: #8a96a0;
  font-size: 1.2rem;
}

/* ---------- Bottom navigation ---------- */
.v240-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: linear-gradient(135deg, #1C2833, #243447);
  border-top: 2px solid var(--v240-primary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.4);
}

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

.v240-bottom-nav-btn:active {
  transform: scale(0.9);
}

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

.v240-bottom-nav-btn.v240-nav-active {
  color: var(--v240-gold);
}

.v240-bottom-nav-btn.v240-nav-promo {
  color: var(--v240-gold);
}

/* ---------- Utilities ---------- */
.v240-text-center { text-align: center; }
.v240-mt-1 { margin-top: 0.6rem; }
.v240-mt-2 { margin-top: 1.2rem; }
.v240-hidden { display: none !important; }

.v240-promo-text {
  color: var(--v240-gold);
  font-weight: 700;
}

/* ---------- Responsive breakpoints ---------- */
@media (min-width: 769px) {
  .v240-bottom-nav {
    display: none;
  }
  main.v240-main {
    padding-bottom: 2rem;
  }
}

@media (max-width: 430px) {
  html { font-size: 58%; }
  .v240-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }
  .v240-game-card img {
    height: 64px;
  }
  .v240-brand-name {
    font-size: 1.45rem;
  }
  .v240-btn {
    padding: 0.6rem 1rem;
    font-size: 1.2rem;
  }
  .v240-carousel-slide img {
    height: 170px;
  }
  .v240-section-title {
    font-size: 1.7rem;
  }
}

@media (max-width: 360px) {
  .v240-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .v240-btn-login {
    display: none;
  }
}
