/**
 * S5 Casino - Universal CSS Styles
 * Mobile-first responsive design with s86b- prefix classes
 * Color scheme: #F0F0F0 | #8B7355 | #FFDEAD | #0D1117
 * Version: 1.0
 */

/* CSS Custom Properties */
:root {
  --s86b-primary: #0D1117;
  --s86b-secondary: #8B7355;
  --s86b-accent: #FFDEAD;
  --s86b-text: #F0F0F0;
  --s86b-text-muted: #B0B0B0;
  --s86b-bg: #0D1117;
  --s86b-bg-light: #1A1F26;
  --s86b-bg-card: #212830;
  --s86b-border: #2F3136;
  --s86b-shadow: rgba(0, 0, 0, 0.3);
  --s86b-radius: 0.8rem;
  --s86b-radius-sm: 0.4rem;
  --s86b-transition: all 0.3s ease;
  --s86b-header-height: 6rem;
  --s86b-bottom-nav-height: 6rem;
  --vh: 1vh;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--s86b-text);
  background-color: var(--s86b-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--s86b-text);
}

h1 {
  font-size: 2.4rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.8rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--s86b-text-muted);
}

a {
  color: var(--s86b-accent);
  text-decoration: none;
  transition: var(--s86b-transition);
}

a:hover {
  color: var(--s86b-text);
}

/* Layout Components */
.s86b-container {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.s86b-wrapper {
  min-height: calc(100vh - var(--s86b-header-height) - var(--s86b-bottom-nav-height));
  padding-top: var(--s86b-header-height);
  padding-bottom: var(--s86b-bottom-nav-height);
}

.s86b-grid {
  display: grid;
  gap: 1.5rem;
}

.s86b-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.s86b-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.s86b-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.s86b-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

/* Button Components */
.s86b-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  min-height: 4.4rem;
  font-size: 1.4rem;
  font-weight: 600;
  border: none;
  border-radius: var(--s86b-radius);
  cursor: pointer;
  transition: var(--s86b-transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.s86b-btn-primary {
  background: linear-gradient(135deg, var(--s86b-accent), #FFE4B5);
  color: var(--s86b-primary);
}

.s86b-btn-primary:hover,
.s86b-btn-primary:focus {
  transform: translateY(-0.2rem);
  box-shadow: 0 0.5rem 1.5rem var(--s86b-shadow);
}

.s86b-btn-secondary {
  background: var(--s86b-secondary);
  color: var(--s86b-text);
  border: 0.1rem solid var(--s86b-border);
}

.s86b-btn-outline {
  background: transparent;
  color: var(--s86b-accent);
  border: 0.1rem solid var(--s86b-accent);
}

.s86b-btn-sm {
  padding: 0.8rem 1.6rem;
  min-height: 3.6rem;
  font-size: 1.2rem;
}

/* Promotional Links */
.promo-link,
.game-item {
  cursor: pointer;
  transition: var(--s86b-transition);
  position: relative;
}

.promo-link:hover,
.game-item:hover {
  transform: translateY(-0.1rem);
}

/* Card Components */
.s86b-card {
  background: var(--s86b-bg-card);
  border-radius: var(--s86b-radius);
  padding: 2rem;
  box-shadow: 0 0.2rem 1rem var(--s86b-shadow);
  border: 0.1rem solid var(--s86b-border);
}

/* Header Navigation */
.s86b-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--s86b-header-height);
  background: var(--s86b-bg-light);
  border-bottom: 0.1rem solid var(--s86b-border);
  z-index: 1000;
  backdrop-filter: blur(1rem);
}

.s86b-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
  max-width: 43rem;
  margin: 0 auto;
}

.s86b-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--s86b-text);
  text-decoration: none;
}

.s86b-logo-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
}

.s86b-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.s86b-mobile-menu-btn {
  width: 4.4rem;
  height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--s86b-text);
  cursor: pointer;
  font-size: 2rem;
}

/* Mobile Navigation Menu */
.s86b-mobile-menu {
  position: fixed;
  top: var(--s86b-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--s86b-bg-light);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.s86b-mobile-menu.s86b-menu-open {
  transform: translateY(0);
}

.s86b-menu-list {
  list-style: none;
  padding: 2rem;
}

.s86b-menu-item {
  margin-bottom: 1rem;
}

.s86b-menu-link {
  display: block;
  padding: 1.5rem;
  color: var(--s86b-text);
  font-size: 1.6rem;
  font-weight: 500;
  border-radius: var(--s86b-radius);
  transition: var(--s86b-transition);
  min-height: 4.4rem;
  display: flex;
  align-items: center;
}

.s86b-menu-link:hover {
  background: var(--s86b-bg-card);
  color: var(--s86b-accent);
}

/* Carousel Component */
.s86b-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--s86b-radius);
  margin-bottom: 2rem;
}

