/* PAGCOR Games - Core CSS Layout */
/* All classes use sa40- prefix */
/* Color palette: #34495E (dark bg) | #778899 (secondary) | #FFBF00 (accent) | #FFB74D (highlight) | #95A5A6 (muted) */

:root {
  --sa40-primary: #FFBF00;
  --sa40-secondary: #778899;
  --sa40-bg: #34495E;
  --sa40-bg-dark: #1a252f;
  --sa40-bg-card: #2c3e50;
  --sa40-text: #ffffff;
  --sa40-text-muted: #95A5A6;
  --sa40-highlight: #FFB74D;
  --sa40-accent: #FFBF00;
  --sa40-border: rgba(255, 191, 0, 0.2);
  --sa40-radius: 1.2rem;
  --sa40-radius-sm: 0.8rem;
}

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

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

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--sa40-bg-dark);
  color: var(--sa40-text);
  line-height: 1.5;
  font-size: 1.5rem;
  overflow-x: hidden;
  max-width: 430px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--sa40-accent); }

/* Header */
.sa40-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 1000;
  background: linear-gradient(135deg, var(--sa40-bg) 0%, var(--sa40-bg-dark) 100%);
  border-bottom: 2px solid var(--sa40-primary);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sa40-logo-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.sa40-logo-area img {
  width: 32px;
  height: 32px;
  border-radius: 0.6rem;
}

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

.sa40-header-btns {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sa40-btn-register, .sa40-btn-login {
  padding: 0.6rem 1.4rem;
  border-radius: var(--sa40-radius-sm);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

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

.sa40-btn-register:hover, .sa40-btn-login:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 191, 0, 0.4);
}

.sa40-menu-toggle {
  background: none;
  border: none;
  color: var(--sa40-primary);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
}

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

.sa40-overlay-active { display: block; }

.sa40-mobile-menu {
  position: fixed;
  top: 0; right: -280px;
  width: 280px;
  height: 100%;
  background: var(--sa40-bg);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.6rem;
  overflow-y: auto;
}

.sa40-menu-active { right: 0; }

.sa40-mobile-menu .sa40-menu-close {
  background: none;
  border: none;
  color: var(--sa40-text-muted);
  font-size: 2.4rem;
  cursor: pointer;
  position: absolute;
  top: 1rem; right: 1.2rem;
}

.sa40-mobile-menu h3 {
  color: var(--sa40-primary);
  font-size: 1.6rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--sa40-border);
}

.sa40-menu-links a {
  display: block;
  padding: 1rem 0;
  color: var(--sa40-text);
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.15s, padding-left 0.15s;
}

.sa40-menu-links a:hover {
  color: var(--sa40-primary);
  padding-left: 0.8rem;
}

/* Main content */
main {
  padding-top: 6rem;
  padding-bottom: 2rem;
}

/* Carousel */
.sa40-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
}

.sa40-slide {
  display: none;
  width: 100%;
  cursor: pointer;
}

.sa40-slide-active { display: block; }

.sa40-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 430 / 200;
  object-fit: cover;
}

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

.sa40-carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.sa40-dot-active { background: var(--sa40-primary); }

/* Sections */
.sa40-section {
  padding: 2rem 1.4rem;
}

.sa40-section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sa40-primary);
  margin-bottom: 1.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--sa40-border);
}

.sa40-subtitle {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--sa40-highlight);
  margin-bottom: 1rem;
}

/* Category header */
.sa40-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.sa40-cat-icon {
  font-size: 2.2rem;
  color: var(--sa40-primary);
}

.sa40-cat-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sa40-text);
}

/* Game grid */
.sa40-game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.sa40-game-item {
  background: var(--sa40-bg-card);
  border-radius: var(--sa40-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255,255,255,0.04);
}

.sa40-game-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 191, 0, 0.15);
}

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

