/* Base Variables */
:root {
  /* Brand Colors */
  --brand-primary: #e91e63; /* Pink */
  --brand-secondary: #ffd700; /* Gold */
  --bg-dark: #1a1a2e;
  --bg-medium: #1a1a3a;
  --text-light: #ffffff;
  --text-medium: #cccccc;
  --text-dark: #a0a0a0;
  --cookie-banner-height: 70px;
}

/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text-light);
  scroll-behavior: smooth;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Rocket Loader Animation ===== */
#loader-container {
  position: fixed;
  inset: 0;
  background-color: rgba(26, 26, 46, 0.95);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 0.5s ease-out;
}

.rocket-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.rocket {
  position: absolute;
  width: 40px;
  height: 80px;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  animation: rocketFlight 3s infinite ease-in-out;
  z-index: 10;
}

.rocket-body {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--brand-primary);
  border-radius: 50% 50% 30% 30%;
}

.fins {
  position: absolute;
  width: 60px;
  height: 20px;
  bottom: 0;
  left: -10px;
  background: var(--brand-primary);
  clip-path: polygon(0 50%, 20% 0, 80% 0, 100% 50%);
}

.window {
	position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-light);
  top: 20px;
  left: 10px;
}

.exhaust-flame {
  position: absolute;
  width: 20px;
  height: 40px;
  bottom: -40px;
  left: 10px;
  background: linear-gradient(to bottom, var(--brand-primary), var(--brand-secondary));
  border-radius: 10px 10px 20px 20px;
  animation: flame 0.2s infinite alternate;
}

.exhaust-fumes {
  position: absolute;
  width: 60px;
  height: 20px;
  bottom: -60px;
  left: -10px;
  background: radial-gradient(circle, rgba(255,215,0,0.6) 0%, rgba(255,215,0,0) 70%);
  border-radius: 50%;
  animation: fumes 1s infinite alternate;
}

.moon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: #f5f5f5;
  border-radius: 50%;
  top: 30px;
  right: 30px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(white 1px, transparent 0);
  background-size: 20px 20px;
  opacity: 0.5;
}

@keyframes rocketFlight {
  0% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-80px); }
  100% { transform: translateX(-50%) translateY(0); }
}

@keyframes flame {
  0% { height: 30px; opacity: 0.8; }
  100% { height: 50px; opacity: 1; }
}

@keyframes fumes {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0.1; transform: scale(1.5); }
}

/* ===== Layout Components ===== */
.loader { 
  width: 60px; 
  height: 60px; 
  border: 6px solid rgba(255, 215, 0, 0.2); 
  border-top-color: var(--brand-secondary); 
  border-radius: 50%; 
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.modal { transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal.hidden { opacity: 0; visibility: hidden; }

/* Sticky Nav */
.sticky-nav { 
  position: sticky; 
  top: 0; 
  z-index: 40; 
  background-color: var(--bg-medium); 
}

/* Page Content Visibility */
.page-content { display: none; }
.page-content.active { display: block; }

/* Affiliate Disclosure */
.affiliate-disclosure {
  background-color: rgba(0, 0, 0, 0.2) !important;
  border-left: 3px solid var(--brand-primary) !important;
  margin-bottom: 1.5rem !important;
}

.affiliate-disclosure strong {
  color: var(--brand-secondary);
}

/* Cookie Banner */
#cookie-consent-banner { 
  position: fixed; 
  bottom: 0; /* Changed to bottom */
  left: 0; 
  right: 0; 
  z-index: 60; 
  transition: transform 0.5s ease-in-out; 
  transform: translateY(100%); /* Start hidden at bottom */
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
  background-color: rgba(26, 26, 46, 0.97) !important; /* More visible */
  /*padding: 10px 0 !important;*/
}

#cookie-consent-banner.show { 
  transform: translateY(0); 
}

/* Sticky Offer Banner */
#sticky-offer-banner { 
  position: fixed; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  z-index: 55; 
  transition: transform 0.5s ease-in-out, bottom 0.5s ease-in-out; 
  transform: translateY(100%); 
  text-align: center !important;
  padding: 12px 0 !important;
  background-color: rgba(233, 30, 99, 0.95) !important; /* More opaque background */
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3) !important;
}

#sticky-offer-banner.show { 
  transform: translateY(0); 
}

#sticky-offer-banner p {
  font-size: 1.2rem !important;
  font-weight: 500 !important;
}

#sticky-offer-banner strong {
  font-size: 1.3rem !important; 
}

#sticky-offer-banner .star-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 18px;
  color: var(--brand-secondary);
}

#sticky-offer-link {
  padding: 8px 20px !important;
  font-size: 1rem !important;
  animation: glowButton 1.5s infinite alternate !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
  border-radius: 30px !important;
  font-weight: bold !important;
}

