:root {
    /* Light Mode Defaults */
    --primary-bg: #FFFFFF;
    --secondary-bg: #F8F8F8;
    --primary-brand: #0951F6;
    --accent: #F6AE09;
    --main-text: #333333;
    --secondary-text: #666666;
    --borders: #E0E0E0;
  }
  
  [data-theme="dark"] {
    /* Dark Mode Overrides */
    --primary-bg: #0A0A12;
    --secondary-bg: #12121A;
    --primary-brand: #0951F6; /* Same blue */
    --accent: #F6AE09; /* Same orange */
    --main-text: #F0E6D2;
    --secondary-text: #AAAAAA;
    --borders: #252535;
  }

  /* ======================
   Base Styles
   ====================== */
body {
    /* Layout */
    padding-top: 70px; /* Space for fixed header */
    margin: 0;
    
    /* Theme Variables */
    background: var(--primary-bg);
    color: var(--main-text);
    
    /* Typography */
    font-family: Arial, sans-serif;
    
    /* Smooth theme transitions */
    transition: background 0.3s ease, color 0.3s ease;
  }
  
  hr {
      border: none;
      border-top: 1px solid var(--borders);
      margin: 0;
  }
  
  .centered-text {
      text-align: center;
      margin: 0;
      font-size: 1.25em;
      color: var(--secondary-text);
  }
  
/* ======================
   Fixed Header Banner
   ====================== */
   .main-header {
    position: fixed;
    width: 100%;
    top: 0;
    background: var(--primary-brand);
    color: white;
    height: 50px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    position: relative;
  }
  
  .header-logo {
    position: absolute;
    left: 20px;
    margin: 0;
    font-size: 1.5em;
  }
  
  .theme-switch-wrapper {
    position: absolute;
    right: 20px;
  }

.header-banner h1 {
    margin: 0;
    margin-right: 120px;
    font-size: 1.5em;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Adjust body padding */

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0;
}

/* Ensure ad placement stays below header */
.ad-placement {
  position: relative;
  z-index: 1;
  margin: 5px 0 !important;  /* Reduced vertical margin */
  padding: 2px 0 !important; /* Remove side padding completely */
  border: none;
  background: transparent !important; /* Remove background */
}

.ad-placement h2.centered-text {
  margin: 0 0 2px 0 !important; /* Top, right, bottom, left */
  padding: 0 !important;
  font-size: 0.85em !important; /* Smaller text */
  line-height: 1.1;
  color: var(--secondary-text);
}

.ad-placement + hr {
  margin-top: 2px !important; /* Minimal gap below */
}

/* Add these new rules below your existing .ad-placement styles */
.adsbygoogle {
  width: 100% !important;
  min-height: 50px !important; /* Reduced minimum height */
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Responsive adjustments */
/* For mobile devices */
@media (max-width: 768px) {
  .adsbygoogle {
      min-height: 30px !important; /* Even smaller on mobile */
  }
}

.centered-text {
    text-align: center;
    margin: 0;
    font-size: 1.25em;
    color: #555;
}

/* ======================
   Layout Sections
   ====================== */
.section {
    padding: 20px;
}

/* ======================
   Logo & Search
   ====================== */
.logo-centered {
    display: block;
    margin: 0 auto 10px;
    max-width: 150px;
    height: auto;
    text-align: center;
}

.search-form {
  display: flex;
  max-width: 450px; /* Limits overall width */
  margin: 0 auto; /* Centers the form */
}

.search-form input[type="text"] {
  flex: 1; /* Takes remaining space */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px 5px 5px 5px; /* Rounded left side only */
  max-width: 65%; /* Reduced width */
}

.search-form input[type="text"]::placeholder {
  color: #363636; /* darker gray for better visibility */
  font-weight: 500; /* optional: make it stand out more */
  opacity: 1; /* ensure it doesn’t get faded by the browser */
}

.search-form button {
  padding: 10px 15px;
  border: none;
  background-color: #333;
  color: #fff;
  border-radius: 5px 5px 5px 5px; /* Rounded right side only */
  cursor: pointer;
  white-space: nowrap; /* Prevents text wrapping */
}

/* ======================
   Search Results Cards (No Logo Version)
   ====================== */
   .search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 15px;
}

