/**
 * SuperKing PH - Layout Stylesheet
 * All classes use sa12- prefix for namespace isolation
 * Color palette: #8470FF | #262626 | #4B0082 | #808080
 * Mobile-first design (max-width: 430px)
 */

/* Root variables */
:root {
  --sa12-primary: #8470FF;
  --sa12-primary-dark: #6954dd;
  --sa12-bg-dark: #262626;
  --sa12-bg-deep: #4B0082;
  --sa12-gray: #808080;
  --sa12-white: #FFFFFF;
  --sa12-light: #F0F0F5;
  --sa12-gold: #FFD700;
  --sa12-success: #00C853;
  --sa12-danger: #FF4444;
  --sa12-text: #E8E8E8;
  --sa12-text-muted: #B0B0B0;
  --sa12-radius: 8px;
  --sa12-radius-lg: 12px;
  --sa12-shadow: 0 2px 12px rgba(0,0,0,0.3);
  --sa12-header-h: 56px;
  --sa12-bnav-h: 60px;
  --sa12-transition: 0.3s ease;
}

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--sa12-bg-dark);
  color: var(--sa12-text);
  line-height: 1.5rem;
  font-size: 1.4rem;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

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

a:hover {
  color: var(--sa12-gold);
}

/* Container */
.sa12-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* ===== HEADER ===== */
.sa12-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--sa12-header-h);
  background: linear-gradient(135deg, var(--sa12-bg-deep) 0%, var(--sa12-bg-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  border-bottom: 1px solid rgba(132, 112, 255, 0.3);
}

.sa12-logo-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sa12-logo-area img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.sa12-logo-area span {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sa12-white);
  white-space: nowrap;
}

.sa12-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sa12-btn-register,
.sa12-btn-login {
  padding: 0.5rem 1.2rem;
  border-radius: var(--sa12-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--sa12-transition);
}

.sa12-btn-register {
  background: linear-gradient(135deg, var(--sa12-primary), var(--sa12-gold));
  color: var(--sa12-bg-dark);
}

.sa12-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(132, 112, 255, 0.5);
}

.sa12-btn-login {
  background: transparent;
  color: var(--sa12-primary);
  border: 1px solid var(--sa12-primary);
}

.sa12-btn-login:hover {
  background: var(--sa12-primary);
  color: var(--sa12-white);
}

.sa12-menu-toggle {
  background: none;
  border: none;
  color: var(--sa12-white);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
}

/* ===== MOBILE MENU ===== */
.sa12-mobile-menu {
  position: fixed;
  top: var(--sa12-header-h);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--sa12-bg-dark);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  z-index: 9999;
  border-bottom: 2px solid var(--sa12-primary);
}

.sa12-mobile-menu.sa12-menu-active {
  max-height: 500px;
}

.sa12-mobile-menu ul {
  list-style: none;
  padding: 0.8rem 0;
}

.sa12-mobile-menu li {
  border-bottom: 1px solid rgba(132, 112, 255, 0.1);
}

.sa12-mobile-menu a {
  display: block;
  padding: 1rem 1.6rem;
  color: var(--sa12-text);
  font-size: 1.4rem;
  transition: all var(--sa12-transition);
}

.sa12-mobile-menu a:hover {
  background: rgba(132, 112, 255, 0.1);
  color: var(--sa12-primary);
  padding-left: 2rem;
}

/* ===== CAROUSEL ===== */
.sa12-carousel {
  position: relative;
  width: 100%;
  margin-top: var(--sa12-header-h);
  overflow: hidden;
  background: #1a1a1a;
}

.sa12-carousel-slide {
  display: none;
  width: 100%;
  transition: opacity var(--sa12-transition);
  cursor: pointer;
}

.sa12-carousel-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.sa12-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
}

.sa12-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--sa12-transition);
  border: none;
}

.sa12-carousel-dot.sa12-dot-active {
  background: var(--sa12-primary);
  width: 20px;
  border-radius: 4px;
}

