/**
 * juan 365 - Core CSS Stylesheet
 * Class prefix: s8b4-
 * Color palette: #FFC0CB | #DA70D6 | #FAFAFA | #9370DB | #212F3D | #FFCCCB
 * Dark bg: #212F3D, Light text: #FAFAFA
 */

/* CSS Variables */
:root {
  --s8b4-primary: #9370DB;
  --s8b4-secondary: #DA70D6;
  --s8b4-accent: #FFC0CB;
  --s8b4-bg: #212F3D;
  --s8b4-bg-light: #2C3E50;
  --s8b4-text: #FAFAFA;
  --s8b4-text-muted: #BDC3C7;
  --s8b4-border: #9370DB;
  --s8b4-card-bg: #1A252F;
  --s8b4-highlight: #FFCCCB;
  --s8b4-success: #2ECC71;
  --s8b4-warning: #F39C12;
  --s8b4-danger: #E74C3C;
  --s8b4-gradient: linear-gradient(135deg, #9370DB, #DA70D6);
  --s8b4-gradient-warm: linear-gradient(135deg, #FFC0CB, #DA70D6);
  --s8b4-radius: 8px;
  --s8b4-radius-lg: 12px;
  --s8b4-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --s8b4-transition: all 0.3s ease;
}

/* Base Reset */
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--s8b4-bg);
  color: var(--s8b4-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Header */
.s8b4-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #212F3D 0%, #1A252F 100%);
  border-bottom: 1px solid rgba(147, 112, 219, 0.3);
  padding: 0.8rem 1rem;
  backdrop-filter: blur(10px);
}

.s8b4-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 430px;
  margin: 0 auto;
}

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

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

.s8b4-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--s8b4-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.s8b4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--s8b4-radius);
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--s8b4-transition);
  text-decoration: none;
  min-height: 36px;
  min-width: 44px;
}

.s8b4-btn-register {
  background: var(--s8b4-gradient);
  color: #FFFFFF;
}

.s8b4-btn-register:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(147, 112, 219, 0.5);
}

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

.s8b4-btn-login:hover {
  background: rgba(147, 112, 219, 0.15);
  transform: scale(1.05);
}

.s8b4-menu-toggle {
  background: none;
  border: none;
  color: var(--s8b4-text);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--s8b4-radius);
}

.s8b4-menu-toggle:hover {
  background: rgba(147, 112, 219, 0.2);
}

/* Mobile Menu */
.s8b4-mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--s8b4-bg-light);
  z-index: 9999;
  transition: right 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.s8b4-menu-active {
  right: 0 !important;
}

.s8b4-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--s8b4-transition);
}

.s8b4-overlay-active {
  opacity: 1;
  visibility: visible;
}

.s8b4-menu-close {
  background: none;
  border: none;
  color: var(--s8b4-text);
  font-size: 2.4rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s8b4-menu-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
}

.s8b4-menu-list li {
  margin-bottom: 0.4rem;
}

.s8b4-menu-list a {
  display: block;
  padding: 1rem 1.2rem;
  color: var(--s8b4-text);
  text-decoration: none;
  font-size: 1.4rem;
  border-radius: var(--s8b4-radius);
  transition: var(--s8b4-transition);
  min-height: 44px;
}

.s8b4-menu-list a:hover {
  background: rgba(147, 112, 219, 0.2);
  color: var(--s8b4-primary);
}

/* Main Content */
.s8b4-main {
  padding-top: 60px;
  min-height: 100vh;
}

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

/* Carousel */
.s8b4-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--s8b4-radius-lg);
  margin: 1rem 0;
}

.s8b4-carousel-slide {
  display: none;
  width: 100%;
  cursor: pointer;
  border-radius: var(--s8b4-radius-lg);
  overflow: hidden;
}

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

.s8b4-carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--s8b4-radius-lg);
}

.s8b4-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

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

.s8b4-dot-active {
  background: var(--s8b4-primary);
  transform: scale(1.3);
}

/* Section Titles */
.s8b4-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--s8b4-text);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--s8b4-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

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

.s8b4-game-item {
  text-align: center;
  cursor: pointer;
  transition: var(--s8b4-transition);
  border-radius: var(--s8b4-radius);
  padding: 0.5rem;
  background: var(--s8b4-card-bg);
}

.s8b4-game-item:hover {
  transform: scale(1.05);
  background: rgba(147, 112, 219, 0.15);
}

.s8b4-game-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--s8b4-radius);
  margin-bottom: 0.3rem;
}

.s8b4-game-name {
  font-size: 1.1rem;
  color: var(--s8b4-text-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Content Cards */
.s8b4-card {
  background: var(--s8b4-card-bg);
  border-radius: var(--s8b4-radius-lg);
  padding: 1.5rem;
  margin: 1rem 0;
  border: 1px solid rgba(147, 112, 219, 0.15);
}

.s8b4-card h3 {
  color: var(--s8b4-primary);
  font-size: 1.6rem;
  margin: 0 0 0.8rem 0;
}

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

/* Promo Buttons in Content */
.s8b4-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  background: var(--s8b4-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: var(--s8b4-radius);
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--s8b4-transition);
  text-decoration: none;
  min-height: 44px;
}

.s8b4-promo-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(147, 112, 219, 0.4);
}