.search-results .station-card {
    min-height: auto;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

.search-results .station-name {
    font-size: 0.85em;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-results .station-artist {
    font-size: 0.75em;
    color: #666;
    margin: 2px 0 0 0;
    padding: 0;
    line-height: 1.2;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ======================
   Station Cards
   ====================== */
.station-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.station-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.station-name {
    margin: 0;
    font-size: 0.9em;
    font-weight: normal;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.station-logo {
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

/* Card Grid Layout */
.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

/* ======================
   Popular & Random Stations
   ====================== */
   .popular-stations .station-list,
   .random-stations .station-list {
       display: flex;
       flex-wrap: wrap;
       justify-content: flex-start;
       gap: 15px;
       padding: 5px 0;
   }
   
   .popular-stations .station-card,
   .random-stations .station-card {
       flex: 0 0 auto;
       width: 120px; /* Slightly wider cards */
       padding: 10px;
       box-sizing: border-box;
       text-align: center;
       min-height: 130px; /* Fixed height for consistency */
       display: flex;
       flex-direction: column;
       align-items: center;
       justify-content: space-between;
   }
   
   .popular-stations .station-logo,
   .random-stations .station-logo {
       width: 80px; /* Smaller logos */
       height: 80px;
       object-fit: contain;
       margin-bottom: 4px;
       flex-shrink: 0; /* Prevent logo from shrinking */
   }
   
   .popular-stations .station-name,
   .random-stations .station-name {
      font-size: 0.75em;
      margin: 2px 0; /* Reduced vertical margin */
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
      line-height: 1.2;
      padding: 0 2px; /* Small horizontal padding */
      box-sizing: border-box; /* Include padding in width */
  }

   /* NEW RULES FOR SINGLE-LINE STATION NAMES */
.popular-stations .station-name,
.random-stations .station-name {
    font-size: 0.75em;
    margin: 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    line-height: 1.2;
}

.station-artist {
  font-size: 0.65em;
  color: #666;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  line-height: 1.2;
  padding: 0 2px;
  box-sizing: border-box;
  min-height: 1.2em; /* Prevent layout shift when loading */
}

/* ======================
   Now Playing Section
   ====================== */
.now-playing {
    text-align: center;
    padding: 30px 15px;
}

.now-playing h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.now-playing p {
    font-size: 1.1em;
    margin: 5px 0;
}

.now-playing audio {
    display: block;
    margin: 15px auto 0;
    width: 100%;
    max-width: 300px;
}

.now-playing .album-art-wrapper {
    max-width: 300px;
    margin: 0 auto;
}

.now-playing img {
    display: block;
    margin: 10px auto;
    max-width: 300px;
    border-radius: 10px;
}

/* ======================
   Weekly Highlight
   ====================== */
.weekly-highlight .highlight-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.highlight-logo {
    width: 60px;
    height: 60px;
}

.highlight-details {
    list-style: none;
    padding-left: 0;
}

.highlight-details li {
    position: relative;
    padding-left: 1.3em;
    margin-bottom: 0.5em;
}

.highlight-details li::before {
    content: "♪";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.3em;
    line-height: 1;
    color: #230cf0;
}

.highlight-details li::before,
.music-news-list li::before {
  color: var(--primary-brand); /* Changed from #230cf0 */
}

/* ======================
   Music News
   ====================== */
.music-news-list {
    list-style: none;
    padding: 0;
}

.music-news-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75em;
}

.music-news-list li::before {
    content: "♬";
    margin-right: 0.5em;
    color: #230cf0;
    font-size: 1em;
    display: inline-block;
    animation: swayNote 2.5s ease-in-out infinite;
    transform-origin: center;
}

.music-news-list li a {
    color: var(--main-text);         /* Matches theme text color */
    font-size: 0.95em;               /* Slightly larger text */
    line-height: 1.4;                /* More breathing room */
    text-decoration: underline;      /* Helps indicate it's a link */
}

.music-news-list li a:hover {
    color: var(--accent);            /* Optional: subtle hover effect */
}
.news-source {
    color: #888;
    font-size: 0.85em;
}

/* ON AIR Indicator Styles */
/* ON AIR Indicator - Final Version */
#on-air-indicator {
    position: absolute;
    left: 120px; /* Aligns with logo */
    margin-left: 10px;
    padding: 2px 8px;
    border: 2px solid #d00;
    border-radius: 4px;
    font-size: 0.7em;
    vertical-align: middle;
    transition: opacity 0.3s;
    opacity: 0; /* Start hidden */
    pointer-events: none; /* Prevents interaction */
    text-shadow: 0 0 2px white; 
    text-shadow: 0 0 2px white; /* Makes text pop */
    transition: all 0.5s ease; /* Smoother transitions */
  }
  
  .on-air-text {
    color: white;
    font-weight: bold;
  }
  
  .on-air-visible {
    opacity: 1 !important; /* Force visibility */
    display: inline-block !important;
    animation: pulse 3s infinite !important;
  }
  
  @keyframes pulse {
    0% {
      background-color: #a00;  /* Darker red */
      box-shadow: 0 0 5px #f00; /* Glow effect */
    }
    50% {
      background-color: #f00;  /* Bright red */
      box-shadow: 0 0 15px #f00, 
                  0 0 20px #f44; /* Stronger glow */
    }
    100% {
      background-color: #800;  /* Deepest red */
      box-shadow: 0 0 3px #f00;
    }
  }

  @keyframes swayNote {
    0%, 100% {
      transform: rotate(0deg);
    }
    25% {
      transform: rotate(-10deg);
    }
    75% {
      transform: rotate(10deg);
    }
  }


/* Theme Switch Container */
.theme-switch-wrapper {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
  }
  
  /* Switch Labels */
  .theme-switch {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .studio-mode-label {
    font-size: 0.9em;
    margin-left: 5px;
    color: #fff; /* white text */
  }

  

  /* Switch styling (same as before) */
  .switch {
    order: 2; /* Positions checkbox before text */
  }
  .on-air-text {
    color: white !important;
    font-weight: bold !important;
    visibility: visible !important;
  }
  /* Header Layout Fixes */
.header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
  }
  
  .header-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  /* Remove old margin from h1 */
  .header-banner h1 {
    margin: 0; /* Remove the old margin-right */
  }
  
  footer {
    background: var(--secondary-bg);
    color: var(--secondary-text);
    font-size: 0.9em;
  }
  
  footer a:hover {
    text-decoration: underline;
  }
  
  /* make genre‐list look just like music‐news */
.genre-list {
  list-style: none;
  padding: 0;
}

.genre-list li {
  margin-bottom: 0.75em;
}

.genre-list li a {
  color: var(--main-text);       /* same text color */
  font-size: 0.95em;             /* same size */
  line-height: 1.4;              /* same spacing */
  text-decoration: underline;    /* underline like news items */
}

.genre-list li a:hover {
  color: var(--accent);          /* same hover accent */
}

/* 1) Make the title‐group a flex container */
.header-title-group {
  display: flex;
  align-items: center;
  gap: 12px;           /* space between hamburger, logo, indicator */
  position: relative;  /* so absolute logo rules don’t carry over */
}

/* 2) Override the old absolute positioning on the logo */
.header-logo {
  position: static !important;
  margin: 0;
  font-size: 1.5em;
}

/* 3) Style the hamburger button */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* 4) Each line in the button */
.hamburger-line {
  width: 100%;
  height: 2px; /* Make it a bit thicker */
  background-color: var(--accent); /* Use your bright orange */
  border-radius: 2px;
  margin: 3px 0;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 0 4px var(--accent); /* Subtle glow */
}

/* ─── Put On Air and Switch Back into the Flex ─── */

/* Ensure header-banner is the flex container with relative positioning */
.header-banner {
  display: flex; 
  align-items: center;
  justify-content: space-between;
  position: relative;  /* allow any absolute children if needed */
}

/* Override the old absolute “on-air” rules */
#on-air-indicator {
  position: static !important;
  margin-left: 12px !important;  /* small gap after logo */
}

/* Restore theme-switch-wrapper to normal flow */
.theme-switch-wrapper {
  display: flex;
  align-items: center;     /* Align vertically */
  justify-content: flex-end;
  gap: 15px;               /* Space between toggle and auth links */
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%); /* Vertically center */
  height: 100%;
}