/* ===== MAIN CONTENT ===== */
.sa12-main {
  padding: 1.6rem 1.2rem;
  min-height: 60vh;
}

/* Page title */
.sa12-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sa12-white);
  margin-bottom: 1.2rem;
  line-height: 2.4rem;
}

.sa12-section-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--sa12-white);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--sa12-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sa12-section-title .material-icons {
  font-size: 2rem;
  color: var(--sa12-primary);
}

/* ===== GAME GRID ===== */
.sa12-game-category {
  margin-bottom: 2rem;
}

.sa12-category-label {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sa12-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  padding-left: 0.4rem;
  border-left: 3px solid var(--sa12-gold);
}

.sa12-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.sa12-game-item {
  text-align: center;
  cursor: pointer;
  transition: transform var(--sa12-transition);
}

.sa12-game-item:hover {
  transform: scale(1.05);
}

.sa12-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--sa12-radius);
  border: 1px solid rgba(132, 112, 255, 0.2);
}

.sa12-game-item span {
  display: block;
  font-size: 1.1rem;
  color: var(--sa12-text-muted);
  margin-top: 0.3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== CONTENT CARDS ===== */
.sa12-card {
  background: linear-gradient(135deg, rgba(75, 0, 130, 0.3), rgba(38, 38, 38, 0.8));
  border: 1px solid rgba(132, 112, 255, 0.2);
  border-radius: var(--sa12-radius-lg);
  padding: 1.4rem;
  margin-bottom: 1.6rem;
}

.sa12-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sa12-white);
  margin-bottom: 0.8rem;
}

.sa12-card p {
  color: var(--sa12-text-muted);
  line-height: 1.6rem;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

/* CTA / Promo button */
.sa12-cta-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--sa12-primary), var(--sa12-gold));
  color: var(--sa12-bg-dark);
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: var(--sa12-radius);
  cursor: pointer;
  border: none;
  transition: all var(--sa12-transition);
  text-align: center;
}

.sa12-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(132, 112, 255, 0.4);
}

/* Promo text link */
.sa12-promo-link {
  color: var(--sa12-primary);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dashed var(--sa12-primary);
  transition: all var(--sa12-transition);
}

.sa12-promo-link:hover {
  color: var(--sa12-gold);
  border-color: var(--sa12-gold);
}

/* ===== FEATURES GRID ===== */
.sa12-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sa12-feature-item {
  background: rgba(132, 112, 255, 0.08);
  border: 1px solid rgba(132, 112, 255, 0.15);
  border-radius: var(--sa12-radius);
  padding: 1rem;
  text-align: center;
}

.sa12-feature-item .feature-icon {
  font-size: 2.4rem;
  color: var(--sa12-primary);
  margin-bottom: 0.4rem;
}

.sa12-feature-item h3 {
  font-size: 1.3rem;
  color: var(--sa12-white);
  margin-bottom: 0.3rem;
}

.sa12-feature-item p {
  font-size: 1.1rem;
  color: var(--sa12-text-muted);
}

/* ===== TESTIMONIALS ===== */
.sa12-testimonial {
  background: rgba(132, 112, 255, 0.06);
  border-left: 3px solid var(--sa12-primary);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--sa12-radius) var(--sa12-radius) 0;
}

.sa12-testimonial .sa12-user {
  font-size: 1.2rem;
  color: var(--sa12-primary);
  font-weight: 600;
}

.sa12-testimonial .sa12-text {
  font-size: 1.2rem;
  color: var(--sa12-text-muted);
  margin-top: 0.3rem;
}

/* ===== PAYMENT METHODS ===== */
.sa12-payment-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sa12-payment-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(132, 112, 255, 0.15);
  border-radius: var(--sa12-radius);
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  color: var(--sa12-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ===== WINNERS SHOWCASE ===== */
.sa12-winner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 1.2rem;
}

.sa12-winner-name {
  color: var(--sa12-text-muted);
}

