:root {
  --primary-color: #036552;
  --primary-hover-color: #036552;
  --background-color: #ffffff;
  --card-background-color: #ffffff;
  --muted-background-color: #f9fafb;
  --border-color: #e5e7eb;
  --text-color: #111827;
  --text-muted-color: #6b7280;
  --font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
}

* {
  box-sizing: border-box;
}

/* --- Navigation Bar --- */
.navbar {
  background-color: var(--background-color);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  height: 2rem;
  width: auto;
}

.logo-text {
  margin-left: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.nav-links {
  display: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  margin: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}

.nav-links a:hover {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.nav-right {
  display: none;
}

.mobile-menu-button {
  display: block;
}

#mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav-links {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border-color);
}

.mobile-nav-links.active {
  display: flex;
}

.mobile-nav-links a {
  padding: 0.75rem 0;
  color: #6b7280;
  text-decoration: none;
}

.mobile-nav-links .btn {
  margin-top: 0.75rem;
  width: 100%;
}

/* --- Main Content --- */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.main-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  min-height: 2.5rem; /* To prevent layout shift */
}

.main-title .cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from,
  to {
    color: transparent;
  }
  50% {
    color: var(--text-color);
  }
}

.intro-text {
  margin-bottom: 2rem;
  line-height: 1.6;
}

.text-muted {
  color: var(--text-muted-color);
  margin-bottom: 1rem;
}

/* --- Typography and Content Styling --- */
h1, h2, h3, h4, h5, h6 {
  margin: 2rem 0 1rem 0;
  line-height: 1.4;
}

h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child {
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  padding-top: 1.5rem;
  border-top: 2px solid var(--muted-background-color);
}

h2:first-child {
  border-top: none;
  padding-top: 0;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--text-color);
}

/* List Styling */
ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  line-height: 1.6;
}

ul li, ol li {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

ul li::marker {
  color: var(--primary-color);
}

ol li::marker {
  color: var(--primary-color);
  font-weight: 600;
}

/* Nested lists */
ul ul, ol ol, ul ol, ol ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

/* Blockquote Styling */
blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--muted-background-color);
  border-left: 4px solid var(--primary-color);
  border-radius: 0.375rem;
  font-style: italic;
  color: var(--text-color);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

blockquote p {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.875rem;
  color: var(--text-muted-color);
  font-weight: 500;
}

blockquote cite a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease-in-out;
}

blockquote cite a:hover {
  border-bottom-color: var(--primary-color);
}

/* Paragraph spacing */
p {
  margin: 1rem 0;
  line-height: 1.6;
}

/* Strong and bold text */
b, strong {
  font-weight: 600;
  color: var(--text-color);
}

/* Link Styling */
a {
  color: #024c3f; /* Darker version of primary color for AAA contrast */
  text-decoration: underline;
  text-decoration-color: #024c3f;
  text-underline-offset: 0.2em;
  transition: all 0.2s ease-in-out;
}

a:hover {
  color: var(--primary-color);
  text-decoration-color: var(--primary-color);
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 0.125rem;
}

/* Links in navigation and special components maintain their existing styles */
.nav-links a,
.footer-links a,
.url-list a,
.url-list-link,
.btn,
.toc-list a {
  /* These maintain their existing specific styling */
}

/* Table of Contents */
.table-of-contents {
  background-color: var(--muted-background-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.table-of-contents h2 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  border-top: none;
  padding-top: 0;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
  display: flex;
  align-items: center;
}

.toc-list li:before {
  content: "→";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-weight: bold;
  line-height: 1;
}

.toc-list a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
  display: block;
  padding: 0.25rem 0;
}

.toc-list a:hover {
  color: var(--primary-color);
}

/* Smooth scrolling for jump links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* Account for sticky navbar height + padding */
}

/* --- Filters --- */
.filters-container {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--card-background-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
}

.filter-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #036552;
  cursor: pointer;
}

.filter-label input[type="checkbox"] {
  margin: 0;
}

.search-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  width: 100%;
  max-width: 300px;
  background-color: white;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.search-input:focus {
  outline: none;
  border-color: #036552;
  box-shadow: 0 0 0 3px rgba(0, 161, 129, 0.1);
  transform: translateY(-1px);
}

.search-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.search-input:hover {
  border-color: #036552;
  box-shadow: 0 2px 4px rgba(0, 161, 129, 0.1);
}

.license-select {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background-color: white;
  cursor: pointer;
  min-width: 150px;
}

.license-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 161, 129, 0.1);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #036552;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.platform-card.hidden {
  display: none;
}

