@font-face {
    font-family: 'Jokerman';
    src: url('/css/fonts/Jokerman.otf') format('opentype'),
         url('/css/fonts/Jokerman.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap');

:root {
    --futura-stack: Futura, Poppins, 'Trebuchet MS', sans-serif;

    /* Light mode colors (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f0f0;
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-tertiary: #666666;
    --text-quaternary: #444444;
    --border-primary: #e0e0e0;
    --border-secondary: #dfe1e5;
    --border-tertiary: #ccc;
    --link-primary: #1a0dab;
    --link-secondary: #1a73e8;
    --link-hover: #3367D6;
    --button-primary: #4285F4;
    --button-hover: #3367D6;
    --highlight-bg: #fff3cd;
    --highlight-text: #000;
    --input-bg: #ffffff;
    --input-border: #dfe1e5;
    --input-focus: #4285F4;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e8e8e8;
    --text-secondary: #d0d0d0;
    --text-tertiary: #a0a0a0;
    --text-quaternary: #c0c0c0;
    --border-primary: #404040;
    --border-secondary: #4a4a4a;
    --border-tertiary: #555555;
    --link-primary: #8ab4f8;
    --link-secondary: #8ab4f8;
    --link-hover: #aac7ff;
    --button-primary: #8ab4f8;
    --button-hover: #aac7ff;
    --highlight-bg: #4a4a00;
    --highlight-text: #ffff99;
    --input-bg: #2d2d2d;
    --input-border: #4a4a4a;
    --input-focus: #8ab4f8;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    padding-top: 0; /* Remove the default padding-top */
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body:not(.search-page) {
    padding-top: 70px; /* Add padding-top for pages other than the main search page */
}

.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin-top: 12vh;
    margin-bottom: 10px;
}

.logo {
    font-family: 'Jokerman', cursive !important;
    font-size: 5rem;
    margin-bottom: 0;
    text-align: center;
    line-height: 1;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.subtitle {
    font-family: var(--futura-stack);
    font-size: 1.2rem;
    display: block;
    text-align: center;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    color: #333;
    letter-spacing: 0.5px;
}

.search-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    max-width: 600px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 3;
    height: 44px;
}

.search-input-wrapper input[type="text"] {
    flex-grow: 1;
    height: 100%;
    padding: 0 16px;
    font-size: 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px 0 0 24px;
    outline: none;
    min-width: 300px; /* Ensure minimum width */
}

select, input[type="submit"] {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

select {
    margin-right: 10px;
}

/* Styles for search results */
.episode {
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
    max-width: 600px;
    width: 100%;
}

.episode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.episode-header.active {
    font-weight: bold;
}

.episode-title {
    flex-grow: 1;
    margin-right: 10px;
}

.hit-count {
    margin-right: 10px;
    white-space: nowrap;
}

.toggle-button {
    width: 20px;
    text-align: center;
}

.episode-content {
    display: none;
    margin-left: 20px;
}

.timestamp {
    font-style: italic;
}

.excerpt {
    margin-left: 20px;
}

/* Add this to your existing styles */
.excerpt b {
    font-weight: bold;
    background-color: yellow;  /* Optional: adds a highlight effect */
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    padding: 5px 10px;
    margin: 0 5px;
    text-decoration: none;
    color: #4285F4;
    border: 1px solid #4285F4;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #4285F4;
    color: white;
}

/* Keep the existing styles for navbar, dropdown, etc. */

.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

.search-box input[type="text"] {
    flex-grow: 1;
    border: 1px solid #dfe1e5;
    border-radius: 24px 0 0 24px;
    padding: 10px 15px;
    font-size: 16px;
    outline: none;
}

.search-button {
    height: 100%;
    background-color: #4285F4;
    color: white;
    border: none;
    border-radius: 0 24px 24px 0;
    padding: 0 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #3367D6;
}

.search-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-options select {
    padding: 5px 10px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-size: 14px;
}

.results-container {
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
}

/* Styles for search results page */
.results-page {
    display: block;
    padding-top: 100px;
}

.search-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 900;
    transition: top 0.3s ease-in-out;
}

.search-bar-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.logo-small {
    font-family: 'Jokerman', cursive;
    font-size: 2.2rem;
    text-decoration: none;
    margin-right: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-bar form {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    outline: none;
    min-width: 100px;
}

.advanced-options-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Media query for smaller screens */
@media screen and (max-width: 600px) {
    .search-bar {
        padding: 5px;
    }

    .logo-small {
        font-size: 1.8rem; /* Slightly reduced for very small screens */
        margin-right: 10px;
    }

    .search-input-wrapper {
        max-width: calc(100% - 35px); /* Adjust based on the width of the settings button */
    }

    .search-input-wrapper input[type="text"] {
        min-width: 200px; /* Smaller minimum width for mobile */
        font-size: 16px;
        padding: 0 12px;
    }

    .advanced-options-toggle {
        padding: 5px;
        font-size: 18px;
    }
}

/* Media query for larger screens */
@media screen and (min-width: 601px) {
    .search-input-wrapper .search-button {
        display: block; /* Show the search button on larger screens */
        border-radius: 0 24px 24px 0;
        padding: 10px 15px;
        margin-left: -1px; /* Overlap with input border */
    }

    .search-input-wrapper input[type="text"] {
        border-radius: 24px 0 0 24px;
    }
}

.search-results {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

.result-item {
    margin-bottom: 20px;
}

.result-item h3 {
    margin-bottom: 5px;
}

.result-item h3 a {
    color: #1a0dab;
    text-decoration: none;
}

.result-item h3 a:hover {
    text-decoration: underline;
}

.result-url {
    color: #006621;
    font-size: 14px;
    margin-bottom: 5px;
}

.result-snippet {
    color: #545454;
    font-size: 14px;
    line-height: 1.4;
}

.result-meta {
    color: #006621;
    font-size: 14px;
    margin-top: 5px;
}

/* ... (rest of the styles remain the same) ... */

/* Updated styles for the search bar and navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    height: auto;
}

.navbar-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 20px;
}

body:not(.search-page) {
    padding-top: 50px; /* Reduced padding-top to match new navbar height */
}

.logo-small {
    font-family: 'Jokerman', cursive;
    font-size: 1.5rem;
    text-decoration: none;
    color: #000;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 1;
}

.search-form {
    flex-grow: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    margin: 0;
    position: relative;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.search-input-wrapper input[type="text"] {
    height: 100%;
    flex-grow: 1;
    padding: 0 10px;
    font-size: 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px 0 0 24px;
    outline: none;
}

.search-input-wrapper .search-button {
    height: 100%;
    border-radius: 0 24px 24px 0;
    padding: 0 15px;
    border: 1px solid #4285F4;
    background-color: #4285F4;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.advanced-options-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
}

.results-page {
    display: block;
    padding-top: 60px; /* Adjusted to match new navbar height */
}

.menu-icon {
    font-size: 24px;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.show {
    display: block;
}

.advanced-options {
    background-color: #f0f0f0;
    padding: 15px;
    margin-top: 5px;
    border-radius: 8px;
    width: 100%;
    display: none;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: row;
    box-sizing: border-box;
}

.advanced-options.show {
    display: flex;
}

.advanced-options select {
    padding: 8px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
}

.advanced-options select:focus {
    outline: none;
    border-color: #4285F4;
}

/* Add this to your existing styles */
.transcript-entry button {
    margin-left: 10px;
    padding: 2px 5px;
    background-color: #f44336;
    color: white;
    border: none;
    cursor: pointer;
}

#flagForm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.flagged-segment {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 20px;
}

/* Add these styles to your existing CSS file */

.hit-item {
    margin: 10px 0;
    padding: 10px;
    border-left: 3px solid #e0e0e0;
}

.timestamp-link {
    display: inline-block;
    padding: 2px 6px;
    background: #f0f0f0;
    border-radius: 3px;
    color: #666;
    text-decoration: none;
    margin-right: 10px;
    font-family: monospace;
}

.timestamp-link:hover {
    background: #e0e0e0;
}

.result-snippet {
    display: inline;
    margin: 0;
}

.hits-container {
    margin: 10px 0;
}

.result-meta {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #eee;
}

mark {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

/* Add this to your existing styles */
.navbar-content:has(.search-form) .logo-small {
    flex-grow: 0;
}

.navbar-content:not(:has(.search-form)) .logo-small {
    flex-grow: 1;
    text-align: center;
}

.navbar:empty {
    display: none; /* Hide the navbar if it's empty */
}

.site-footer {
    text-align: center;
    padding: 5px;
    background-color: #f8f8f8;
    border-top: 1px solid #e7e7e7;
    position: relative;
    bottom: 0;
    width: 100%;
    font-size: 0.9em;
    color: #666;
}

.site-footer-search {
   bottom: -40px;
}

.site-footer a {
    color: #333;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

body {
    /* ... existing styles ... */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Add these styles to your existing CSS file */

.suggested-searches {
    margin-top: 20px;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.suggested-searches h3 {
    font-family: 'Futura', sans-serif;
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.suggested-searches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    justify-content: center;
}

.suggested-search-item {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    transition: background-color 0.3s, transform 0.3s;
}

.suggested-search-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

/* Update the existing styles for the search page */
.search-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px; /* Increased padding to accommodate footer */
}

.page-wrap {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Adjust the suggested searches section */
.suggested-searches {
    margin-top: 30px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    margin-bottom: 80px; /* Keep this to ensure space above footer */
    padding-bottom: 20px;
}

/* Add a media query for smaller screens */
@media screen and (max-height: 600px) {
    .search-page {
        padding-bottom: 80px; /* Increase padding for smaller screens */
    }

    .suggested-searches {
        margin-bottom: 100px; /* Increase margin for smaller screens */
    }
}

/* Google-inspired logo colors */
.logo .blue { color: #4285F4; }
.logo .red { color: #EA4335; }
.logo .yellow { color: #FBBC05; }
.logo .green { color: #34A853; }

/* For the small logo in the navbar */
.logo-small .blue { color: #4285F4; }
.logo-small .red { color: #EA4335; }
.logo-small .yellow { color: #FBBC05; }
.logo-small .green { color: #34A853; }

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: rgba(66, 133, 244, 0.5); /* More transparent blue */
    color: white;
    width: 50px;  /* Increased from 40px */
    height: 50px; /* Increased from 40px */
    text-align: center;
    line-height: 50px; /* Increased to match new height */
    font-size: 30px; /* Increased from 24px */
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 1000;
    border-radius: 8px; /* Increased from 4px for softer corners */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Added subtle shadow */
}

.back-to-top:hover {
    background-color: rgba(51, 103, 214, 0.7); /* Slightly more opaque on hover */
    transform: scale(1.1); /* Slight grow effect on hover */
}

.back-to-top::after {
    content: '↑';
    display: inline-block;
}

/* Ensure the arrow doesn't overlap with the footer on smaller screens */
@media (max-height: 700px) {
    .back-to-top {
        bottom: 90px; /* Increased from 80px */
    }
}

/* Sticky Footer Styles */
html, body {
  height: 100%;
}

.search-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrap {
  flex: 1 0 auto;
  padding-bottom: 60px; /* Match this to the height of your footer */
}

.site-footer {
  flex-shrink: 0;
}

/* Specific styles for the search page footer */
.site-footer-search {
  background-color: #f8f8f8;
  border-top: 1px solid #e7e7e7;
  text-align: center;
  padding: 5px;
  width: 100%;
  font-size: 0.9em;
  color: #666;
}

.site-footer-search a {
  color: #333;
  text-decoration: none;
}

.site-footer-search a:hover {
  text-decoration: underline;
}

/* Media query for phone displays */
@media screen and (max-width: 767px) {
  .site-footer-search {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* Ensure it stays on top of other content */
    font-size: 0.6em; /* Reduced font size for smaller screens */
    padding: 1px;
  }

  .page-wrap {
    padding-bottom: 0; /* Remove padding as the footer is now sticky */
  }
}

/* Update existing styles */
.search-container {
  margin-top: 12vh;
  margin-bottom: 20px;
}

/* Add margin and spacing to the bottom of suggested searches */
.suggested-searches {
  margin-top: 30px;
  text-align: center;
  max-width: 600px;
  width: 100%;
  margin-bottom: 80px; /* Increased to ensure no overlap with footer */
  padding-bottom: 20px;
}

.transcript-entry {
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.transcript-entry.highlight {
    background-color: #ffffd0;
}

.search-bar-container {
    width: 100%;
    max-width: 800px; /* Match this with your content max-width */
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px; /* Add horizontal padding here */
}

/* Episode page styles */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.episode-header h1 {
    font-family: var(--futura-stack);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.episode-links {
    margin-bottom: 2rem;
}

.episode-links h2 {
    font-family: var(--futura-stack);
    margin-bottom: 1rem;
    color: #333;
}

.episode-links ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.episode-links a {
    font-family: var(--futura-stack);
    color: #1a0dab;
    text-decoration: none;
    font-size: 1rem;
}

.episode-links a:hover {
    text-decoration: underline;
}

.transcript-container {
    margin-top: 2rem;
}

.transcript-entry {
    margin-bottom: 10px;
    padding: 5px;
}

.transcript-entry .timestamp {
    font-weight: bold;
    margin-right: 5px;
}

.transcript-entry .content {
    display: inline;
}

.transcript-entry.highlight {
    background-color: #ffff99;
    transition: background-color 0.3s ease;
}

/* Align search bar and content */
.search-bar-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

/* Episode page layout */
.content-container {
    max-width: 1200px;  /* or whatever max-width you prefer */
    margin: 0 auto;
    padding: 0 20px;    /* adds some spacing on mobile */
}

.content-wrapper {
    padding: 20px 0;    /* vertical padding only */
}

.search-bar {
    width: 100%;
    background-color: #f5f5f5;  /* or whatever your background color is */
    padding: 1rem 0;
}

.search-bar-container {
    max-width: 1200px;  /* should match content-container */
    margin: 0 auto;
    padding: 0 20px;    /* should match content-container padding */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.episode-header h1 {
    font-family: 'Futura', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.episode-header h2 {
    font-family: 'Futura', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #666;
}

.episode-links {
    margin-bottom: 2rem;
}

.episode-links h2 {
    font-family: var(--futura-stack);
    margin-bottom: 1rem;
}

.episode-links ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.episode-links a {
    font-family: var(--futura-stack);
    color: #1a0dab;
    text-decoration: none;
}

.episode-links a:hover {
    text-decoration: underline;
}

.transcript-container {
    margin-top: 1rem;
}

.transcript-entry {
    margin-bottom: 10px;
    padding: 5px;
}

.transcript-entry .timestamp {
    font-weight: bold;
    margin-right: 5px;
}

.transcript-entry .content {
    display: inline;
}

.transcript-entry.highlight {
    background-color: #ffff99;
    transition: background-color 0.3s ease;
}

/* Remove duplicate and conflicting styles */
.container, .content-container, .content-wrapper {
    display: block;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-wrapper {
    display: block;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Update about section styles */
.about-section {
    margin-bottom: 2.5rem;
    width: 100%;
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1rem;
}

.about-section a {
    color: #1a0dab;
    text-decoration: none;
    transition: color 0.2s ease;
}

.about-section a:hover {
    color: #4285F4;
    text-decoration: underline;
}

/* 404 Error Page Styles */
.error-page {
    min-height: 100vh;
    background-color: #fff;
}

.error-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.error-container h1 {
    font-size: 120px;
    margin: 0;
    background: linear-gradient(45deg, var(--tc-blue), var(--tc-red), var(--tc-yellow), var(--tc-green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.error-message {
    font-size: 24px;
    margin: 20px 0 40px;
    color: #333;
    font-weight: 500;
}

.error-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.home-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--tc-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.home-button:hover {
    background-color: var(--tc-red);
}

.error-subtitle {
    margin: 10px 0;
    color: #666;
}

.error-page .search-form {
    width: 100%;
    max-width: 500px;
}

@media screen and (max-width: 600px) {
    .advanced-options {
        flex-direction: column;
        width: 100%;
    }
    
    .advanced-options select {
        width: 100%;
    }
}

/* Episodes list controls */
.episodes-controls {
    max-width: 800px;
    margin: 0 auto 20px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.episodes-controls label {
    font-family: var(--futura-stack);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.episodes-controls select {
    padding: 6px 10px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.episodes-controls select:focus {
    border-color: var(--input-focus);
}

.random-episode-btn {
    margin-left: auto;
    padding: 6px 14px;
    background-color: var(--button-primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.random-episode-btn:hover {
    background-color: var(--button-hover);
    transform: scale(1.05);
}

.random-episode-btn:active {
    transform: scale(0.98);
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-style: italic;
}

@media screen and (max-width: 768px) {
    .episodes-controls {
        gap: 10px;
    }

    .controls-group {
        flex: 1 1 auto;
        min-width: 140px;
    }

    .random-episode-btn {
        flex: 1 1 100%;
        margin-left: 0;
    }
}

.episodes-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Episode list styles - Compact version */
.episode-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s ease;
}

.episode-item:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.episode-item h2 {
    margin: 0 0 8px 0;
    font-family: var(--futura-stack);
    font-size: 1.2rem;
    line-height: 1.3;
}

.episode-item h2 a {
    color: #1a73e8;
    text-decoration: none;
}

.episode-item h2 a:hover {
    text-decoration: underline;
}

.episode-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.episode-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.episode-date {
    color: #666;
    font-size: 0.85rem;
}

.episode-guests {
    font-size: 0.9rem;
    color: #333;
}

.guests-label {
    font-weight: 500;
    color: #666;
}

.episode-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.episode-links a {
    color: #4285F4;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.episode-links a:hover {
    color: #3367D6;
    text-decoration: underline;
}

.download-link,
.wiki-link,
.transcript-link {
    color: #4285F4;
    text-decoration: none;
}

.episode-description {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.episode-description p {
    margin: 0;
    color: #444;
    line-height: 1.5;
    font-size: 0.9rem;
}

@media screen and (max-width: 600px) {
    .episode-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .episode-links {
        margin-top: 6px;
    }

    .episode-item {
        padding: 10px 12px;
    }

    .episodes-controls {
        padding: 0 10px;
    }
}

/* Removed duplicate episode-links styles - consolidated above */

/* Episode search within page styles */
.episode-search-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.episode-search-container h2 {
    font-family: var(--futura-stack);
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    color: #333;
}

.episode-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.episode-search-wrapper input {
    flex: 1;
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.episode-search-wrapper input:focus {
    border-color: #4285F4;
    box-shadow: 0 1px 6px rgba(66, 133, 244, 0.3);
}

.clear-search {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.clear-search:hover {
    background-color: #e0e0e0;
}

.episode-search-results {
    margin-top: 15px;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-search-results .results-count {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin: 0;
    font-weight: 500;
}

.match-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-match-btn {
    padding: 6px 12px;
    background-color: var(--button-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-match-btn:hover {
    background-color: var(--button-hover);
}

.match-counter {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.episode-search-results .no-results {
    color: #666;
    font-style: italic;
    margin: 0;
}

.episode-search-results .results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.episode-search-results .result-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.episode-search-results .result-item:hover {
    box-shadow: 0 2px 6px var(--shadow-hover);
}

.episode-search-results .result-item.active-result {
    background: var(--bg-tertiary);
    border-color: var(--button-primary);
    box-shadow: 0 2px 6px var(--shadow-hover);
}

.episode-search-results .result-link {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: inherit;
}

.episode-search-results .result-timestamp {
    display: inline-block;
    font-family: monospace;
    font-size: 0.85rem;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 10px;
    color: #666;
}

.episode-search-results .result-preview {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.4;
}

.search-highlight {
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 500;
}

/* Episode Guests Section */
.episode-guests-section {
    margin: 20px 0;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--button-primary);
}

.episode-guests-section h3 {
    font-family: var(--futura-stack);
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: var(--text-secondary);
}

.guests-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.guests-list li {
    margin: 0;
}

.guest-link {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    color: var(--link-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.guest-link:hover {
    background: var(--button-primary);
    color: white;
    border-color: var(--button-primary);
    transform: translateY(-1px);
}

/* Breadcrumb Navigation */
.breadcrumbs {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.breadcrumb-link {
    color: var(--link-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--text-tertiary);
}

.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 10px;
    right: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.navbar-content .dark-mode-toggle {
    position: static;
    margin-left: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
}

/* Apply dark mode colors to all components */

/* Navbar */
.navbar {
    background-color: var(--bg-primary);
    box-shadow: 0 2px 5px var(--shadow);
}

/* Inputs and forms */
input[type="text"],
select {
    background-color: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--input-border);
}

input[type="text"]:focus,
select:focus {
    border-color: var(--input-focus);
}

/* Buttons */
.search-button,
button[type="submit"] {
    background-color: var(--button-primary);
    border-color: var(--button-primary);
}

.search-button:hover,
button[type="submit"]:hover {
    background-color: var(--button-hover);
}

/* Links */
a {
    color: var(--link-secondary);
}

.result-item h3 a,
.episode-item h2 a {
    color: var(--link-secondary);
}

/* Cards and containers */
.episode-item,
.result-item,
.episode-search-results .result-item {
    background: var(--bg-primary);
    border-color: var(--border-primary);
}

.episode-item:hover,
.result-item:hover,
.episode-search-results .result-item:hover {
    box-shadow: 0 2px 8px var(--shadow-hover);
}

/* Episode search container */
.episode-search-container {
    background: var(--bg-secondary);
}

.episode-search-results .result-item {
    background: var(--bg-primary);
}

.episode-search-results .result-timestamp {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

.episode-search-results .result-preview {
    color: var(--text-quaternary);
}

/* Advanced options */
.advanced-options {
    background-color: var(--bg-tertiary);
    box-shadow: 0 2px 5px var(--shadow);
}

.advanced-options select {
    background-color: var(--input-bg);
}

/* Transcript entries */
.transcript-entry {
    transition: background-color 0.3s ease;
}

.transcript-entry.highlight {
    background-color: var(--highlight-bg);
}

/* Episode description */
.episode-description {
    border-top-color: var(--border-primary);
}

.episode-description p {
    color: var(--text-quaternary);
}

/* Footer */
.site-footer {
    background-color: var(--bg-secondary);
    border-top-color: var(--border-primary);
    color: var(--text-tertiary);
}

.site-footer a {
    color: var(--text-secondary);
}

/* Back to top button */
.back-to-top {
    background-color: rgba(66, 133, 244, 0.5);
}

[data-theme="dark"] .back-to-top {
    background-color: rgba(138, 180, 248, 0.5);
}

.back-to-top:hover {
    background-color: rgba(51, 103, 214, 0.7);
}

[data-theme="dark"] .back-to-top:hover {
    background-color: rgba(170, 199, 255, 0.7);
}

/* Hits container */
.hit-item {
    border-left-color: var(--border-primary);
}

.timestamp-link {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
}

.timestamp-link:hover {
    background: var(--border-primary);
}

/* Result metadata */
.result-meta,
.result-url {
    color: var(--text-tertiary);
}

.result-snippet {
    color: var(--text-tertiary);
}

/* Episode controls */
.episodes-controls label {
    color: var(--text-secondary);
}

.episodes-controls select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
}

/* Subtitle */
.subtitle {
    color: var(--text-secondary);
}

/* Suggested searches */
.suggested-searches h3 {
    color: var(--text-secondary);
}

.suggested-search-item {
    background-color: var(--bg-tertiary);
    border-color: var(--border-secondary);
    color: var(--text-secondary);
}

.suggested-search-item:hover {
    background-color: var(--border-primary);
}

/* Mark/highlight elements */
mark {
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
}

/* Episode header */
.episode-header h1,
.episode-header h2 {
    color: var(--text-secondary);
}

/* About section */
.about-section h2 {
    color: var(--text-secondary);
}

.about-section p {
    color: var(--text-quaternary);
}

/* Episode date and metadata */
.episode-date {
    color: var(--text-tertiary);
}

.episode-guests {
    color: var(--text-secondary);
}

.guests-label {
    color: var(--text-tertiary);
}

/* Error messages */
.error {
    color: var(--text-primary);
}

/* Loading messages */
.loading {
    color: var(--text-tertiary);
}

/* Results summary */
.results-summary {
    color: var(--text-secondary);
}

/* Episode search specific */
.episode-search-container h2 {
    color: var(--text-secondary);
}

.episode-search-results .results-count {
    color: var(--text-tertiary);
}

.episode-search-results .no-results {
    color: var(--text-tertiary);
}

/* Clear search button */
.clear-search {
    color: var(--text-tertiary);
}

.clear-search:hover {
    background-color: var(--border-primary);
}

/* Episode links */
.episode-links a {
    color: var(--link-secondary);
}

.episode-links a:hover {
    color: var(--link-hover);
}

.download-link,
.wiki-link,
.transcript-link {
    color: var(--link-secondary);
}

/* Guest Statistics Page */
.guest-stats-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-family: var(--futura-stack);
    font-size: 2rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}

.page-subtitle {
    color: var(--text-tertiary);
    font-size: 1.1rem;
    margin: 0;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--button-primary);
    font-family: var(--futura-stack);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-top: 5px;
}

.guest-list h2 {
    font-family: var(--futura-stack);
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
}

.guest-stat-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.guest-stat-item:hover {
    box-shadow: 0 2px 8px var(--shadow-hover);
}

.guest-stat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
}

.guest-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-tertiary);
    min-width: 40px;
    text-align: center;
    font-family: var(--futura-stack);
}

.guest-info {
    flex: 1;
}

.guest-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.guest-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--link-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.guest-name:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.guest-count {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.guest-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.guest-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--button-primary), var(--link-secondary));
    transition: width 0.5s ease;
}

.toggle-episodes {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.toggle-episodes:hover {
    color: var(--text-primary);
}

.guest-episodes {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.guest-episodes.expanded {
    max-height: 2000px;
}

.guest-episodes ul {
    list-style: none;
    padding: 0 15px 15px 70px;
    margin: 0;
}

.guest-episodes li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.guest-episodes li:last-child {
    border-bottom: none;
}

.guest-episodes a {
    color: var(--link-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.guest-episodes a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.guest-episodes .episode-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

@media screen and (max-width: 768px) {
    .guest-stat-header {
        padding: 12px;
        gap: 10px;
    }

    .guest-rank {
        min-width: 30px;
        font-size: 1.2rem;
    }

    .guest-name {
        font-size: 1rem;
    }

    .guest-episodes ul {
        padding-left: 40px;
    }

    .guest-episodes li {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Selective transitions for theme switching and interactions */
body,
.navbar,
.site-footer,
.episode-item,
.result-item,
.episode-search-container,
.advanced-options,
.suggested-search-item,
.dark-mode-toggle,
input[type="text"],
select,
button {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Preserve hover/interaction transitions */
button,
a,
.episode-item,
.result-item,
.dark-mode-toggle {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease, transform 0.3s ease;
}