/* ── Off-Canvas Menu Styles ── */

/* Base state: hidden off to the left */
/* Off-canvas menu */
#offcanvas-menu {
  position: fixed;
  top: 50px;               /* sit just below the header */
  left: 0;
  bottom: 0;               /* CHANGE: Full height */
  width: 250px;
  height: auto !important;
  background: var(--primary-brand) !important;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1001;
}

/* When visible: slide in */
#offcanvas-menu.offcanvas-visible {
  transform: translateX(0);
}

/* Menu list styling */
#offcanvas-menu .menu-list {
  list-style: none;
  margin: 0;
  padding: 1em;
}

#offcanvas-menu .menu-list li {
  margin-bottom: 0.75em;
}

#offcanvas-menu .menu-list li a {
  color: var(--main-text);
  font-size: 1em;
  text-decoration: none;
  display: block;
  padding: 0.5em 0;
}

#offcanvas-menu .menu-list li a:hover {
  color: var(--primary-brand);
}
/* Full-screen semi-transparent overlay */
#page-overlay {
  position: fixed;
  top: 50px;                 /* below the header */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;             /* below menu (1001) but above content */
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;      /* clicks pass through when hidden */
}

/* Visible state */
#page-overlay.overlay-visible {
  opacity: 1;
  pointer-events: auto;      /* catch clicks when visible */
}
.pagination-controls {
  text-align: center;
  margin: 1em 0;
}
/* Make the button itself smaller */
.hamburger-btn {
  width: 18px;      /* was 24px */
  height: 14px;     /* was 18px */
  padding: 0;
  margin: 0;
}