@keyframes glowButton {
  from { box-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
  to { box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 20px var(--brand-primary); }
}

/*
body.cookie-banner-visible #sticky-offer-banner { 
  bottom: var(--cookie-banner-height); 
}
#cookie-consent-banner, #sticky-offer-banner {
  bottom: var(--cookie-banner-height);
}
*/

/* Exit Intent Popup */
#exit-intent-popup { z-index: 110; }
#exit-intent-popup .popup-content { animation: fadeInScale 0.4s ease-out; }
@keyframes fadeInScale { 
  from {
    opacity: 0;
    transform: scale(0.2);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animations */
.flash-button { animation: flash 1.5s infinite; }
@keyframes flash { 
  0%, 100% { background-color: var(--brand-primary); box-shadow: 0 0 5px var(--brand-primary); } 
  50% { background-color: #f06292; box-shadow: 0 0 15px #f06292; } 
}

/* View Top Sites Button Styling */
.view-top-sites-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, var(--brand-primary), #ff4081) !important;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4) !important;
  transition: all 0.3s ease !important;
  font-weight: bold !important;
  letter-spacing: 0.5px !important;
  padding: 14px 32px !important;
}

.view-top-sites-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(233, 30, 99, 0.6) !important;
}

.view-top-sites-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  transition: all 0.5s;
  opacity: 0;
}

.view-top-sites-btn:hover::after {
  animation: shineEffect 1.5s infinite;
}

.btn-icon {
  margin: 0 5px;
  display: inline-block;
}

@keyframes shineEffect {
  0% {
    left: -50%;
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    left: 150%;
    opacity: 0;
  }
}

/* Scrollbars */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: var(--brand-primary) var(--bg-medium);
}
.scrollbar-thin::-webkit-scrollbar { width: 8px; }
.scrollbar-thin::-webkit-scrollbar-track { background: var(--bg-medium); }
.scrollbar-thin::-webkit-scrollbar-thumb { background-color: var(--brand-primary); border-radius: 4px; }

/* Significant Terms Styling */
.significant-terms {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-medium);
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  text-align: left;
  display: none;
}
.significant-terms.active {
  display: block;
}
.significant-terms strong { color: #e0e0e0; }
.terms-link { 
  font-size: 0.8rem !important; 
  color: rgba(255, 255, 255, 0.5) !important; 
  text-decoration: underline !important; 
  cursor: pointer !important; 
  display: inline-block !important; 
  margin-top: 10px !important; 
  transition: color 0.2s !important; 
}
.terms-link:hover { color: rgba(255, 255, 255, 0.8) !important; }

/* Table Styles */
.comparison-table td { vertical-align: top; }
.comparison-table .bonus-cell { vertical-align: top; text-align: left; }

#filter-section { padding: 1rem; margin-bottom: 1.5rem; }

/* Quick View Modal Styling */
#quick-view-modal .modal-content { 
  max-width: 500px;
  border: 1px solid var(--brand-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#quick-view-modal .terms-snippet { 
  font-size: 0.7rem; 
  max-height: 80px; 
  overflow-y: auto; 
  padding: 10px; 
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px; 
  margin-top: 8px; 
}

#quick-view-modal h5, #quick-view-modal h6 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Payment method and feature badges */
.payment-badge, .feature-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-medium);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin: 0.125rem;
}

/* Star rating display */
.star-rating {
  display: inline-flex;
  color: var(--brand-secondary);
}

.star-rating .empty {
  color: rgba(255, 255, 255, 0.2);
}

/* Center Desktop Headers */
.comparison-table thead th { text-align: center; }

/* Filter Buttons */
.filter-button.active { 
  background-color: var(--brand-primary); 
  border-color: var(--brand-primary); 
  color: white; 
}

.sort-indicator { opacity: 0.5; transition: opacity 0.2s; }
.sort-indicator.active { opacity: 1; }

/* Select Dropdown Styling */
select {
  background-color: var(--bg-medium) !important;
  color: var(--text-light) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

select option {
  background-color: var(--bg-dark) !important;
  color: var(--text-light) !important;
}

#filter-payment, #filter-feature {
  background-color: var(--bg-dark) !important;
  color: var(--text-light) !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Tailwind-like utility classes */
.text-brand-primary { color: var(--brand-primary); }
.text-brand-secondary { color: var(--brand-secondary); }
.bg-brand-primary { background-color: var(--brand-primary); }
.border-brand-primary { border-color: var(--brand-primary); }
.bg-bg-dark { background-color: var(--bg-dark); }
.bg-bg-medium { background-color: var(--bg-medium); }
.text-text-light { color: var(--text-light); }
.text-text-medium { color: var(--text-medium); }
.text-text-dark { color: var(--text-dark); }

/* Enhanced Offer Display */
.game-row td:nth-child(3) .welcome-bonus-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
}
.game-row td:nth-child(3) .offer-headline {
  font-size: 1.6rem !important;
  font-weight: bold !important;
  color: var(--text-light) !important;
  margin-bottom: 10px !important;
  line-height: 1.2 !important;
  display: block !important;
  width: 100% !important;
  text-align: left;
}
.game-row td:nth-child(3) .highlight { 
  color: var(--brand-secondary) !important; 
  font-weight: bold !important; 
}
.game-row td:nth-child(3) .offer-subtext {
  font-size: 1.1rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 5px 0 15px !important;
  display: block !important;
  text-align: left;
}

