/**
 * 111bd Main Stylesheet
 * All classes use "v404-" prefix for namespace isolation
 * Color palette: #212F3D | #D8BFD8 | #4B0082 | #D3D3D3 | #F8F8FF
 * Mobile-first responsive design
 */

/* CSS Variables */
:root {
  --v404-primary: #4B0082;
  --v404-secondary: #D8BFD8;
  --v404-bg-dark: #212F3D;
  --v404-bg-card: #1a2733;
  --v404-text-light: #F8F8FF;
  --v404-text-muted: #D3D3D3;
  --v404-accent: #D8BFD8;
  --v404-border: #2d4154;
  --v404-gold: #e6c200;
  --v404-success: #2ecc71;
  --v404-radius: 10px;
  --v404-radius-sm: 6px;
  --v404-shadow: 0 4px 15px rgba(0,0,0,0.3);
  --v404-header-h: 56px;
  --v404-bottom-nav-h: 60px;
  font-size: 62.5%;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5rem;
  color: var(--v404-text-light);
  background: var(--v404-bg-dark);
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--v404-secondary); text-decoration: none; }
a:hover { color: var(--v404-gold); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* Header */
.v404-header {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: var(--v404-header-h);
  background: linear-gradient(135deg, #1a2733 0%, #212F3D 50%, #2d4154 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; z-index: 1000;
  border-bottom: 2px solid var(--v404-primary);
  box-shadow: 0 2px 12px rgba(75,0,130,0.3);
}
.v404-header-left { display: flex; align-items: center; gap: 8px; }
.v404-header-logo { width: 32px; height: 32px; border-radius: 50%; }
.v404-header-brand { font-size: 1.8rem; font-weight: 700; color: var(--v404-gold); letter-spacing: 1px; }
.v404-header-right { display: flex; align-items: center; gap: 8px; }
.v404-btn-register, .v404-btn-login {
  padding: 6px 14px; border-radius: var(--v404-radius-sm);
  font-size: 1.3rem; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.25s ease;
}
.v404-btn-register {
  background: linear-gradient(135deg, var(--v404-primary), #6a0dad);
  color: #fff;
}
.v404-btn-register:hover { background: linear-gradient(135deg, #6a0dad, var(--v404-primary)); transform: scale(1.04); }
.v404-btn-login {
  background: transparent; color: var(--v404-secondary);
  border: 1.5px solid var(--v404-secondary);
}
.v404-btn-login:hover { background: var(--v404-secondary); color: var(--v404-bg-dark); }
.v404-header-menu-btn {
  background: none; border: none; color: var(--v404-text-light);
  font-size: 2.2rem; cursor: pointer; padding: 4px;
}

/* Mobile Menu Overlay */
.v404-menu-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 9998;
}
.v404-overlay-active { display: block; }
.v404-mobile-menu {
  position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
  background: linear-gradient(180deg, #1a2733, #212F3D);
  z-index: 9999; transition: right 0.3s ease; overflow-y: auto;
  border-left: 2px solid var(--v404-primary);
}
.v404-menu-active { right: 0; }
.v404-menu-header {
  padding: 16px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--v404-border);
}
.v404-menu-title { font-size: 1.8rem; font-weight: 700; color: var(--v404-gold); }
.v404-menu-close { background: none; border: none; color: var(--v404-text-light); font-size: 2rem; cursor: pointer; }
.v404-menu-links { padding: 12px 0; }
.v404-menu-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; color: var(--v404-text-light);
  font-size: 1.4rem; border-bottom: 1px solid var(--v404-border);
  transition: all 0.2s ease;
}
.v404-menu-links a:hover { background: var(--v404-primary); color: #fff; }
.v404-menu-links a span.v404-menu-icon { font-size: 1.8rem; width: 24px; text-align: center; }

/* Main Content */
.v404-main { padding-top: var(--v404-header-h); min-height: 100vh; }
@media (max-width: 768px) {
  .v404-main { padding-bottom: 80px; }
}

/* Carousel */
.v404-carousel {
  position: relative; width: 100%; overflow: hidden;
  margin-top: 4px; border-radius: 0;
}
.v404-carousel-slide {
  display: none; cursor: pointer; width: 100%;
}
.v404-carousel-slide:first-child { display: block; }
.v404-carousel-slide img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.v404-carousel-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.v404-carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer; border: none;
  transition: all 0.3s ease;
}
.v404-dot-active { background: var(--v404-gold); transform: scale(1.3); }

/* Section */
.v404-section {
  padding: 16px 12px;
}
.v404-section-title {
  font-size: 1.8rem; font-weight: 700; color: var(--v404-gold);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--v404-primary);
  display: flex; align-items: center; gap: 8px;
}

/* Game Grid */
.v404-game-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding: 8px 0;
}
.v404-game-item {
  text-align: center; cursor: pointer;
  transition: transform 0.2s ease;
  background: var(--v404-bg-card); border-radius: var(--v404-radius-sm);
  padding: 8px 4px; border: 1px solid var(--v404-border);
}
.v404-game-item:hover { transform: scale(1.04); border-color: var(--v404-primary); }
.v404-game-item img {
  width: 60px; height: 60px; margin: 0 auto 6px;
  border-radius: var(--v404-radius-sm); object-fit: cover;
}
.v404-game-name {
  font-size: 1.1rem; color: var(--v404-text-light);
  line-height: 1.3rem; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* Category Title */
.v404-cat-title {
  font-size: 1.6rem; font-weight: 600; color: var(--v404-accent);
  margin: 14px 0 8px; padding-left: 8px;
  border-left: 3px solid var(--v404-primary);
}

/* Content Cards */
.v404-card {
  background: var(--v404-bg-card); border-radius: var(--v404-radius);
  padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--v404-border);
}
.v404-card h3 { font-size: 1.6rem; color: var(--v404-gold); margin-bottom: 10px; }
.v404-card p { font-size: 1.3rem; color: var(--v404-text-muted); line-height: 2rem; }

/* Promo Button */
.v404-promo-btn {
  display: inline-block; padding: 10px 24px;
  background: linear-gradient(135deg, var(--v404-primary), #6a0dad);
  color: #fff; font-size: 1.4rem; font-weight: 700;
  border-radius: 25px; border: none; cursor: pointer;
  text-align: center; transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(75,0,130,0.4);
}
.v404-promo-btn:hover {
  background: linear-gradient(135deg, #6a0dad, var(--v404-primary));
  transform: translateY(-2px); box-shadow: 0 5px 20px rgba(75,0,130,0.5);
}

/* Promo text link */
.v404-promo-link {
  color: var(--v404-gold); font-weight: 700; cursor: pointer;
  text-decoration: underline; transition: color 0.2s;
}
.v404-promo-link:hover { color: #fff; }

/* Feature List */
.v404-feature-list { padding: 0; }
.v404-feature-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--v404-border);
}
.v404-feature-item:last-child { border-bottom: none; }
.v404-feature-icon { color: var(--v404-gold); font-size: 1.8rem; flex-shrink: 0; }
.v404-feature-text { font-size: 1.3rem; color: var(--v404-text-muted); line-height: 2rem; }

/* RTP Table */
.v404-rtp-table { width: 100%; border-collapse: collapse; font-size: 1.2rem; }
.v404-rtp-table th {
  background: var(--v404-primary); color: #fff;
  padding: 8px 6px; text-align: left;
}
.v404-rtp-table td {
  padding: 7px 6px; border-bottom: 1px solid var(--v404-border);
  color: var(--v404-text-muted);
}
.v404-rtp-table tr:hover td { background: rgba(75,0,130,0.1); }

/* Testimonial */
.v404-testimonial {
  background: linear-gradient(135deg, rgba(75,0,130,0.15), rgba(216,191,216,0.1));
  border-radius: var(--v404-radius); padding: 14px;
  margin-bottom: 10px; border-left: 3px solid var(--v404-primary);
}
.v404-testimonial-name { font-size: 1.4rem; font-weight: 600; color: var(--v404-gold); }
.v404-testimonial-text { font-size: 1.2rem; color: var(--v404-text-muted); margin-top: 6px; line-height: 1.8rem; }

/* Payment Methods */
.v404-payment-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.v404-payment-item {
  background: var(--v404-bg-card); padding: 8px 16px;
  border-radius: var(--v404-radius-sm); border: 1px solid var(--v404-border);
  font-size: 1.3rem; color: var(--v404-text-muted);
}

/* Winner list */
.v404-winner-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--v404-border);
  font-size: 1.2rem;
}
.v404-winner-name { color: var(--v404-gold); font-weight: 600; }
.v404-winner-amount { color: var(--v404-success); font-weight: 700; }