.s8b4-promo-link {
  color: var(--s8b4-secondary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--s8b4-transition);
}

.s8b4-promo-link:hover {
  color: var(--s8b4-accent);
  text-decoration: underline;
}

/* Footer */
.s8b4-footer {
  background: var(--s8b4-card-bg);
  padding: 2rem 1.2rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(147, 112, 219, 0.2);
}

.s8b4-footer-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.s8b4-footer-brand p {
  color: var(--s8b4-text-muted);
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0.3rem 0;
}

.s8b4-footer-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.s8b4-footer-buttons .s8b4-btn {
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
}

.s8b4-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin: 1rem 0;
}

.s8b4-footer-links a {
  color: var(--s8b4-text-muted);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--s8b4-transition);
}

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

.s8b4-copyright {
  text-align: center;
  color: rgba(189, 195, 199, 0.6);
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* Bottom Navigation */
.s8b4-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #1A252F 0%, #151E27 100%);
  border-top: 1px solid rgba(147, 112, 219, 0.3);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  padding: 0 0.5rem;
}

.s8b4-bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--s8b4-text-muted);
  cursor: pointer;
  padding: 0.4rem;
  min-width: 60px;
  min-height: 56px;
  transition: var(--s8b4-transition);
  border-radius: var(--s8b4-radius);
  text-decoration: none;
}

.s8b4-bottom-nav-btn i,
.s8b4-bottom-nav-btn .material-icons,
.s8b4-bottom-nav-btn ion-icon,
.s8b4-bottom-nav-btn bi {
  font-size: 22px;
  margin-bottom: 2px;
}

.s8b4-bottom-nav-btn span {
  font-size: 1rem;
  line-height: 1.2;
}

.s8b4-bottom-nav-btn:hover {
  color: var(--s8b4-primary);
  transform: scale(1.1);
}

.s8b4-bottom-nav-btn:active {
  transform: scale(0.95);
}

.s8b4-bottom-nav-active {
  color: var(--s8b4-primary);
}

.s8b4-bottom-nav-active::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--s8b4-gradient);
  border-radius: 1px;
  margin-top: 1px;
}

/* Desktop: hide bottom nav */
@media (min-width: 769px) {
  .s8b4-bottom-nav {
    display: none;
  }
}

/* Utility Classes */
.s8b4-text-center { text-align: center; }
.s8b4-text-gradient {
  background: var(--s8b4-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.s8b4-mt-1 { margin-top: 1rem; }
.s8b4-mt-2 { margin-top: 2rem; }
.s8b4-mb-1 { margin-bottom: 1rem; }
.s8b4-mb-2 { margin-bottom: 2rem; }
.s8b4-hidden { display: none; }

/* Winner Ticker */
.s8b4-winner-ticker {
  background: var(--s8b4-card-bg);
  border-radius: var(--s8b4-radius);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0;
  overflow: hidden;
}

.s8b4-winner-ticker i {
  color: var(--s8b4-warning);
  font-size: 1.6rem;
}

.s8b4-winner-text {
  font-size: 1.2rem;
  color: var(--s8b4-highlight);
  white-space: nowrap;
  animation: s8b4-ticker-scroll 12s linear infinite;
}

@keyframes s8b4-ticker-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Security Badge */
.s8b4-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(46, 204, 113, 0.15);
  color: var(--s8b4-success);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* RTP Compact Table */
.s8b4-rtp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2rem;
}

.s8b4-rtp-table th {
  background: rgba(147, 112, 219, 0.2);
  color: var(--s8b4-primary);
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 600;
}

.s8b4-rtp-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid rgba(147, 112, 219, 0.1);
  color: var(--s8b4-text-muted);
}

/* FAQ Accordion */
.s8b4-faq-item {
  border: 1px solid rgba(147, 112, 219, 0.15);
  border-radius: var(--s8b4-radius);
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.s8b4-faq-q {
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--s8b4-text);
  background: var(--s8b4-card-bg);
  font-size: 1.3rem;
}

.s8b4-faq-a {
  padding: 0.8rem 1.2rem;
  color: var(--s8b4-text-muted);
  font-size: 1.2rem;
  line-height: 1.5;
  background: rgba(26, 37, 47, 0.5);
}

/* Payment Icons Row */
.s8b4-payment-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.s8b4-payment-item {
  background: var(--s8b4-card-bg);
  border-radius: var(--s8b4-radius);
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  color: var(--s8b4-text-muted);
  border: 1px solid rgba(147, 112, 219, 0.15);
}