/* Thinner lines, tighter spacing */
.hamburger-line {
  width: 100%;
  height: 1px;      /* was 2px */
  background-color: rgb(163, 161, 161);
  border-radius: 1px;
  margin: 2px 0;
}

.hamburger-btn:hover .hamburger-line {
  transform: scaleX(0.9);
  background-color: #ffffff;                  /* turn white on hover */
  box-shadow: 0 0 6px #ffffff;
}

/* Off-canvas headings */
#offcanvas-menu h4 {
  margin: 0.5em 0 0.25em;  /* tighten above/below */
  font-size: 1em;         /* match other headings */
  font-weight: bold;
  color: white;
}

/* Reset list spacing */
.offcanvas-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Tighter spacing between items */
.offcanvas-list li {
  margin: 0.25em 0;
}

/* Make links more legible on blue background */
.offcanvas-list li a {
  color: var(--secondary-text);      /* e.g. #666 in light-mode, #AAAA in dark */
  text-decoration: none;
  font-size: 0.95em;
}

.offcanvas-list li a:hover {
  color: var(--accent);             /* subtle pop on hover */
  text-decoration: underline;
}
/* Tighten headings & links */
#offcanvas-menu .offcanvas-heading {
  margin: 0.5em 0 0.25em;    /* small gap above/below */
  font-size: 1em;
  font-weight: bold;
  padding-left: 0;           /* flush left */
}

