
/* =========================================
   1. Reset & Variables
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --color-bg-body: #0f172a;
  --color-bg-surface: #1e293b;
  --color-bg-surface-hover: #334155;
  --color-primary: #00f0ff;
  --color-primary-hover: #00c3ff;
  --color-secondary: #3b82f6;
  --color-accent: #f59e0b;
  --color-text-main: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.25rem;
  --font-size-h1: clamp(1.75rem, 5vw, 2.5rem);
  --font-size-h2: clamp(1.5rem, 4vw, 2rem);

  /* Spacing */
  --container-width: 1200px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-round: 50%;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 15px rgba(0, 240, 255, 0.3);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

ul {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

/* =========================================
   2. Header Styles
   ========================================= */
header {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: var(--spacing-sm);
}

.header-flex {
  min-height: 60px;
  gap: var(--spacing-sm);
}

.header-logo {
  display: block;
  width: 140px;
  height: 40px;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNTAgNDAiPjx0ZXh0IHg9IjUwJSIgeT0iNTAlIiBkb21pbmFudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjZmZmIiBmb250LXNpemU9IjI0IiBmb250LXdlaWdodD0iYm9sZCI+MVhTTE9UUzwvdGV4dD48L3N2Zz4='); /* Placeholder logo */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center left;
}

.header-buttons {
  gap: var(--spacing-sm);
}

.header-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6em 1.2em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.header-button span {
  position: relative;
  z-index: 2;
}

.header-button:not(.header-button-type-2) {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-bg-body);
  box-shadow: var(--shadow-glow);
}

.header-button:not(.header-button-type-2):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.header-button-type-2 {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
}

.header-button-type-2:hover {
  border-color: var(--color-text-main);
  background-color: rgba(255,255,255,0.05);
}

/* Lang Switcher */
.header-lang-switcher {
  position: relative;
  margin-left: var(--spacing-sm);
}

.header-lang-switcher-current {
  width: 24px;
  height: 16px;
  background: #ccc; /* Flag placeholder */
  cursor: pointer;
  border-radius: 2px;
}

.header-lang-switcher-list {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  display: none; /* Hidden by default */
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-soft);
}

.header-lang-switcher:hover .header-lang-switcher-list {
  display: flex;
}

.header-lang-switcher-item {
  width: 24px;
  height: 16px;
  background: #888; /* Flag placeholder */
  display: block;
  border-radius: 2px;
}

/* Burger Menu */
.header-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.header-burger span {
  width: 24px;
  height: 2px;
  background-color: var(--color-text-main);
  border-radius: 2px;
}

/* Menu Row */
.header-menu-row {
  background-color: rgba(15, 23, 42, 0.8);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: var(--spacing-xs) 0;
}

.header-menu {
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.menu-item {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.menu-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-fast);
}

.menu-item:hover {
  color: var(--color-text-main);
}

.menu-item:hover::after {
  width: 100%;
}

/* =========================================
   3. Main Slider Section
   ========================================= */
.slider-section {
  padding: var(--spacing-lg) 0;
  position: relative;
  overflow: hidden;
}

.main-slider-wrapper {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--spacing-sm);
}

/* Hide scrollbar */
.main-slider-wrapper::-webkit-scrollbar {
  display: none;
}
.main-slider-wrapper {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.main-slider {
  gap: var(--spacing-md);
  width: max-content;
}

.main-slide-outer {
  scroll-snap-align: start;
  width: 300px; /* Fixed width for cards */
  flex-shrink: 0;
}

.main-slide {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  height: 100%;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-medium);
  display: flex;
  flex-direction: column;
}

.main-slide:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  border-color: var(--color-primary);
}

.main-slide-inner {
  padding: var(--spacing-md);
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 2;
}

.main-slide-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.main-slide-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: auto;
}

.main-slide-button-wrap {
  margin-top: var(--spacing-sm);
}

.main-slide-button {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 0.5em 1em;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.main-slide-button:hover {
  background: var(--color-primary);
  color: #000;
}

.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  width: 100%;
  border-radius: 2px;
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
  display: none; /* Hidden simplified */
}

/* =========================================
   4. Content Section & Tabs
   ========================================= */
.content-section {
  padding: var(--spacing-lg) 0;
}

