/*
 * Juan360 Layout Stylesheet
 * All classes use g967- prefix for namespace isolation
 * Color palette: #DC143C | #A0522D | #FF4500 | #FFBF00 | #0D1117
 * Mobile-first design, max-width 430px
 */

/* CSS Variables */
:root {
  --g967-primary: #DC143C;
  --g967-secondary: #FF4500;
  --g967-accent: #FFBF00;
  --g967-dark: #0D1117;
  --g967-brown: #A0522D;
  --g967-bg: #0D1117;
  --g967-card-bg: #161B22;
  --g967-card-border: #21262D;
  --g967-text: #F0F6FC;
  --g967-text-muted: #8B949E;
  --g967-text-dim: #6E7681;
  --g967-gradient-start: #DC143C;
  --g967-gradient-end: #FF4500;
  --g967-radius: 8px;
  --g967-radius-lg: 12px;
  --g967-radius-xl: 16px;
  --g967-shadow: 0 4px 12px rgba(0,0,0,0.4);
  --g967-shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  font-size: 62.5%;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: var(--g967-bg);
  color: var(--g967-text);
  font-size: 1.4rem;
  line-height: 1.5;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.g967-header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.g967-header-logo img {
  width: 3rem;
  height: 3rem;
  border-radius: 6px;
}

.g967-header-logo span {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--g967-accent);
  letter-spacing: 0.5px;
}

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

.g967-btn-register {
  background: linear-gradient(135deg, var(--g967-primary), var(--g967-secondary));
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--g967-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.g967-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(220,20,60,0.5);
}

.g967-btn-login {
  background: transparent;
  color: var(--g967-accent);
  border: 1.5px solid var(--g967-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--g967-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.g967-btn-login:hover {
  background: var(--g967-accent);
  color: var(--g967-dark);
}

.g967-header-menu {
  background: none;
  border: none;
  color: var(--g967-text);
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
}

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

.g967-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 75%;
  max-width: 300px;
  height: 100%;
  background: var(--g967-card-bg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

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

.g967-mobile-menu h3 {
  font-size: 1.6rem;
  color: var(--g967-accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--g967-card-border);
}

.g967-mobile-menu a {
  display: block;
  padding: 1rem 0;
  color: var(--g967-text);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--g967-card-border);
  transition: color 0.2s;
}

.g967-mobile-menu a:hover {
  color: var(--g967-accent);
  text-decoration: none;
}

/* Main Content */
.g967-main {
  padding-top: 6.4rem;
  padding-bottom: 1rem;
  min-height: 100vh;
}

@media (max-width: 768px) {
  .g967-main { padding-bottom: 8rem; }
}

/* Carousel */
.g967-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 var(--g967-radius-lg) var(--g967-radius-lg);
}

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

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

.g967-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

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

.g967-dot-active {
  background: var(--g967-accent) !important;
  width: 20px;
  border-radius: 4px;
}

/* Section Title */
.g967-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--g967-text);
  margin: 2rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--g967-primary);
  line-height: 1.3;
}

.g967-section-title span {
  color: var(--g967-accent);
}

/* Game Grid */
.g967-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  padding: 0.5rem 0;
}

.g967-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.g967-game-item:hover {
  transform: translateY(-2px);
}

.g967-game-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--g967-radius);
  border: 2px solid var(--g967-card-border);
  object-fit: cover;
  transition: border-color 0.2s;
}

.g967-game-item:hover img {
  border-color: var(--g967-primary);
}

.g967-game-item p {
  font-size: 1rem;
  color: var(--g967-text-muted);
  text-align: center;
  margin-top: 0.3rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Content Card */
.g967-card {
  background: var(--g967-card-bg);
  border: 1px solid var(--g967-card-border);
  border-radius: var(--g967-radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
}

.g967-card h2 {
  font-size: 1.6rem;
  color: var(--g967-accent);
  margin-bottom: 1rem;
}

.g967-card h3 {
  font-size: 1.4rem;
  color: var(--g967-text);
  margin: 1rem 0 0.5rem;
}

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

.g967-card ul {
  list-style: none;
  padding: 0;
}

.g967-card ul li {
  padding: 0.5rem 0;
  color: var(--g967-text-muted);
  padding-left: 1.5rem;
  position: relative;
}

.g967-card ul li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--g967-primary);
}

/* Promo Link */
.g967-promo-link {
  display: inline-block;
  color: var(--g967-accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.g967-promo-link:hover {
  color: var(--g967-primary);
}

/* CTA Button */
.g967-cta-btn {
  display: block;
  width: 100%;
  padding: 1.4rem;
  background: linear-gradient(135deg, var(--g967-primary), var(--g967-secondary));
  color: #fff;
  border: none;
  border-radius: var(--g967-radius-lg);
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 1.5rem 0;
}

.g967-cta-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(220,20,60,0.5);
}

/* Footer */
.g967-footer {
  background: var(--g967-card-bg);
  border-top: 1px solid var(--g967-card-border);
  padding: 2rem 1.2rem;
  margin-top: 2rem;
}

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

.g967-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.g967-footer-links a {
  color: var(--g967-text-muted);
  font-size: 1.1rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--g967-card-border);
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s;
}

.g967-footer-links a:hover {
  color: var(--g967-accent);
  border-color: var(--g967-accent);
  text-decoration: none;
}

.g967-footer-copy {
  color: var(--g967-text-dim);
  font-size: 1.1rem;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--g967-card-border);
}

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