#offcanvas-menu .offcanvas-heading a {
  color: white;              /* or var(--main-text) if you'd prefer */
  text-decoration: none;
}

#offcanvas-menu .offcanvas-heading a:hover {
  text-decoration: underline;
}

/* Base list reset */
.offcanvas-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Only .bullet-list gets bullets */
.offcanvas-list.bullet-list {
  list-style: disc inside;
}

/* Tighter spacing between items */
.offcanvas-list.bullet-list li {
  margin: 0.25em 0;
}

/* Link colors for legibility */
.offcanvas-list li a {
  color: var(--secondary-text);
  text-decoration: none;
}

.offcanvas-list li a:hover {
  color: var(--accent);
  text-decoration: underline;
}
/* Indent the bullet list further from the left edge */
.offcanvas-list.bullet-list {
  padding-left: 1.2em;       /* controls how far in the bullets sit */
}

/* Tighter spacing between items */
.offcanvas-list.bullet-list li {
  margin: 0.2em 0;           /* vertical gap */
  padding-left: 0;           /* reset any extra padding */
}

/* Reduce the space between the bullet and its text */
.offcanvas-list.bullet-list li::marker {
  margin-right: 0.3em;       /* shrink distance from dot to text */
  font-size: 0.9em;          /* optional: slightly smaller bullet */
}
/* 1. Smooth transitions for color & scale */
.btn {
  transition: 
    background-color 0.2s ease, 
    color 0.2s ease, 
    transform 0.1s ease-in-out;
}

/* 2. Normal state */
.btn {
  background-color: var(--primary-brand);
  color: #fff;
  border: none;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  cursor: pointer;
}

/* 3. Hover state (optional) */
.btn:hover {
  background-color: var(--accent);
  color: #fff;
}

/* 4. Active/click state */
.btn:active {
  background-color: var(--accent);
  color: #fff;
  transform: scale(0.95);
  /* trigger a quick text “ripple” */
  animation: text-press 0.2s ease-out;
}
/* ——— BUTTON GLOW ON HOVER ——— */
.btn {
  /* give them a little depth always */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: 
    background-color 0.2s ease, 
    color 0.2s ease, 
    box-shadow 0.2s ease,
    transform 0.1s ease-in-out;
}

.btn:hover {
  background-color: var(--accent);
  color: #fff;
  /* glow outwards */
  box-shadow: 0 0 8px var(--accent), 0 2px 6px rgba(0,0,0,0.2);
}

.btn:active {
  transform: scale(0.95);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

/* ——— STATION-CARD GLOW ON HOVER ——— */
.station-card {
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s ease, transform 0.1s ease-in-out;
}

.station-card:hover {
  /* subtle glow in your accent color */
  box-shadow: 0 0 10px var(--accent), 0 2px 8px rgba(0,0,0,0.3);
}

.station-card:active {
  transform: scale(0.96);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

/* 5. Subtle text animation */
@keyframes text-press {
  0%   { letter-spacing: normal; }
  50%  { letter-spacing: 0.15em; }
  100% { letter-spacing: normal; }
}
/* make station-cards animate on press */
.station-card {
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  /* ensure they have a little depth by default */
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.station-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.station-card:active {
  /* shrink slightly */
  transform: scale(0.96);
  /* give a quick inset shadow to feel “pressed” */
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
  /* subtle text-ripple */
  animation: card-press-text 0.2s ease-out;
}

@keyframes card-press-text {
  0%   { letter-spacing: normal; }
  50%  { letter-spacing: 0.1em; }
  100% { letter-spacing: normal; }
}
/* add this to the very bottom of static/css/styles.css */

/* Make station-cards stand out on hover */
.station-card {
  cursor: pointer;                 /* ensure pointer cursor */
  transition:
    background-color 0.2s ease,
    box-shadow        0.2s ease,
    transform         0.1s ease-in-out;
}

.station-card:hover {
  /* glow in accent color + slight background tint */
  box-shadow: 0 0 10px var(--accent), 0 2px 8px rgba(0,0,0,0.3);
  background-color: rgba(246, 174, 9, 0.1);
}

.station-card:active {
  /* pressed state */
  transform: scale(0.96);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}

/* Add this to your CSS file */
#main-logo {
  transition: opacity 0s ease;
  max-width: 100%; /* Ensure responsive sizing */
  height: auto; /* Maintain aspect ratio */
}

/* Optional fade effect during transition */
#main-logo.switching {
  opacity: 0.7;
}
/* ── Make all links inside <main> stand out on dark or light backgrounds ── */
main a {
  color: var(--accent);           /* e.g. your orange (#F6AE09) */
  text-decoration: underline;     /* or whatever style you prefer */
}

main a:hover {
  color: var(--primary-brand);    /* on hover, switch to your bright blue */
}

/* Add to your button styles */
.search-form button {
    margin-left: 5px;
}

#surprise-me {
  background-color: var(--primary-brand);
  color: white;
  border-radius: 5px;
  margin-left: 5px;
}