/* Bottom Navigation */
.v404-bottom-nav {
  display: none; position: fixed; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: var(--v404-bottom-nav-h);
  background: linear-gradient(180deg, #1a2733, #151f29);
  border-top: 2px solid var(--v404-primary);
  z-index: 1000;
  justify-content: space-around; align-items: center;
  box-shadow: 0 -2px 12px rgba(75,0,130,0.3);
}
@media (max-width: 768px) {
  .v404-bottom-nav { display: flex; }
}
.v404-bottom-nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 60px; min-height: 50px;
  background: none; border: none; cursor: pointer;
  color: var(--v404-text-muted); transition: all 0.25s ease;
  padding: 4px;
}
.v404-bottom-nav-btn:hover, .v404-nav-active {
  color: var(--v404-gold); transform: scale(1.08);
}
.v404-bottom-nav-btn .v404-nav-icon { font-size: 2.2rem; line-height: 1; }
.v404-bottom-nav-btn .v404-nav-label { font-size: 1rem; margin-top: 2px; }

/* Scroll to top */
.v404-scroll-top {
  display: none; position: fixed; bottom: 75px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--v404-primary); color: #fff;
  border: none; font-size: 1.8rem; cursor: pointer;
  z-index: 999; align-items: center; justify-content: center;
  box-shadow: var(--v404-shadow);
  transition: transform 0.2s;
}
.v404-scroll-top:hover { transform: scale(1.1); }