/* ===== Content Page Styling ===== */
.content-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: var(--bg-medium);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.content-page h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--brand-primary);
  padding-bottom: 0.5rem;
}
.content-page h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-light);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.content-page p, .content-page ul, .content-page ol {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--text-medium);
}
.content-page ul {
  list-style: disc;
  margin-left: 1.5rem;
}
.content-page ol {
  list-style: decimal;
  margin-left: 1.5rem;
}
.content-page a {
  color: var(--brand-secondary);
  text-decoration: underline;
  transition: color 0.2s;
}
.content-page a:hover {
  color: var(--brand-primary);
}
.content-page strong {
  color: var(--text-light);
  font-weight: 600;
}

/* FAQ Accordion Styling */
details summary { 
  list-style: none; 
  position: relative; 
  padding-right: 20px; 
  cursor: pointer; 
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  font-family: 'lucide';
  content: '\e046'; /* chevron-down */
  position: absolute; 
  right: 0; 
  transition: transform 0.3s; 
}
details[open] summary::after { transform: rotate(180deg); }

/* Mobile Styles */
@media (max-width: 640px) {
  .comparison-table { font-size: 12px; }
  .bonus-cell { max-width: 100%; }
  .significant-terms { max-width: 100%; font-size: 0.65rem; }
}

@media (max-width: 991px) {
  /* Mobile Table Fixes */
  .comparison-table {
    width: 100% !important; 
    min-width: 0 !important; 
    max-width: 100% !important; 
    border-collapse: separate !important; 
    border-spacing: 0 !important; 
  }
  .comparison-table thead { display: none !important; }
  .comparison-table tbody,
  .comparison-table tr,
  .game-row{
    display: block;
    width: 100% !important; 
    margin-bottom: 1rem; 
    background-color: var(--bg-medium); 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
  }
  table.comparison-table colgroup, table.comparison-table col { 
    display: none !important; 
    width: 0 !important; 
  }
  
  /* General TD styling for mobile cards */
  .game-row > td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    float: none !important;
    clear: both !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
  }
  .game-row > td:last-child { border-bottom: none; }
  
  /* Specific cell styling */
  .game-row td:nth-child(1) { 
    text-align: center !important; 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: var(--brand-secondary); 
  }
  .game-row td:nth-child(2) { text-align: center !important; }
  .game-row td:nth-child(2) > div { justify-content: center; }
  .game-row td:nth-child(3) {
    text-align: center !important;
    padding: 20px 16px !important;
    background-color: #272757 !important;
  }
  .game-row td:nth-child(4) { text-align: center !important; }
  .game-row td:nth-child(5) {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  .game-row td:nth-child(5) a, .game-row td:nth-child(5) button {
    flex: none !important;
    width: 100% !important;
    text-align: center !important;
  }
  
  /* Mobile data labels */
  .game-row td[data-label]:not(.hide-mobile)::before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-align: center;
  }
  
  /* Hide labels for specific cells */
  .game-row td:nth-child(1)::before,
  .game-row td:nth-child(2)::before,
  .game-row td:nth-child(3)::before {
    display: none !important;
  }
  
  /* Keep labels for Rating and Actions */
  .game-row td:nth-child(4)::before,
  .game-row td:nth-child(5)::before {
    text-align: center !important;
  }
  
  /* Mobile-specific offer display */
  .game-row td:nth-child(3) .offer-headline,
  .game-row td:nth-child(3) .offer-subtext {
    text-align: center !important;
  }
  .game-row td:nth-child(3) .terms-link {
    text-align: center !important;
  }
  
  /* Mobile data-attributes */
  .game-row > td:nth-child(2)::after {
    content: attr(data-rating) ' ⭐ | Rank ' attr(data-rank);
    font-size: 0.7rem;
    color: var(--text-dark);
    margin-top: 5px;
  }
  
  /* Hide "Actions" Column Heading */
  .comparison-table thead th:last-child {
    display: none;
  }
  
  /* Mobile layout adjustments */
  .game-row > td:nth-child(2) {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .game-row > td:nth-child(2) .flex {
    flex-direction: column;
    align-items: center;
  }
  
  .game-row > td:nth-child(2) .font-semibold {
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .hide-mobile{
    display: none !important;
  }
}