/* CSS Variables */
:root {
  --bg: #1f2430;
  --panel: #272d3a;
  --panel-2: #30384a;
  --text: #e7ecf5;
  --muted: #a6b0c3;
  --accent: #56ccf2;
  --cta: #ffd166;
  --pill: #ff7aa2;
  --success: #7bd88f;
  --warning: #ffd166;
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.35);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--cta);
}

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

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(31, 36, 48, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  height: 40px;
  margin-left: 0;
}

@media (min-width: 768px) {
  .header-content {
    gap: 0.75rem;
  }
  
  .header-left {
    gap: 0.5rem;
  }
  
  .logo {
    margin-left: 0;
  }
  
  .burger-menu {
    margin-right: 0;
  }
}

.logo-img {
  height: 100%;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.burger-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.burger-menu svg {
  width: 24px;
  height: 24px;
}

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

.pill-promo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--pill);
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.pill-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 122, 162, 0.4);
}

.pill-promo svg {
  width: 18px;
  height: 18px;
}

.btn-outline {
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

.btn-filled {
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, var(--cta), #ffb84d);
  border: none;
  color: var(--bg);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-filled:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 209, 102, 0.4);
}

@media (max-width: 767px) {
  .header-actions {
    gap: 0.5rem;
  }
  
  .pill-promo {
    display: none;
  }
  
  .btn-outline,
  .btn-filled {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
  
  .logo {
    height: 32px;
  }
  
  .logo-img {
    max-height: 32px;
  }
}

/* Sidebar Menu */
.sidebar-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: var(--panel);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}

.sidebar-menu.active {
  transform: translateX(0);
}

.sidebar-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-menu nav {
  margin-top: 3rem;
}

.sidebar-menu nav a {
  display: block;
  padding: 1rem 0;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu .seo-nav {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-menu .seo-nav h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu .seo-nav a {
  font-size: 0.875rem;
  padding: 0.75rem 0;
  color: var(--muted);
}

.sidebar-menu .seo-nav a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 3rem 1rem 2rem;
  margin-bottom: 2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1f2e 0%, #2d3a52 100%);
  z-index: -2;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--cta), #ffb84d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.bottom-banner {
  margin-top: 4rem;
  margin-bottom: 2rem;
}

@media (max-width: 767px) {
  .hero {
    min-height: 300px;
    padding: 1.5rem 1rem 1rem;
    align-items: flex-end;
  }
  
  .hero-content {
    padding-bottom: 0;
    width: 100%;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .hero-cta .btn-filled,
  .hero-cta .btn-outline {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
}

/* Categories */
.categories {
  margin-bottom: 2rem;
}

.categories-list {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.categories-list::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  scroll-snap-align: start;
  white-space: nowrap;
}

.category-pill:hover,
.category-pill.active {
  background: var(--panel-2);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(86, 204, 242, 0.2);
}

.category-pill svg {
  width: 18px;
  height: 18px;
}

/* Search */
.search-section {
  margin-bottom: 2rem;
}

.search-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--panel);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(86, 204, 242, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}

/* Promo Banners */
.promo-banners-section {
  margin-bottom: 3rem;
  width: 100%;
  padding: 0 1rem;
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .promo-banners-section {
    padding: 0 2rem;
  }
}

.promo-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 767px) {
  .promo-banners {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.promo-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  display: block;
  opacity: 1;
  visibility: visible;
}

.promo-banner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.promo-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  object-fit: contain;
  background: var(--panel);
}

/* Section */
.section {
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.reveal {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.section-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Slider */
.slider-container {
  position: relative;
  width: 100%;
}

.slider-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
  /* iOS Safari optimizations */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: scroll-position;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
  opacity: 0.8;
}

.slider-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
  opacity: 1;
}

.slider-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slider-btn-prev {
  left: -24px;
}

.slider-btn-next {
  right: -24px;
}

@media (max-width: 1023px) {
  .slider-btn {
    display: none;
  }
}

/* Game Cards */
.game-card {
  flex-shrink: 0;
  width: 280px;
  scroll-snap-align: start;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}

/* Les cartes dans les carrousels sont immédiatement visibles, sans animation */
.slider-track .game-card {
  opacity: 1;
  transform: translateY(0);
}

.game-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.game-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* Optimisations pour mobile */
@media (max-width: 1023px) {
  .slider-track {
    /* Permettre le scroll vertical de la page si nécessaire */
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    /* Améliorer les performances sur iOS */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }
  
  .slider-track:active .game-card:hover {
    transform: none;
    box-shadow: none;
  }
}

.game-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

@media (max-width: 767px) {
  .game-card {
    width: 240px;
  }
  
  .game-card-image {
    aspect-ratio: 16 / 9;
  }
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.game-card:hover .game-card-image img {
  transform: scale(1.1);
}

.game-card-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--cta);
  color: var(--bg);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.game-card-content {
  padding: 1rem;
}