#surprise-me:hover {
    background-color: #0a45e0; /* slightly darker blue */
    box-shadow: 0 0 15px var(--primary-brand), 0 0 25px var(--primary-brand);
    transform: translateY(-1px); /* subtle lift effect */
    transition: all 0.2s ease;
}

#surprise-me[disabled] {
    background-color: #0a45e0;
    opacity: 0.8;
}

/* =============== Auth Forms =============== */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    background: var(--secondary-bg);
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 20px;
    font-size: 1.5em;
    color: var(--primary-brand);
}

.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.auth-container label {
    font-size: 0.9em;
    color: var(--main-text);
    margin-bottom: 4px;
}

.auth-container input {
    padding: 10px;
    border: 1px solid var(--borders);
    border-radius: 5px;
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s ease;
}

.auth-container input:focus {
    border-color: var(--primary-brand);
}

.auth-container button,
.auth-container input[type="submit"] {
    margin-top: 10px;
    background-color: var(--primary-brand);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-container button:hover,
.auth-container input[type="submit"]:hover {
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.auth-container p.error {
    color: #d00;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Auth form message styles */
.auth-message {
    font-size: 0.9em;
    margin-bottom: 10px;
    color: var(--secondary-text);
    text-align: center;
}

.auth-message a {
    color: var(--primary-brand);
    text-decoration: underline;
}

.auth-feedback {
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.9em;
    padding: 8px;
    border-radius: 4px;
}

.auth-feedback.success {
    color: #0a8500;
    background: rgba(10, 133, 0, 0.1);
    border: 1px solid #0a8500;
}

.auth-feedback.error {
    color: #d00;
    background: rgba(220, 0, 0, 0.1);
    border: 1px solid #d00;
}

/* ========== Feedback Animation ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-feedback {
    animation: fadeIn 0.4s ease-in-out;
}

/* ========== Adjust Logo & Form Spacing ========== */
.logo-search {
    margin-bottom: 10px; /* Reduced spacing between logo and form */
}

/* ========== Auth Container Hue ========== */
.auth-container {
    max-width: 400px;
    margin: 20px auto; /* Reduced vertical spacing */
    background: rgba(246, 174, 9, 0.1); /* Orangish hue using site accent */
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid var(--accent); /* subtle border matching the accent */
}

.auth-container h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
    color: var(--primary-brand);
}

/* Strong golden-orange glow */
.auth-container:hover {
  box-shadow:
    0 0 12px rgba(246, 174, 9, 0.6),
    0 0 20px rgba(246, 174, 9, 0.45),
    0 0 30px rgba(246, 174, 9, 0.3),
    0 2px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px); /* slight lift for emphasis */
  transition: all 0.3s ease;
}

/* Ultra-tight gap between logo and form ONLY where we opt in */
.logo-search.logo-compact {
  margin-bottom: 2px; /* was 10px; make it really tight */
}

/* Also reduce the form’s top spacing a hair */
.auth-container {
  margin: 12px auto; /* was 20px */
}

.auth-container {
  box-shadow:
    0 0 5px rgba(246, 174, 9, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.2);
}

.auth-links {
  display: flex;
  gap: 10px;              /* spacing between Login & Register */
  font-size: 0.9em;
}

.auth-links a {
  color: #fff; /* white text */
  text-decoration: none;
  font-weight: bold;
  position: relative; /* for underline effect */
  padding-bottom: 2px; /* space for underline */
  transition: color 0.2s ease;
}

.auth-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent); /* orange underline */
  transition: width 0.3s ease;
}