/* Footer */
.v404-footer {
  background: linear-gradient(180deg, #1a2733, #111a24);
  padding: 20px 12px 30px;
  border-top: 2px solid var(--v404-primary);
}
.v404-footer-brand { font-size: 1.4rem; color: var(--v404-text-muted); line-height: 2rem; margin-bottom: 14px; }
.v404-footer-links {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.v404-footer-links a {
  padding: 6px 12px; background: var(--v404-bg-card);
  border-radius: var(--v404-radius-sm); font-size: 1.2rem;
  color: var(--v404-text-muted); border: 1px solid var(--v404-border);
  transition: all 0.2s;
}
.v404-footer-links a:hover { border-color: var(--v404-primary); color: var(--v404-gold); }
.v404-footer-promos {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.v404-footer-promos button {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--v404-primary), #6a0dad);
  color: #fff; font-size: 1.2rem; font-weight: 600;
  border-radius: 20px; border: none; cursor: pointer;
}
.v404-footer-copyright {
  font-size: 1.1rem; color: rgba(211,211,211,0.5); text-align: center;
  padding-top: 10px; border-top: 1px solid var(--v404-border);
}

/* FAQ */
.v404-faq-item { margin-bottom: 10px; }
.v404-faq-q {
  font-size: 1.4rem; font-weight: 600; color: var(--v404-accent);
  padding: 8px 0;
}
.v404-faq-a {
  font-size: 1.3rem; color: var(--v404-text-muted); line-height: 2rem;
  padding-left: 12px; border-left: 2px solid var(--v404-primary);
}

/* App download section */
.v404-app-cta {
  background: linear-gradient(135deg, rgba(75,0,130,0.2), rgba(216,191,216,0.1));
  border-radius: var(--v404-radius); padding: 16px; text-align: center;
  border: 1px solid var(--v404-primary);
}
.v404-app-cta h3 { color: var(--v404-gold); font-size: 1.6rem; margin-bottom: 8px; }
.v404-app-cta p { color: var(--v404-text-muted); font-size: 1.3rem; margin-bottom: 12px; }

/* Utility classes */
.v404-text-center { text-align: center; }
.v404-mt-1 { margin-top: 8px; }
.v404-mt-2 { margin-top: 16px; }
.v404-mb-1 { margin-bottom: 8px; }
.v404-mb-2 { margin-bottom: 16px; }
.v404-hidden { display: none; }

/* Desktop adjustments */
@media (min-width: 769px) {
  .v404-bottom-nav { display: none !important; }
  .v404-main { padding-bottom: 0; }
}
