/* ===================================
   CSS Variables & Root Styles
   =================================== */
:root {
  --primary-color: #0d47a1;
  --primary-dark: #002171;
  --secondary-color: #00acc1;
  --accent-color: #ffa726;
  --success-color: #43a047;
  --danger-color: #e53935;
  --warning-color: #fdd835;
  --info-color: #29b6f6;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --gray-900: #212529;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #ffffff;
}

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

.display-4 {
  font-size: 2.5rem;
  font-weight: 800;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .display-4 {
    font-size: 3rem;
  }
}

/* ===================================
   Navigation Bar
   =================================== */
.navbar {
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.brand-text {
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  color: var(--gray-800);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color);
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--primary-color);
}

/* Mobile Navigation Toggle */
#navbar-toggle:checked ~ .navbar-collapse {
  display: block;
}

.navbar-toggler {
  cursor: pointer;
}

@media (max-width: 991px) {
  .navbar-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--box-shadow);
    padding: 1rem;
    z-index: 1000;
  }

  #navbar-toggle:checked ~ .navbar-collapse {
    display: block;
  }

  .navbar-nav {
    flex-direction: column;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
  min-height: 500px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero-visual {
  position: relative;
  height: 100%;
  min-height: 500px;
}

.visual-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--primary-color) 25%, transparent 25%),
    linear-gradient(-45deg, var(--primary-color) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--secondary-color) 75%),
    linear-gradient(-45deg, transparent 75%, var(--secondary-color) 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  opacity: 0.1;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  }
  100% {
    background-position: 60px 60px, 60px 90px, 90px 30px, 30px 60px;
  }
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.5rem 0;
  font-size: 1.05rem;
}

/* ===================================
   Sidebar
   =================================== */
.sidebar-sticky {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.stats-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.stat-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.75rem;
}

.stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.filter-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
}

.filter-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.filter-section {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-300);
}

.filter-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.form-check {
  margin-bottom: 0.5rem;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ===================================
   Comparison Table
   =================================== */
.section-header {
  margin-bottom: 2rem;
}

.comparison-table-wrapper {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.comparison-table {
  margin-bottom: 0;
}

.comparison-table thead {
  background: var(--gray-800);
  color: white;
}

.comparison-table thead th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  padding: 1rem;
  border: none;
  vertical-align: middle;
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}

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

.comparison-table tbody tr:hover {
  background-color: var(--gray-100);
  transform: scale(1.01);
  box-shadow: var(--box-shadow);
}

.comparison-table td {
  padding: 1.25rem 1rem;
  vertical-align: middle;
}

/* Site Cell */
.site-logo {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.logo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
}

.site-name {
  font-size: 1.125rem;
  color: var(--dark-color);
}

.site-meta {
  font-size: 0.875rem;
}

/* Bonus Cell */
.bonus-amount {
  font-size: 1.5rem;
}

.bonus-details {
  color: var(--gray-600);
}

/* Score Badge */
.score-badge {
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 50px;
}

.score-excellent {
  background-color: var(--success-color);
  color: white;
}

.score-good {
  background-color: var(--info-color);
  color: white;
}

.score-average {
  background-color: var(--warning-color);
  color: var(--dark-color);
}

/* Rating Cell */
.star-rating {
  font-size: 1.25rem;
  line-height: 1;
}

.rating-count {
  margin-top: 0.25rem;
}

/* Features Cell */
.feature-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feature-badges .badge {
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}

.feature-badges .badge:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: scale(1.1);
}

/* Action Cell */
.action-cell {
  min-width: 150px;
}

/* ===================================
   Mobile Cards
   =================================== */
.comparison-card {
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

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

/* ===================================
   Tabbed Section
   =================================== */
.custom-tabs {
  border-bottom: 2px solid var(--gray-300);
}

.custom-tabs .nav-link {
  color: var(--gray-600);
  font-weight: 600;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 1.5rem;
  transition: var(--transition);
}

.custom-tabs .nav-link:hover {
  color: var(--primary-color);
  border-bottom-color: var(--gray-300);
}

.custom-tabs .nav-link.active {
  color: var(--primary-color);
  background: transparent;
  border-bottom-color: var(--primary-color);
}

/* Info Cards */
.info-card {
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.info-card:hover {
  box-shadow: var(--box-shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-color);
}

.icon-header {
  font-size: 2.5rem;
}

/* Guide Cards */
.guide-card {
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.guide-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  transform: scaleY(0);
  transition: var(--transition);
}

.guide-card:hover::before {
  transform: scaleY(1);
}

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

.guide-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-300);
  margin-bottom: 1rem;
}

.card-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.card-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* FAQ Accordion */
.faq-accordion .accordion-item {
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.faq-accordion .accordion-button {
  font-weight: 600;
  color: var(--dark-color);
  background-color: var(--gray-100);
}

.faq-accordion .accordion-button:not(.collapsed) {
  background-color: var(--primary-color);
  color: white;
}

.faq-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: var(--primary-color);
}

/* Updates Timeline */
.updates-timeline {
  position: relative;
  padding-left: 2rem;
}

.updates-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-300);
}

.update-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.update-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.date-badge {
  display: inline-block;
  background: var(--gray-200);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.update-content h5 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.update-content p {
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

/* ===================================
   Features Section
   =================================== */
.features-section {
  background-color: var(--gray-100);
}

.feature-box {
  padding: 2rem 1rem;
  transition: var(--transition);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  transition: var(--transition);
}

.feature-box:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

/* ===================================
   Responsible Gaming Section
   =================================== */
.responsible-gaming {
  background-color: #fff3cd;
  border-top: 4px solid var(--warning-color);
  border-bottom: 4px solid var(--warning-color);
}

.warning-icon {
  width: 80px;
  height: 80px;
  background-color: var(--warning-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--dark-color);
  margin: 0 auto;
}

/* ===================================
   Footer
   =================================== */
.footer {
  background-color: var(--gray-900);
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.footer-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

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

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 0.5rem;
}

.footer-contact li {
  color: var(--gray-400);
}

.footer-contact a {
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: white;
}

.social-links a {
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

.license-badges .badge {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

/* ===================================
   Buttons
   =================================== */
.btn {
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: #2e7d32;
  border-color: #2e7d32;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

.btn-outline-secondary {
  border-color: var(--gray-600);
  color: var(--gray-600);
}

.btn-outline-secondary:hover {
  background-color: var(--gray-600);
  border-color: var(--gray-600);
  color: white;
}

.btn-outline-dark {
  border-color: var(--dark-color);
  color: var(--dark-color);
}

.btn-outline-dark:hover {
  background-color: var(--dark-color);
  border-color: var(--dark-color);
  color: white;
}

/* ===================================
   Utilities
   =================================== */
.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 991px) {
  .sidebar-sticky {
    position: static;
    max-height: none;
  }

  .hero-section {
    min-height: auto;
  }

  .display-4 {
    font-size: 2rem;
  }

  .feature-list li {
    font-size: 0.95rem;
  }
}

@media (max-width: 767px) {
  .comparison-table-wrapper {
    display: none;
  }

  .custom-tabs .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

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

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
.form-check-input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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