.game-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-provider {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.game-card-btn {
  width: 100%;
  padding: 0.5rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.game-card-btn:hover {
  background: var(--cta);
}

/* Grid Layout */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

@media (min-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (min-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Large Game Cards (Blackjack) */
.game-card-large {
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.game-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.game-card-large-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.game-card-large-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-large-content {
  padding: 1.5rem;
}

.game-card-large-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.game-card-large-provider {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.blackjack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Live Providers */
.live-providers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.live-provider-card {
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.live-provider-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.live-provider-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.live-provider-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-provider-content {
  padding: 1rem;
  text-align: center;
}

.live-provider-title {
  font-size: 1rem;
  font-weight: 600;
}

/* SEO Text Section */
.seo-text {
  max-width: 860px;
  margin: 4rem auto;
  padding: 2rem 1rem;
}

.seo-text h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  color: var(--text);
  line-height: 1.3;
}

.seo-banner {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.seo-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.seo-text h2 {
  position: relative;
  padding-bottom: 1rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.seo-text h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--pill), var(--cta));
  border-radius: 2px;
}

.seo-text h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.seo-text p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.seo-text ul,
.seo-text ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.seo-text li {
  margin-bottom: 0.5rem;
}

.seo-text blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-style: italic;
}

/* FAQ Accordion */
.faq-list {
  margin-top: 2rem;
}

.faq-item {
  background: var(--panel);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--accent);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question span {
  flex: 1;
  margin-right: 1rem;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* SEO Tables */
.seo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}

.seo-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.seo-table tbody tr:last-child {
  border-bottom: none;
}

.seo-table tbody tr:hover {
  background: var(--panel-2);
}

.seo-table td {
  padding: 1rem 1.5rem;
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
}

/* Help Section */
.help-section {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  margin: 4rem 0;
  text-align: center;
}

.help-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.help-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--cta);
  color: var(--bg);
  border-radius: var(--radius);
  font-size: 1.125rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2rem;
}

.help-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 209, 102, 0.4);
}

.help-chat-btn svg {
  width: 24px;
  height: 24px;
}

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

.help-links a {
  color: var(--muted);
  font-size: 0.875rem;
}

.help-links a:hover {
  color: var(--accent);
}

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

.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-size: 0.875rem;
}

.lang-selector svg {
  width: 20px;
  height: 15px;
}

/* Footer */
.footer {
  background: var(--panel);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-warning {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 107, 107, 0.1);
  border-left: 4px solid var(--danger);
  border-radius: 4px;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Loading States */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth Scrolling */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 360px;
  max-width: calc(100% - 40px);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.chat-widget.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-widget-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.chat-widget-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.chat-widget-close svg {
  width: 16px;
  height: 16px;
}

.chat-widget-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-widget-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--cta));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  flex-shrink: 0;
}

.chat-widget-avatar svg {
  width: 24px;
  height: 24px;
}

.chat-widget-info {
  flex: 1;
  min-width: 0;
}

.chat-widget-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.chat-widget-status {
  font-size: 0.75rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-widget-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.chat-widget-messages {
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.chat-message {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.chat-message-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--cta));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  flex-shrink: 0;
}

.chat-message-avatar svg {
  width: 18px;
  height: 18px;
}

.chat-message-content {
  flex: 1;
  min-width: 0;
}

.chat-message-text {
  background: var(--panel-2);
  padding: 0.75rem 1rem;
  border-radius: 12px 12px 12px 4px;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.chat-message-bonus {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.15), rgba(255, 184, 77, 0.15));
  border: 2px solid var(--cta);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.chat-bonus-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cta);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.chat-bonus-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.chat-bonus-btn {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--cta), #ffb84d);
  color: var(--bg);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.chat-bonus-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 209, 102, 0.4);
}

@media (max-width: 767px) {
  .chat-widget {
    width: calc(100% - 20px);
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
  
  .chat-widget-header {
    padding: 1rem;
  }
  
  .chat-widget-messages {
    padding: 0.875rem;
  }
  
  .chat-message-text {
    font-size: 0.8125rem;
    padding: 0.625rem 0.875rem;
  }
  
  .chat-bonus-amount {
    font-size: 1rem;
  }
  
  .chat-bonus-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .sidebar-menu,
  .slider-btn,
  .help-section,
  .footer,
  .chat-widget {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Mini Game: 3 Cups */
.mini-game-section {
  padding: 4rem 1rem;
  background: var(--panel);
  border-radius: var(--radius);
  margin: 2rem auto;
  max-width: 800px;
}

.mini-game-wrapper {
  text-align: center;
}

.mini-game-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2rem;
  color: var(--text);
}

.cups-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.game-splash {
  position: absolute;
  top: auto;
  bottom: auto;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 600px;
  min-height: 400px;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 100;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
  margin: 0 auto;
}

.game-splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-screen {
  width: 100%;
  max-width: 600px;
  min-height: 400px;
  height: auto;
  background: var(--panel-2);
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: visible;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding-bottom: 100px;
}

.game-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('img/back.webp') center/cover no-repeat;
  filter: blur(3px) brightness(0.6);
  border-radius: var(--radius);
  z-index: 0;
  pointer-events: none;
}

.game-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  z-index: 0;
  pointer-events: none;
}

