/* ====== Base & Variables ====== */
:root {
  /* Colors - Casino Theme */
  --bg: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  --bg-solid: #0f0f23;
  --card-bg: #fff;
  --ink: #333;
  --ink-light: #6c757d;
  --accent: #dc3545; /* Casino red */
  --accent-gold: #ffd700;
  --accent-green: #28a745;
  --border: #e1e5e9;
  --border-dark: #dee2e6;
  
  /* Layout */
  --container: 1200px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
  --shadow-casino: 0 8px 32px rgba(220,53,69,0.2);
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
}

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

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

body {
  font-family: var(--font-primary);
  background: var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: var(--line-height-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ====== Header & Navigation ====== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  flex-wrap: wrap;
  max-width: var(--container);
  margin: 0 auto;
}

header nav a {
  display: inline-block;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

header nav a:hover,
header nav a:focus {
  color: #fff;
  background: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.3);
  transform: translateY(-1px);
}

/* ====== Hero Section ====== */
section {
  padding: 40px 16px;
  text-align: center;
  background: linear-gradient(135deg, 
    rgba(220, 53, 69, 0.9) 0%, 
    rgba(255, 215, 0, 0.8) 50%,
    rgba(40, 167, 69, 0.9) 100%
  );
  color: #fff;
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(220, 53, 69, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(40, 167, 69, 0.3) 0%, transparent 50%);
  animation: heroShimmer 8s ease-in-out infinite alternate;
}

@keyframes heroShimmer {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

section h1 {
  font-size: clamp(24px, 6vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

section p {
  font-size: clamp(16px, 3vw, 20px);
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

section a {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-casino);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  border: 2px solid var(--accent);
}

section a:hover,
section a:focus {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(220,53,69,0.4);
  background: #fff;
  color: var(--accent);
  border-color: #fff;
}

/* ====== Casino Cards Container ====== */
.casino-cards-container {
  padding: 24px 16px;
  max-width: var(--container);
  margin: 0 auto;
}

/* Улучшенные стили для casino-card */
.casino-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.casino-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.casino-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-gold) 50%, var(--accent-green) 100%);
}

.casino-card .card-content {
  display: flex;
  align-items: stretch;
  min-height: 100px;
}

.casino-card .logo-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-width: 200px;
  border-right: 1px solid var(--border);
}

.casino-card .logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.casino-card .logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.casino-card .diamond {
  width: 20px;
  height: 20px;
  background: linear-gradient(45deg, var(--accent) 0%, #ff6b6b 100%);
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(220,53,69,0.3);
}

.casino-card .casino-info h2 {
  font-size: 18px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
}

.casino-card .rating {
  display: flex;
  gap: 2px;
  align-items: center;
}

.casino-card .star {
  color: var(--accent-gold);
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.casino-card .divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-dark), transparent);
  align-self: stretch;
  margin: 12px 0;
}

.casino-card .deposit-info,
.casino-card .bonus-info {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 140px;
}

.casino-card .deposit-info {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.casino-card .bonus-info {
  background: linear-gradient(135deg, var(--accent-green) 0%, #20c997 100%);
  color: #fff;
}

.casino-card .deposit-label,
.casino-card .bonus-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 8px;
  min-width: 300px;
  opacity: 0.8;
}

.casino-card .deposit-range,
.casino-card .bonus-value {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.casino-card .action-section {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.casino-card .action-buttons {
  display: flex;
  gap: 12px;
}

.casino-card .btn {
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  min-width: 300px;
  border: 2px solid transparent;
}

.casino-card .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.casino-card .btn-primary:hover,
.casino-card .btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,123,255,0.4);
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
}

/* ====== Main Content ====== */
main {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px;
  margin: 32px 16px;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}

main h1, main h2, main h3 {
  line-height: 1.3;
  margin: 24px 0 12px;
  color: var(--ink);
}

main h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

main h2 {
  font-size: 24px;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
}

main h3 {
  font-size: 20px;
  font-weight: 600;
}

main p {
  margin: 16px 0;
  line-height: 1.7;
}

main ul, main ol {
  margin: 16px 0 16px 24px;
}

main li {
  margin: 8px 0;
}

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

main thead {
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
  color: #fff;
}

main th {
  padding: 16px 12px;
  font-weight: 600;
  text-align: left;
}

main td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

main tr:hover {
  background: rgba(220, 53, 69, 0.05);
}

/* ====== Footer ====== */
footer {
  background: rgba(15, 15, 35, 0.95);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 32px 16px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ====== Focus & Accessibility ====== */
a:focus-visible, 
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ====== Responsive Design - Mobile First ====== */
/* Small devices (up to 640px) - Base styles above */

/* Medium devices (641px and up) */
@media (min-width: 641px) {
  header nav {
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
  }
  
  header nav a {
    font-size: 15px;
    padding: 10px 20px;
  }
  
  section {
    padding: 60px 24px;
  }
  
  .casino-cards-container {
    padding: 32px 24px;
  }
  
  main {
    padding: 40px 32px;
    margin: 40px 24px;
  }
}

/* Large devices (769px and up) */
@media (min-width: 769px) {
  .casino-card .card-content {
    flex-wrap: nowrap;
  }
  
  .casino-card .logo-section {
    min-width: 220px;
  }
  
  .casino-card .deposit-info,
  .casino-card .bonus-info {
    min-width: 160px;
  }
}

/* Mobile specific overrides (up to 768px) */
@media (max-width: 768px) {
  .casino-card .card-content {
    flex-direction: column;
  }
  
  .casino-card .logo-section {
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .casino-card .divider {
    display: none;
  }
  
  .casino-card .deposit-info,
  .casino-card .bonus-info {
    min-width: 50%;
  }
  
  .casino-card .action-section {
    min-width: 100%;
  }
  
  .casino-card .action-buttons {
    width: 100%;
    justify-content: center;
  }
}

/* Extra small devices (up to 480px) */
@media (max-width: 480px) {
  .casino-card .deposit-info,
  .casino-card .bonus-info {
    min-width: 100%;
  }
  
  .casino-card .action-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .casino-card .btn {
    width: 100%;
    min-width: auto;
  }
  
  main {
    margin: 20px 12px;
    padding: 24px 16px;
  }
  
  section {
    padding: 40px 16px;
  }
  
  .casino-cards-container {
    padding: 20px 12px;
  }
}

/* ====== Animations & Effects ====== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.casino-card {
  animation: fadeInUp 0.6s ease-out forwards;
}

.casino-card:nth-child(even) {
  animation-delay: 0.1s;
}

.casino-card:nth-child(odd) {
  animation-delay: 0.2s;
}

/* Loading state для карточек */
.casino-card.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}