h1 {
  font-size: var(--font-size-h1);
  margin-bottom: var(--spacing-lg);
  text-align: left;
  background: linear-gradient(90deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.content-flex {
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.content-col {
  flex: 1;
  min-width: 300px;
}

.content-tabs-switchers {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--color-border);
}

.content-tabs-switcher {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.content-tabs-switcher:hover {
  color: var(--color-text-main);
}

.content-tabs-switcher.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.content-tabs-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.content-tabs-content.active {
  display: block;
}

/* Mobile tab switcher fix - hide redundant internal buttons */
.content-tabs-content > .content-tabs-switcher {
  display: none;
}

.content-tabs-content-deep {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.content-tabs-content-deep h2 {
  color: #fff;
  font-size: var(--font-size-h2);
  margin: 1.5em 0 0.75em;
}

.content-tabs-content-deep h3 {
  color: #fff;
  font-size: 1.25rem;
  margin: 1.25em 0 0.5em;
}

.content-tabs-content-deep p {
  margin-bottom: 1rem;
}

.content-tabs-content-deep ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.content-tabs-content-deep li {
  margin-bottom: 0.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sidebar */
.content-sidebar {
  width: 300px;
  flex-shrink: 0;
}

.content-sidebar-widget {
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  position: sticky;
  top: 100px;
}

.content-sidebar-widget-frontside {
  padding: var(--spacing-md);
  background: linear-gradient(135deg, var(--color-bg-surface) 0%, rgba(0, 240, 255, 0.05) 100%);
}

.content-sidebar-widget-frontside-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.content-sidebar-widget-frontside-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.content-sidebar-widget-backside {
  padding: var(--spacing-md);
  background: var(--color-bg-body);
  flex-direction: column;
  text-align: center;
  gap: var(--spacing-sm);
}

.content-sidebar-widget-button {
  background: var(--color-primary);
  color: #000;
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: bold;
  text-align: center;
  transition: var(--transition-medium);
}

.content-sidebar-widget-button:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 0 15px rgba(0, 195, 255, 0.5);
}

/* =========================================
   5. Games Slider
   ========================================= */
.games-slider-section {
  padding: var(--spacing-lg) 0;
  background: linear-gradient(to bottom, var(--color-bg-body), #162032);
}

.games-slider-wrapper {
  position: relative;
  padding: 0 40px;
}

.custom-prev,
.custom-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}

.custom-prev:hover,
.custom-next:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.custom-prev svg,
.custom-next svg {
  width: 12px;
  fill: #fff;
}

.custom-prev:hover svg,
.custom-next:hover svg {
  fill: #000;
}

.custom-prev { left: 0; }
.custom-next { right: 0; }

.games-slider {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--spacing-sm);
  /* The HTML suggests a slider structure but uses simple grid layout here for robustness if JS fails or for clean grid view */
}

.games-slide-outer {
  aspect-ratio: 1 / 1;
}

.games-slide {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  background-color: var(--color-bg-surface);
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiMzMzQxNTUiLz48dGV4dCB4PSI1MCUiIHk9IjUwJSIgZG9taW5hbnQtYmFzZWxpbmU9Im1pZGRsZSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzQ3NTU2OSIgZm9udC1zaXplPSIxNCI+R0FNRTwvdGV4dD48L3N2Zz4=');
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-medium);
}

.games-slide:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 2;
}

.games-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s;
}

.games-slide:hover::after {
  opacity: 1;
}

/* =========================================
   6. FAQ Section
   ========================================= */
.faq-section {
  padding: var(--spacing-xl) 0;
}

.faq-items {
  display: grid;
  gap: var(--spacing-sm);
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(255,255,255,0.2);
}

.faq-q {
  padding: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding-right: 3rem;
  user-select: none;
}

.faq-q::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--color-primary);
}

.faq-a {
  max-height: 0; /* Usually controlled by JS, simplified here */
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0,0,0,0.1);
}

/* Hover state to simulate open for CSS-only feel if JS absent */
.faq-item:hover .faq-a,
.faq-item:focus-within .faq-a {
  max-height: 500px; 
}

.faq-a-content {
  padding: 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================================
   7. Footer
   ========================================= */
footer {
  background: #0b1120;
  padding: var(--spacing-lg) 0;
  margin-top: auto;
  border-top: 1px solid var(--color-border);
}

.footer-flex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  align-items: flex-start;
}

.footer-left, .footer-right {
  flex: 1;
}

.footer-center {
  flex: 2;
  text-align: center;
}

.footer-logo {
  display: block;
  width: 120px;
  height: 35px;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNTAgNDAiPjx0ZXh0IHg9IjUwJSIgeT0iNTAlIiBkb21pbmFudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjOTRhM2I4IiBmb250LXNpemU9IjI0IiBmb250LXdlaWdodD0iYm9sZCI+MVhTTE9UUzwvdGV4dD48L3N2Zz4=');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.footer-highlighed {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  margin-right: 1rem;
}

.footer-highlighed:hover {
  color: var(--color-primary);
}

.footer-links {
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-langs {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 1rem;
}

.footer-lang-switcher {
  width: 24px;
  height: 16px;
  background: #333;
  border-radius: 2px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.footer-lang-switcher:hover {
  opacity: 1;
}

.footer-warnings span {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: #333; /* Placeholder for icons */
  border-radius: 50%;
  margin: 0 5px;
}

/* =========================================
   8. Responsive Design
   ========================================= */
@media (max-width: 992px) {
  .content-sidebar {
    width: 100%;
    order: -1; /* Move sidebar to top on tablets/mobile */
    margin-bottom: var(--spacing-md);
  }
  
  .content-sidebar-widget {
    display: flex;
    flex-direction: row;
  }
  
  .content-sidebar-widget-backside, 
  .content-sidebar-widget-frontside {
    flex: 1;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.5rem;
  }

  .header-burger {
    display: flex;
  }

  .header-menu-row, 
  .header-lang-switcher,
  .header-buttons a:first-child { 
    /* Hide "Log In" button text or button itself for space, keeping icon button if available */
    display: none; 
  }
  
  .header-buttons {
     margin-left: auto;
  }

  .content-flex {
    flex-direction: column;
  }
  
  .content-sidebar-widget {
    flex-direction: column;
  }

  .footer-flex {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-langs {
    justify-content: center;
  }
  
  .games-slider {
    grid-template-columns: repeat(3, 1fr); /* Show 3 columns on mobile */
  }
}

@media (max-width: 480px) {
  .header-logo {
    width: 100px;
  }
  
  .header-button {
    padding: 0.5em 0.8em;
    font-size: 0.8rem;
  }

  .games-slider {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-slide-outer {
    width: 85vw; /* Full width cards on mobile */
  }
}
