/**
 * Yep Casino - Dark Theme Styles
 * ==============================
 * Semantic CSS with component-based organization.
 * Full responsiveness: mobile-first, desktop enhancements.
 */

/* ============================================
   CSS Variables - Dark Theme Palette
   ============================================ */
:root {
  /* Background colors - layered dark theme */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c2128;

  /* Text colors */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  /* Accent colors */
  --accent-primary: #58a6ff;
  --accent-secondary: #f0883e;
  --accent-success: #3fb950;
  --accent-warning: #d29922;

  /* Borders */
  --border-color: #30363d;
  --border-subtle: #21262d;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, monospace;

  /* Layout */
  --max-width: 1200px;
  --header-height: 64px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Fix mobile viewport - prevents zoom on input focus */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   Header Component
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-lg);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-logo {
  height: 40px;
  width: auto;
}

/* ============================================
   Banner Component
   Web: CTA on left | Mobile: CTA centered
   ============================================ */
/* Banner: original size, no scaling */
.banner {
  position: relative;
  width: 100%;
  aspect-ratio: 1376/768;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/baner/baner.png") center/cover no-repeat;
  z-index: 0;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
}

/* Semi-transparent CTA block */
.banner-cta {
  position: relative;
  z-index: 2;
  background: rgba(33, 38, 45, 0.85);
  backdrop-filter: blur(8px);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  max-width: 400px;
}

/* Web: CTA aligned left */
@media (min-width: 769px) {
  .banner {
    justify-content: flex-start;
    padding-left: var(--space-2xl);
  }

  .banner-cta {
    margin-left: var(--space-2xl);
  }
}

/* Mobile: CTA centered, use baner-mob image at original proportions (410x730) */
@media (max-width: 768px) {
  .banner {
    justify-content: center;
    align-items: center;
    padding: var(--space-lg);
    aspect-ratio: 410/730;
  }

  .banner::before {
    background: url("../img/baner/baner-mob.png") center/cover no-repeat;
  }

  .banner-cta {
    margin: 0 auto;
    text-align: center;
  }
}

/* ============================================
   Popular Slots Section
   12 images: 6 per row, rounded corners, full size
   ============================================ */
.slots-section {
  padding: var(--space-2xl) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
}

.slot-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  text-decoration: none;
  color: inherit;
}

.slot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile: 2 columns, 6 rows for 12 slots */
@media (max-width: 768px) {
  .slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet: 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

/* ============================================
   Table - Mobile Responsive
   Horizontal scroll on small screens
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-lg) 0;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

tr:hover {
  background: var(--bg-secondary);
}

/* Mobile: compact table, no horizontal scroll */
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: hidden;
  }

  table {
    min-width: 0;
    table-layout: fixed;
    word-wrap: break-word;
  }

  th,
  td {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
  }
}

/* ============================================
   Buttons - All use /go/ link
   ============================================ */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-primary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #4c9aed;
}

.btn-cta {
  background: var(--accent-secondary);
}

.btn-cta:hover {
  background: #e67a2e;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
  padding: var(--space-xs) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--accent-primary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 var(--space-xs);
  color: var(--text-muted);
}

/* ============================================
   Footer - Payment Logos from Pay folder
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-2xl) var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.payment-logos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
  margin-top: var(--space-lg);
}

.payment-logos img {
  height: 28px;
  width: auto;
  opacity: 0.9;
}

/* ============================================
   Typography
   ============================================ */
h1 {
  font-size: 2rem;
  margin: var(--space-lg) 0 var(--space-md);
}

h2 {
  font-size: 1.5rem;
  margin: var(--space-xl) 0 var(--space-md);
}

h3 {
  font-size: 1.25rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

p {
  margin: 0 0 var(--space-md);
}

/* ============================================
   Mobile Fix - Prevent horizontal scroll
   ============================================ */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}

/* ============================================
   Accessibility - Focus states
   ============================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