.g967-bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 52px;
  background: none;
  border: none;
  color: var(--g967-text-muted);
  cursor: pointer;
  transition: color 0.2s, transform 0.15s;
  padding: 0.3rem;
  position: relative;
}

.g967-bnav-btn:hover,
.g967-bnav-btn:focus {
  color: var(--g967-accent);
}

.g967-bnav-btn .g967-bnav-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.g967-bnav-btn .g967-bnav-label {
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
}

.g967-bnav-btn.g967-active {
  color: var(--g967-primary);
}

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

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

/* Back to Top */
.g967-back-top {
  display: none;
  position: fixed;
  bottom: 7rem;
  right: 1rem;
  width: 4rem;
  height: 4rem;
  background: var(--g967-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: var(--g967-shadow);
  transition: transform 0.2s;
}

.g967-back-top:hover {
  transform: scale(1.1);
}

/* Helpers */
.g967-text-accent { color: var(--g967-accent); }
.g967-text-primary { color: var(--g967-primary); }
.g967-text-muted { color: var(--g967-text-muted); }
.g967-mt-1 { margin-top: 0.5rem; }
.g967-mt-2 { margin-top: 1rem; }
.g967-mt-3 { margin-top: 1.5rem; }
.g967-mb-1 { margin-bottom: 0.5rem; }
.g967-mb-2 { margin-bottom: 1rem; }
.g967-mb-3 { margin-bottom: 1.5rem; }
.g967-text-center { text-align: center; }
.g967-font-bold { font-weight: 700; }

/* Winner List */
.g967-winner-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.g967-winner-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: rgba(220,20,60,0.08);
  border-radius: var(--g967-radius);
  border: 1px solid rgba(220,20,60,0.15);
}

.g967-winner-avatar {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--g967-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--g967-accent);
  flex-shrink: 0;
}

.g967-winner-info {
  flex: 1;
  min-width: 0;
}

.g967-winner-name {
  font-size: 1.2rem;
  color: var(--g967-text);
  font-weight: 600;
}

.g967-winner-game {
  font-size: 1rem;
  color: var(--g967-text-muted);
}

.g967-winner-amount {
  font-size: 1.3rem;
  color: var(--g967-accent);
  font-weight: 700;
  white-space: nowrap;
}

/* Payment Methods */
.g967-payment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.g967-payment-item {
  background: var(--g967-card-border);
  padding: 0.6rem 1.2rem;
  border-radius: var(--g967-radius);
  font-size: 1.2rem;
  color: var(--g967-text);
  font-weight: 500;
}

/* Testimonial */
.g967-testimonial {
  background: rgba(255,191,0,0.06);
  border: 1px solid rgba(255,191,0,0.15);
  border-radius: var(--g967-radius-lg);
  padding: 1.2rem;
  margin: 0.8rem 0;
}

.g967-testimonial-text {
  font-style: italic;
  color: var(--g967-text-muted);
  font-size: 1.2rem;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.g967-testimonial-author {
  font-size: 1.1rem;
  color: var(--g967-accent);
  font-weight: 600;
}

/* Category Badge */
.g967-cat-badge {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.g967-cat-hot { background: rgba(220,20,60,0.2); color: #ff6b6b; }
.g967-cat-fishing { background: rgba(0,150,255,0.2); color: #5bb8ff; }
.g967-cat-slot { background: rgba(255,191,0,0.2); color: #ffd700; }
.g967-cat-live { background: rgba(160,82,45,0.2); color: #cd853f; }
.g967-cat-cards { background: rgba(100,200,100,0.2); color: #7ddb7d; }

/* App Download */
.g967-app-dl {
  text-align: center;
  padding: 1.5rem;
}

.g967-app-dl-img {
  width: 100%;
  max-width: 300px;
  border-radius: var(--g967-radius-lg);
  margin: 0 auto 1rem;
}

.g967-app-dl-btns {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.g967-app-btn {
  padding: 0.8rem 1.5rem;
  border-radius: var(--g967-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s;
}

.g967-app-btn-android {
  background: var(--g967-primary);
  color: #fff;
}

.g967-app-btn-ios {
  background: var(--g967-accent);
  color: var(--g967-dark);
}

.g967-app-btn:hover {
  transform: scale(1.05);
}

/* FAQ */
.g967-faq-item {
  border-bottom: 1px solid var(--g967-card-border);
  padding: 1rem 0;
}

.g967-faq-q {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--g967-text);
  margin-bottom: 0.4rem;
}

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

/* Help page styles */
.g967-help-section {
  margin: 1.2rem 0;
}

.g967-help-section h2 {
  font-size: 1.6rem;
  color: var(--g967-accent);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--g967-card-border);
}

.g967-help-section p {
  color: var(--g967-text-muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.g967-step-list {
  counter-reset: g967-step;
  list-style: none;
  padding: 0;
}

.g967-step-list li {
  counter-increment: g967-step;
  padding: 0.8rem 0 0.8rem 3.5rem;
  position: relative;
  color: var(--g967-text-muted);
  line-height: 1.5;
}

.g967-step-list li::before {
  content: counter(g967-step);
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 2.6rem;
  height: 2.6rem;
  background: linear-gradient(135deg, var(--g967-primary), var(--g967-secondary));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Safety badge */
.g967-safety-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(100,200,100,0.1);
  border: 1px solid rgba(100,200,100,0.25);
  padding: 0.5rem 1rem;
  border-radius: var(--g967-radius);
  margin: 0.3rem;
  font-size: 1.2rem;
  color: #7ddb7d;
}