.game-screen > * {
  position: relative;
  z-index: 1;
}

.cups-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 4vw, 2rem);
  width: 100%;
  min-height: 300px;
  position: relative;
  padding: 2rem 1rem;
  overflow: visible;
  padding-bottom: 100px;
}

.cup {
  position: relative;
  width: clamp(100px, 20vw, 140px);
  height: clamp(130px, 25vw, 180px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  isolation: isolate;
  flex-shrink: 0;
}

.cup > .ball {
  position: absolute;
}

.cup:hover:not(.disabled) {
  transform: translateY(-8px) scale(1.05);
  filter: brightness(1.1);
}

.cup.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cup.selected {
  transform: translateY(-15px) scale(1.1);
  filter: brightness(1.2) drop-shadow(0 10px 20px rgba(255, 209, 102, 0.4));
}

.cup-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 21;
  background: transparent;
  pointer-events: none;
}

.cup:hover:not(.disabled) .cup-image {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

.cup.moving {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ball {
  position: absolute;
  width: clamp(60px, 12vw, 80px);
  height: clamp(60px, 12vw, 80px);
  object-fit: contain;
  z-index: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 1;
  visibility: visible;
  filter: drop-shadow(0 4px 12px rgba(255, 209, 102, 0.6));
  pointer-events: none;
}

.ball-initial {
  z-index: 10;
  opacity: 1 !important;
  visibility: visible !important;
}

.ball.under-cup {
  z-index: 1;
}

.ball.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
}

.ball.visible {
  opacity: 1 !important;
  visibility: visible !important;
  animation: ballBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 6px 20px rgba(255, 209, 102, 0.8));
}

@keyframes ballBounce {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  20% {
    transform: translate(-50%, calc(-50% - 25px)) scale(1.15);
  }
  40% {
    transform: translate(-50%, calc(-50% - 8px)) scale(1.05);
  }
  60% {
    transform: translate(-50%, calc(-50% - 15px)) scale(1.1);
  }
  80% {
    transform: translate(-50%, calc(-50% - 3px)) scale(1.02);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes ballAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 50px)) scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, calc(-50% - 10px)) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.ball.appearing {
  animation: ballAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cupShuffle {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(15px, 0) rotate(3deg) scale(1.02);
  }
  50% {
    transform: translate(0, 0) rotate(0deg) scale(1.05);
  }
  75% {
    transform: translate(-15px, 0) rotate(-3deg) scale(1.02);
  }
}

@keyframes cupCover {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(0, 50px) scale(1);
  }
}

.cup.covering {
  animation: cupCover 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cup.shuffling {
  animation: cupShuffle 0.3s ease-in-out;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.game-status {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-message {
  font-size: 1.125rem;
  color: var(--text);
  font-weight: 500;
  text-align: center;
}

.game-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 600px;
  margin-bottom: 1rem;
  position: relative;
  z-index: 101;
}

.attempts-counter {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Bonus Modal */
.bonus-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.bonus-modal.active {
  opacity: 1;
  pointer-events: all;
}

.bonus-modal-content {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.bonus-modal.active .bonus-modal-content {
  transform: scale(1);
}

.bonus-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.bonus-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.bonus-modal-close svg {
  width: 18px;
  height: 18px;
}

.bonus-modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.bonus-modal-header h2 {
  font-size: 2rem;
  color: var(--cta);
  margin-bottom: 0.5rem;
}

.bonus-modal-header p {
  color: var(--muted);
  font-size: 1.125rem;
}

.bonus-modal-body {
  text-align: center;
}

.bonus-offer {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.15), rgba(255, 184, 77, 0.15));
  border: 2px solid var(--cta);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.bonus-offer h3 {
  font-size: 1.5rem;
  color: var(--cta);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bonus-text {
  font-size: 1.125rem;
  color: var(--text);
  line-height: 1.6;
}

.bonus-btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

@media (max-width: 767px) {
  .game-splash {
    max-width: 100%;
    min-height: 350px;
    height: 100%;
    left: 0;
    right: 0;
    margin: 0;
    width: 100%;
  }

  .splash-image {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
    display: block;
  }

  .game-screen {
    max-width: 100%;
    min-height: 350px;
    padding-bottom: 80px;
  }

  .cups-container {
    gap: 1rem;
    padding: 1rem 0.5rem;
    padding-bottom: 80px;
    min-height: 250px;
  }

  .cup {
    width: clamp(90px, 25vw, 120px);
    height: clamp(120px, 30vw, 150px);
  }

  .ball {
    width: clamp(55px, 15vw, 70px);
    height: clamp(55px, 15vw, 70px);
  }

  .mini-game-section {
    padding: 2rem 1rem;
  }

  .bonus-modal-content {
    padding: 1.5rem;
  }

  .bonus-modal-header h2 {
    font-size: 1.5rem;
  }
}