.auth-links a:hover {
  color: var(--accent);
}

.auth-links a:hover::after {
  width: 100%; /* animate underline */
}

.flash-success {
    background-color: #28a745; /* Bootstrap green */
    color: #fff;
    border: 1px solid #1e7e34;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Base flash box */
.flash {
  padding: 10px 12px;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 12px;
  font-weight: 600;
  animation: fadeIn 0.2s ease-in-out;
}

/* Success (green) */
.flash-success {
  background-color: #28a745; /* accessible green */
  color: #fff;
  border: 1px solid #1e7e34;
}

/* Error (red) */
.flash-error {
  background-color: #dc3545; /* accessible red */
  color: #fff;
  border: 1px solid #b02a37;
}

/* Optional: make sure dark mode keeps contrast high */
[data-theme="dark"] .flash-success {
  background-color: #1e7e34;
  border-color: #155d27;
}

[data-theme="dark"] .flash-error {
  background-color: #b02a37;
  border-color: #7a1e28;
}

/* Flash messages fade-in and fade-out */
.flash {
  opacity: 0;
  animation: fadeInOut 5s ease forwards; /* 5s = 0.5s fade-in + 4s visible + 0.5s fade-out */
}

@keyframes fadeInOut {
  0% { opacity: 0; }
  10% { opacity: 1; }   /* Fade in quickly */
  90% { opacity: 1; }   /* Stay visible */
  100% { opacity: 0; }  /* Fade out */
}

.auth-container select {
  padding: 10px;
  border: 1px solid var(--borders);
  border-radius: 5px;
  font-size: 0.95em;
  outline: none;
  transition: border-color 0.2s ease;
  background-color: #fff;
}

.auth-container select:focus {
  border-color: var(--primary-brand);
}

/* --- Search bar with icon button --- */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;              /* keeps Surprise Me button spaced */
}