.s86b-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.s86b-carousel-slide {
  width: 100%;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.s86b-carousel-slide.s86b-slide-active {
  opacity: 1;
}

.s86b-carousel-image {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  cursor: pointer;
}

.s86b-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.s86b-carousel-indicator {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--s86b-transition);
}

.s86b-carousel-indicator.s86b-indicator-active {
  background: var(--s86b-accent);
}

/* Game Grid */
.s86b-games-section {
  margin-bottom: 3rem;
}

.s86b-section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--s86b-accent);
  text-align: center;
}

.s86b-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.s86b-game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: var(--s86b-radius-sm);
  background: var(--s86b-bg-card);
  transition: var(--s86b-transition);
  cursor: pointer;
  min-height: 8rem;
}

.s86b-game-item:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 0.4rem 1.2rem var(--s86b-shadow);
  background: var(--s86b-bg-light);
}

.s86b-game-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 0.6rem;
  margin-bottom: 0.5rem;
  object-fit: cover;
}

.s86b-game-name {
  font-size: 1rem;
  text-align: center;
  color: var(--s86b-text-muted);
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Content Sections */
.s86b-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--s86b-bg-card);
  border-radius: var(--s86b-radius);
  border: 0.1rem solid var(--s86b-border);
}

.s86b-section h2 {
  color: var(--s86b-accent);
  margin-bottom: 1.5rem;
}

.s86b-section p {
  margin-bottom: 1.5rem;
}

/* Bottom Navigation */
.s86b-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--s86b-bottom-nav-height);
  background: var(--s86b-bg-light);
  border-top: 0.1rem solid var(--s86b-border);
  z-index: 1000;
  backdrop-filter: blur(1rem);
}

.s86b-bottom-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.s86b-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 4.4rem;
  text-decoration: none;
  color: var(--s86b-text-muted);
  transition: var(--s86b-transition);
  cursor: pointer;
  padding: 0.5rem;
}

.s86b-bottom-nav-item:hover,
.s86b-bottom-nav-item.s86b-nav-active {
  color: var(--s86b-accent);
  transform: scale(1.05);
}

.s86b-bottom-nav-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}

.s86b-bottom-nav-text {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */
.s86b-footer {
  background: var(--s86b-bg-light);
  border-top: 0.1rem solid var(--s86b-border);
  padding: 3rem 0;
  margin-top: 4rem;
}

.s86b-footer-content {
  text-align: center;
}

.s86b-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.s86b-footer-link {
  color: var(--s86b-text-muted);
  font-size: 1.3rem;
  padding: 0.5rem 1rem;
  border-radius: var(--s86b-radius-sm);
  transition: var(--s86b-transition);
  min-height: 3.6rem;
  display: flex;
  align-items: center;
}

.s86b-footer-link:hover {
  color: var(--s86b-accent);
  background: var(--s86b-bg-card);
}

.s86b-partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.s86b-partner-logo {
  width: 4rem;
  height: 4rem;
  border-radius: 0.4rem;
  opacity: 0.7;
  transition: var(--s86b-transition);
}

.s86b-partner-logo:hover {
  opacity: 1;
}

.s86b-copyright {
  color: var(--s86b-text-muted);
  font-size: 1.2rem;
}

/* Utility Classes */
.s86b-text-center {
  text-align: center;
}

.s86b-text-primary {
  color: var(--s86b-accent);
}

.s86b-text-muted {
  color: var(--s86b-text-muted);
}

.s86b-mb-1 { margin-bottom: 1rem; }
.s86b-mb-2 { margin-bottom: 2rem; }
.s86b-mb-3 { margin-bottom: 3rem; }

.s86b-mt-1 { margin-top: 1rem; }
.s86b-mt-2 { margin-top: 2rem; }
.s86b-mt-3 { margin-top: 3rem; }

.s86b-p-1 { padding: 1rem; }
.s86b-p-2 { padding: 2rem; }
.s86b-p-3 { padding: 3rem; }

/* Animation Classes */
.s86b-fade-in {
  opacity: 0;
  animation: s86bFadeIn 0.5s ease forwards;
}

.s86b-slide-up {
  transform: translateY(2rem);
  opacity: 0;
  animation: s86bSlideUp 0.5s ease forwards;
}

@keyframes s86bFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes s86bSlideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Ripple Effect */
.s86b-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: s86bRipple 0.6s linear;
  pointer-events: none;
}

@keyframes s86bRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Touch States */
.s86b-touching {
  transform: scale(0.95);
  opacity: 0.8;
}

/* Loading States */
.s86b-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--s86b-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s86b-fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Responsive Design */
@media (min-width: 48rem) {
  .s86b-container {
    padding: 0 2rem;
  }
  
  .s86b-games-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .s86b-game-icon {
    width: 4.8rem;
    height: 4.8rem;
  }
  
  .s86b-game-name {
    font-size: 1.1rem;
  }
  
  .s86b-carousel-image {
    height: 25rem;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .s86b-game-icon,
  .s86b-partner-logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
} 