@media (min-width: 768px) {
  .filter-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .filter-group {
    flex-direction: row;
    align-items: center;
  }
}

/* --- Platform Cards --- */
.platform-list-container {
  background-color: var(--card-background-color);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.platform-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.platform-card:last-child {
  border-bottom: none;
}

.platform-image-section {
  width: 100%;
  flex-shrink: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.platform-image {
  width: 90px;
  height: 90px;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  background-color: #8450f6;
  border-radius: 0.75rem;
  padding: 10px;
}

.rating-stars {
  margin-top: 0.75rem;
}

.star-icon {
  width: 1rem;
  height: 1rem;
}

.star-icon.filled {
  fill: var(--primary-color);
  color: var(--primary-color);
}

.star-icon.empty {
  fill: #e5e7eb;
  color: #e5e7eb;
}

.platform-details {
  flex-grow: 1;
}

.platform-details h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.platform-details .provider {
  color: var(--text-muted-color);
  margin-bottom: 1rem;
}

.platform-stats {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.platform-stats.bonus-stats {
  grid-template-columns: repeat(2, 1fr);
}

/* Bonus page specific layout */
.bonus-page .platform-card {
  display: flex;
  flex-direction: column;
}

.bonus-page .platform-card .platform-details {
  flex: 1;
}

.bonus-page .platform-stats.bonus-stats div:nth-child(3),
.bonus-page .platform-stats.bonus-stats div:nth-child(4) {
  text-align: center;
}

.bonus-page .url-list-link {
  display: inline-block;
  background: #036552;
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid #036552;
}

.bonus-page .url-list-link:hover {
  background: #024c3f;
  border-color: #024c3f;
}

.platform-stats div p:first-child {
  font-size: 0.875rem;
  color: var(--text-muted-color);
  margin: 0;
}

.platform-stats div p:last-child {
  font-weight: 600;
  margin: 0.25rem 0 0;
}

.platform-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.platform-features li {
  font-size: 0.875rem;
  color: var(--text-muted-color);
  margin-bottom: 0.5rem;
}

.platform-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.platform-actions .terms {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted-color);
}

/* --- Casino-specific styles --- */
.casino-urls {
  margin-top: 1rem;
  padding-top: 1rem;
}

.casino-urls h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-color);
}

.url-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.url-list li {
  margin: 0;
}

.url-list a {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: var(--muted-background-color);
  border: 1px solid var(--border-color);
  border-bottom: 2px solid var(--primary-color);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted-color);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.url-list a:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* --- Rating Info Box --- */
.rating-info-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--muted-background-color);
  border-radius: 0.5rem;
}

.rating-info-box h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

/* --- Button --- */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  text-decoration: none;
  width: 100%;
}

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

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

.play-now-btn {
  width: auto;
  min-width: 120px;
}

.play-now-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.play-now-section h4 {
  margin: 0;
  white-space: nowrap;
}

.url-list-link {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: var(--muted-background-color);
  border: 1px solid var(--border-color);
  border-bottom: 2px solid var(--primary-color);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted-color);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.url-list-link:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* --- Responsive Design --- */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    margin-left: 1.5rem;
  }
  .nav-right {
    display: flex;
    align-items: center;
  }
  .mobile-menu-button {
    display: none;
  }
  .platform-card {
    flex-direction: row;
  }
  .platform-image-section {
    width: 12rem;
  }
  .platform-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .platform-stats.bonus-stats {
    grid-template-columns: 2fr 2fr 1fr 1fr;
  }
  
  /* Bonus page desktop layout */
  .bonus-page .platform-card {
    flex-direction: row;
  }
  
  .bonus-page .platform-card .platform-details {
    flex: 1;
  }
  .platform-actions {
    width: 12rem;
  }
}

/* --- Footer --- */
.footer {
  background-color: var(--muted-background-color);
  margin-top: 4rem;
  /* Test style to ensure CSS is loading */
}

.footer-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  /* Ensure visibility */
  background-color: var(--muted-background-color);
}

.footer-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-description {
  color: var(--text-muted-color);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 300px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  color: var(--text-muted-color);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.social-links a:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a {
  color: var(--text-muted-color);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease-in-out;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  background-color: var(--background-color);
}

.footer-bottom-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted-color);
}

.footer-disclaimer {
  margin-top: 0.5rem !important;
  font-size: 0.75rem !important;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .footer-container {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
  }
  
  .footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .footer-disclaimer {
    margin-top: 0 !important;
    text-align: right;
  }
}