.sa12-winner-game {
  color: var(--sa12-primary);
}

.sa12-winner-amount {
  color: var(--sa12-gold);
  font-weight: 700;
}

/* ===== FAQ ===== */
.sa12-faq-item {
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: rgba(132, 112, 255, 0.05);
  border-radius: var(--sa12-radius);
}

.sa12-faq-item h3 {
  font-size: 1.3rem;
  color: var(--sa12-primary);
  margin-bottom: 0.4rem;
}

.sa12-faq-item p {
  font-size: 1.2rem;
  color: var(--sa12-text-muted);
  line-height: 1.5rem;
}

/* ===== FOOTER ===== */
.sa12-footer {
  background: linear-gradient(180deg, var(--sa12-bg-dark), #1a1a1a);
  padding: 2rem 1.2rem 1rem;
  border-top: 1px solid rgba(132, 112, 255, 0.2);
}

.sa12-footer-brand {
  font-size: 1.3rem;
  color: var(--sa12-text-muted);
  line-height: 1.6rem;
  margin-bottom: 1.2rem;
}

.sa12-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.sa12-footer-links a {
  background: rgba(132, 112, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 1.1rem;
  color: var(--sa12-text);
  transition: all var(--sa12-transition);
}

.sa12-footer-links a:hover {
  background: var(--sa12-primary);
  color: var(--sa12-white);
}

.sa12-footer-copy {
  text-align: center;
  font-size: 1.1rem;
  color: var(--sa12-gray);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ===== BOTTOM NAVIGATION ===== */
.sa12-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--sa12-bnav-h);
  background: linear-gradient(180deg, var(--sa12-bg-deep), #1a0030);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  border-top: 1px solid rgba(132, 112, 255, 0.4);
  box-shadow: 0 -4px 20px rgba(75, 0, 130, 0.5);
}

.sa12-bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 50px;
  background: none;
  border: none;
  color: var(--sa12-text-muted);
  cursor: pointer;
  transition: all var(--sa12-transition);
  position: relative;
  gap: 0.2rem;
}

.sa12-bnav-btn:hover,
.sa12-bnav-btn.sa12-bnav-active {
  color: var(--sa12-primary);
  transform: scale(1.1);
}

.sa12-bnav-btn .sa12-bnav-icon {
  font-size: 22px;
  line-height: 1;
}

.sa12-bnav-btn .sa12-bnav-label {
  font-size: 1rem;
  white-space: nowrap;
}

.sa12-bnav-btn.sa12-bnav-active::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--sa12-primary);
  border-radius: 1px;
}

/* ===== HELPERS ===== */
.sa12-text-center { text-align: center; }
.sa12-text-gold { color: var(--sa12-gold); }
.sa12-text-primary { color: var(--sa12-primary); }
.sa12-mb-1 { margin-bottom: 0.8rem; }
.sa12-mb-2 { margin-bottom: 1.6rem; }
.sa12-mt-1 { margin-top: 0.8rem; }
.sa12-mt-2 { margin-top: 1.6rem; }

/* Responsive padding for bottom nav */
@media (max-width: 768px) {
  .sa12-main {
    padding-bottom: calc(var(--sa12-bnav-h) + 1.6rem);
  }
  .sa12-footer {
    padding-bottom: calc(var(--sa12-bnav-h) + 1rem);
  }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
  .sa12-bottom-nav {
    display: none;
  }
}

/* Desktop adjustments */
@media (min-width: 431px) {
  body {
    border-left: 1px solid rgba(132, 112, 255, 0.15);
    border-right: 1px solid rgba(132, 112, 255, 0.15);
  }
}

/* Highlight animation for promo elements */
@keyframes sa12-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.sa12-pulse {
  animation: sa12-pulse 2s infinite;
}

/* Badge for bottom nav */
.sa12-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--sa12-danger);
  color: var(--sa12-white);
  font-size: 0.9rem;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