.search-form .search-input {
  flex: 1;
  padding: 0.65rem 3.0rem 0.65rem 0.75rem; /* right padding makes room for icon */
  border: 1px solid var(--borders, #ccc);
  border-radius: 4px;
  font-size: 1rem;
  background: var(--surface, #fff);
  color: var(--text, #222);
}

/* Icon submit button sits on top/right of the input */
.search-form .search-submit {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  /* Use your brand orange if defined; otherwise fallback */
  background: var(--primary-brand, #ff9f43);
  color: #000; /* ensure contrast; tweak if your dark mode demands it */
}

/* Icon color */
.search-form .search-submit svg {
  fill: currentColor;
}

/* Hover / focus */
.search-form .search-submit:hover,
.search-form .search-submit:focus-visible {
  filter: brightness(0.95);
  outline: none;
}

/* Make sure the Surprise Me button doesn’t get squashed */
.search-form #surprise-me {
  margin-left: 0.5rem;
}

/* Wrapper around input + icon */
.search-wrapper {
  position: relative;
  flex: 1;
}

/* Input */
.search-wrapper .search-input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 0.75rem;
  border: 1px solid var(--borders, #ccc);
  border-radius: 4px;
  font-size: 1rem;
  background: #fff;
  color: #222;
}

/* Icon button inside input */
.search-wrapper .search-icon-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-wrapper .search-icon-btn svg {
  fill: var(--secondary-text, #333);
}

/* Fix Surprise Me button width */
.search-form #surprise-me {
  padding: 0.65rem 1rem;   /* Adjusted padding */
  white-space: nowrap;     /* Prevent text from breaking */
  min-width: 100px;        /* Enough width for full text */
}

/* Container for search input + icon */
.search-container {
  display: flex;
  border: 1px solid var(--borders, #ccc);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  width: 100%;
  max-width: 400px; /* Adjust as needed */
}

/* Search text field */
.search-container .search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  font-size: 1rem;
  outline: none;
}

/* Search icon button */
.search-container .search-icon-btn {
  background: var(--primary-brand, #f7a442); /* Signally orange */
  border: none;
  padding: 0 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-container .search-icon-btn svg {
  fill: #000; /* Icon color */
}

/* Surprise Me button fix */
.search-form #surprise-me {
  margin-left: 0.75rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  min-width: 120px;
}

/* Search container */
.search-container {
  display: flex;
  border: 1px solid var(--borders, #ccc);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  max-width: 360px; /* Slightly smaller overall width */
}

/* Search input */
.search-container .search-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: none;
  font-size: 0.9rem; /* slightly smaller font */
  outline: none;
}

/* Search icon button */
.search-container .search-icon-btn {
  background: var(--primary-brand, #f77f24); /* Signally orange */
  border: none;
  padding: 0 0.7rem; /* trim extra space */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.search-container .search-icon-btn svg {
  fill: #fff;        /* white icon */
  width: 22px;       /* larger icon */
  height: 22px;
}

.search-container .search-icon-btn:hover {
  box-shadow: 0 0 6px 2px rgba(247, 127, 36, 0.6); /* orange glow */
  transform: scale(1.05);
}

/* Surprise Me button */
.search-form #surprise-me {
  margin-left: 0.5rem;
  padding: 0.4rem 0.8rem; /* smaller padding */
  min-width: unset;       /* let content decide width */
  font-size: 0.9rem;
}

/* Search container */
.search-container {
  display: flex;
  border: 1px solid var(--borders, #ccc);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  max-width: 300px; /* trimmed width */
}

/* Search input */
.search-container .search-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: none;
  font-size: 0.9rem;
  outline: none;
}

/* Search icon button (yellow background) */
.search-container .search-icon-btn {
  background: #ffcc00;   /* bright yellow background */
  border: none;
  padding: 0 0.5rem;     /* trimmed button width */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 36px;       /* ensures button stays square enough */
}

.search-container .search-icon-btn svg {
  fill: #fff;    /* white icon */
  width: 22px;
  height: 22px;
}

.search-container .search-icon-btn:hover {
  box-shadow: 0 0 6px 2px rgba(255, 204, 0, 0.7); /* yellow glow */
  transform: scale(1.05);
}

/* Surprise Me button (unchanged from last step) */
.search-form #surprise-me {
  margin-left: 0.5rem;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  font-size: 0.9rem;
}

/* Search container */
.search-container {
  display: flex;
  border: 1px solid var(--borders, #ccc);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  max-width: 260px; /* narrower for desktop */
}

/* Search input */
.search-container .search-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: none;
  font-size: 0.9rem;
  outline: none;
}

/* Search icon button */
.search-container .search-icon-btn {
  background: none; /* remove yellow background */
  border: none;
  padding: 0 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}

.search-container .search-icon-btn svg {
  fill: #333;   /* dark grey */
  width: 24px;  /* slightly larger */
  height: 24px;
}

/* Surprise Me button */
.search-form #surprise-me {
  margin-left: 0.5rem;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  font-size: 0.9rem;
}

/* Responsive for mobile */
@media (max-width: 480px) {
  .search-container {
    max-width: 180px; /* narrower on small screens */
  }

  .search-form #surprise-me {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
  }
}