.sa40-game-name {
  padding: 0.6rem 0.4rem;
  font-size: 1.1rem;
  text-align: center;
  color: var(--sa40-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Cards */
.sa40-card {
  background: var(--sa40-bg-card);
  border-radius: var(--sa40-radius);
  padding: 1.8rem;
  margin-bottom: 1.6rem;
  border: 1px solid var(--sa40-border);
}

.sa40-card h2 {
  font-size: 1.8rem;
  color: var(--sa40-primary);
  margin-bottom: 1rem;
}

.sa40-card h3 {
  font-size: 1.5rem;
  color: var(--sa40-highlight);
  margin-bottom: 0.8rem;
}

.sa40-card p {
  color: var(--sa40-text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

/* Promo button */
.sa40-promo-btn {
  display: inline-block;
  padding: 1rem 2.4rem;
  background: linear-gradient(135deg, var(--sa40-primary), var(--sa40-highlight));
  color: var(--sa40-bg-dark);
  font-weight: 700;
  font-size: 1.5rem;
  border-radius: var(--sa40-radius-sm);
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
  text-align: center;
}

.sa40-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(255, 191, 0, 0.5);
}

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

.sa40-promo-link:hover {
  color: var(--sa40-highlight);
}

/* Bottom navigation */
.sa40-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 60px;
  background: linear-gradient(180deg, var(--sa40-bg), var(--sa40-bg-dark));
  border-top: 2px solid var(--sa40-border);
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.4rem;
}

.sa40-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(--sa40-text-muted);
  cursor: pointer;
  transition: color 0.2s, transform 0.15s;
  padding: 0.4rem;
}

.sa40-nav-btn:hover, .sa40-nav-btn.sa40-nav-active {
  color: var(--sa40-primary);
  transform: scale(1.08);
}

.sa40-nav-btn i, .sa40-nav-btn .material-icons {
  font-size: 2.2rem;
  margin-bottom: 0.2rem;
}

.sa40-nav-btn span {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.sa40-footer {
  background: var(--sa40-bg-dark);
  padding: 2rem 1.4rem;
  border-top: 1px solid var(--sa40-border);
}

.sa40-footer-brand {
  text-align: center;
  margin-bottom: 1.6rem;
}

.sa40-footer-brand p {
  color: var(--sa40-text-muted);
  font-size: 1.3rem;
  line-height: 1.6;
}

.sa40-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.sa40-footer-links a {
  color: var(--sa40-text-muted);
  font-size: 1.2rem;
  padding: 0.4rem 0.8rem;
  transition: color 0.15s;
}

.sa40-footer-links a:hover {
  color: var(--sa40-primary);
}

.sa40-footer-promo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.sa40-footer-copy {
  text-align: center;
  color: var(--sa40-text-muted);
  font-size: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* FAQ */
.sa40-faq-item {
  background: var(--sa40-bg-card);
  border-radius: var(--sa40-radius-sm);
  padding: 1.4rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--sa40-primary);
}

.sa40-faq-item strong {
  display: block;
  color: var(--sa40-primary);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.sa40-faq-item p {
  color: var(--sa40-text-muted);
  font-size: 1.3rem;
  line-height: 1.6;
}

/* Feature list */
.sa40-feature-list {
  list-style: none;
  padding: 0;
}

.sa40-feature-list li {
  padding: 0.8rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--sa40-text-muted);
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.sa40-feature-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--sa40-primary);
  font-size: 1.2rem;
}

/* Winner showcase */
.sa40-winner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sa40-winner-item {
  background: var(--sa40-bg-card);
  border-radius: var(--sa40-radius-sm);
  padding: 1.2rem;
  text-align: center;
  border: 1px solid var(--sa40-border);
}

.sa40-winner-item .sa40-amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sa40-primary);
}

.sa40-winner-item .sa40-game {
  font-size: 1.2rem;
  color: var(--sa40-highlight);
  margin-top: 0.4rem;
}

.sa40-winner-item .sa40-time {
  font-size: 1.1rem;
  color: var(--sa40-text-muted);
  margin-top: 0.3rem;
}

/* Responsive */
@media (min-width: 769px) {
  .sa40-bottom-nav { display: none; }
  .sa40-menu-toggle { display: none; }
}

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