

/* static/styles.css */
:root {
    --button-color: #8b949e;
    /* Default button color */
    --background-color: #3c4252;
    /* Default background color */
    --text-color: #f6f5f4;
    --button-color: #3e4555;
    --container-button-color: transparent;
    --button-text-color: #f6f5f4;
    --text-secondary-color: #f6f5f4;
    --accent-color: #6d747f;
    --prog-bar-color: #3550af;
    --error-color: red;
    --bonus-color: black;
    --border-color: 000000;
    --secondary-background: #2e3440;
    --standout-color: #6e8e92;
    --hover-color: #5d80aa;
    --link-color: #5d80aa;
    --container-background: #2b2f3a;
    --transparent-background: rgba(63, 57, 90, 0.089);
    --alert-color: #880101;
    --warning-color: #ffcc00;
    --success-color: #00cc00;
    --check-box-color: #ffffff;
}

html, body {
    overflow-x: clip;
}

body {
    background-color: var(--background-color);
    min-height: 100vh;
    margin: 0;
    /* Default background color */
    /* Other global styles */
}

.main-container {
    max-width: 1200px;
    /* Set the maximum width you desire */
    margin: 0 auto;
    /* This centers the div */
    padding: 0 20px;
}

body.audio-player-active .main-container {
    padding-bottom: 68px;
}

/* ── Login ────────────────────────────────────────── */

.login-link {
    color: var(--link-color);
    cursor: pointer;
    font-size: 0.875rem;
    transition: opacity 0.15s ease-out;
    background: none;
    border: none;
    padding: 0;
}

.login-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.login-card {
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 22rem;
    padding: 2rem;
}

.modal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: 6px;
    color: var(--text-secondary-color);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease-out, color 0.15s ease-out;
    border: none;
}

.modal-close-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.modal-inner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.change-server-btn {
    padding: 0.5rem 0.875rem;
    background-color: var(--button-color);
    color: var(--button-text-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-out;
    border: none;
}

.change-server-btn:hover {
    background-color: var(--hover-color);
}

/* Base container styling */
.episode-description-container {
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text-color);
}

/* Headers */
.episode-description-container h1,
.episode-description-container h2,
.episode-description-container h3,
.episode-description-container h4,
.episode-description-container h5,
.episode-description-container h6 {
    margin: 1.5em 0 0.75em;
    font-weight: 600;
    line-height: 1.3;
}

.episode-description-container h1 {
    font-size: 1.75em;
}
.episode-description-container h2 {
    font-size: 1.5em;
}
.episode-description-container h3 {
    font-size: 1.25em;
}
.episode-description-container h4 {
    font-size: 1.1em;
}
.episode-description-container h5,
.episode-description-container h6 {
    font-size: 1em;
}

/* Paragraphs and spacing */
.episode-description-container p {
    margin: 1em 0;
}

.episode-description-container p + p {
    margin-top: 1.5em;
}

/* Lists */
.episode-description-container ul,
.episode-description-container ol {
    margin: 1em 0;
    padding-left: 2em;
}

.episode-description-container li {
    margin: 0.5em 0;
    line-height: 1.6;
}

.episode-description-container ul {
    list-style-type: disc;
}

.episode-description-container ul ul {
    list-style-type: circle;
}

.episode-description-container ol {
    list-style-type: decimal;
}

/* Links */
.episode-description-container a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.episode-description-container a:hover {
    border-bottom-color: currentColor;
}

/* Blockquotes */
.episode-description-container blockquote {
    margin: 1.5em 0;
    padding: 0.5em 1em;
    border-left: 4px solid var(--border-color);
    background: var(--blockquote-bg);
    font-style: italic;
}

/* Code blocks */
.episode-description-container code {
    background: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.episode-description-container pre {
    background: var(--code-bg);
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.episode-description-container pre code {
    background: none;
    padding: 0;
}

/* Images */
.episode-description-container img {
    max-width: 100%;
    height: auto;
    margin: 1.5em 0;
    border-radius: 4px;
}

/* Tables */
.episode-description-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.episode-description-container th,
.episode-description-container td {
    padding: 0.75em;
    border: 1px solid var(--border-color);
    text-align: left;
}

.episode-description-container th {
    background: var(--table-header-bg);
    font-weight: 600;
}

/* Definition lists */
.episode-description-container dl {
    margin: 1.5em 0;
}

.episode-description-container dt {
    font-weight: 600;
    margin-top: 1em;
}

.episode-description-container dd {
    margin-left: 2em;
    margin-top: 0.5em;
}

/* Horizontal rules */
.episode-description-container hr {
    margin: 2em 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* Bold and italic */
.episode-description-container strong {
    font-weight: 600;
}

.episode-description-container em {
    font-style: italic;
}

/* Special spacing for specific element combinations */
.episode-description-container h2 + p,
.episode-description-container h3 + p,
.episode-description-container h4 + p {
    margin-top: 0.75em;
}

.episode-description-container ul + p,
.episode-description-container ol + p {
    margin-top: 1.5em;
}

/* CSS Variables for theming */
:root {
    --text-color: #333;
    --link-color: #0066cc;
    --border-color: #ddd;
    --blockquote-bg: #f8f8f8;
    --code-bg: #f5f5f5;
    --table-header-bg: #f5f5f5;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --link-color: #66b3ff;
        --border-color: #444;
        --blockquote-bg: #2a2a2a;
        --code-bg: #2a2a2a;
        --table-header-bg: #2a2a2a;
    }
}

.item_container-text.episode-description-container a {
    color: var(--link-color);
    /* Replace #yourColorCode with the color you want */
    text-decoration: none;
    /* Example property, adjust as needed */
}

.episode-layout-container {
    max-width: 960px;
    margin: 0 auto;
}

.episode-layout-container-shared {
    padding-top: 20px;
}

.item_container-text.episode-description-container a:hover {
    color: var(--hover-color);
    /* Replace #hoverColorCode with the color you want for hover state */
    text-decoration: underline;
    /* Example property, adjust as needed */
}

#login-page {
    background-image: url("./assets/backgrounds/2.jpg");
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-page-container {
    max-width: 1200px;
    /* Set the maximum width you desire */
    margin: 0 auto;
    /* This centers the div */
    padding: 0 40px;
}

.episode-image {
    width: 100%;
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    align-self: flex-start;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    /* Adjust breakpoint as needed */
    .episode-image {
        max-width: 100px;
        /* Smaller max width for smaller screens */
        max-height: 100px;
        /* Smaller max height for smaller screens */
        width: 100px;
        height: 100px;
    }
}

.playlist-modal-background {
    position: fixed;
    top: 5vh;
    right: 0;
    left: 0;
    bottom: 5vh;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: start;
    width: 100%;
    height: 90vh;
    background-color: rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    padding: 1rem;
}

.playlist-modal-container {
    position: relative;
    width: 100%;
    max-width: 42rem;
    background-color: var(--container-background);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.playlist-modal-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background-color: var(--secondary-background);
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    color: var(--text-color);
}

.playlist-modal-close {
    background-color: transparent;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: var(--text-color);
}

.playlist-modal-close:hover {
    background-color: var(--hover-color);
}

.playlist-modal-content {
    padding: 1.25rem;
    background-color: var(--container-background);
}

.playlist-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.playlist-input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.playlist-modal-input {
    width: 100%;
    padding: 0.625rem;
    background-color: var(--secondary-background);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-color);
}

.playlist-modal-input:focus {
    outline: none;
    border-color: var(--hover-color);
}

.playlist-filters-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.playlist-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playlist-checkbox-container input[type="checkbox"] {
    accent-color: var(--accent-color);
}

.playlist-duration-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.playlist-submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--button-color);
    color: var(--button-text-color);
    border-radius: 0.375rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: background-color 0.2s;
}

.playlist-submit-btn:hover:not(:disabled) {
    background-color: var(--hover-color);
}

.playlist-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.drawer-hr {
    border-color: var(--text-color);
}

.drawer-burger {
    background-color: var(--text-color);
}

.drawer-button {
    background-color: var(--button-color);
    color: var(--accent-color);
    /* Assuming you want white text */
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    /* Other button styles */
}

.drawer-icon {
    z-index: 49;
    position: fixed;
    top: 0;
    left: 10px;
    height: 56px;
    padding: 0 4px;
    color: var(--text-color);
    display: flex;
    align-items: center;
}
/* Scale down drawer icons to fit in 56px topbar */
.drawer-icon .ph { font-size: 24px !important; }
.drawer-icon .text-4xl { font-size: 24px !important; }
.drawer-icon .md\:text-4xl { font-size: 24px !important; }

.drawer-background {
    background-color: var(--secondary-background);
    position: fixed;
    /* Other background styles */
}

.drawer-text a {
    color: var(--text-color);
}

.drawer-text {
    color: var(--text-color);
}

/*body.no-scroll {*/
/*    overflow: hidden; !* Prevents scrolling when drawer is open *!*/
/*}*/

.error-snackbar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background-color: var(--error-color);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1000;
    /* Ensure it's above other elements */
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-snackbar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background-color: var(--standout-color);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1000;
    /* Ensure it's above other elements */
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    margin: 0 !important; /* Override any margins */
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove the space utilities that are causing the gap */
.modal-overlay {
    --tw-space-x-reverse: 0;
    margin-right: 0; /* Override the calc margin */
    margin-left: 0; /* Override the calc margin */
}

.modal-content {
    background-color: var(--background-color); /* Equivalent to bg-white */
    padding: 1.5rem; /* Equivalent to p-6 */
    border-radius: 0.5rem; /* Equivalent to rounded-lg */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); /* Equivalent to shadow-xl */
}

.spinner {
    width: 4rem; /* Equivalent to h-16 w-16 */
    height: 4rem;
    border-top: 2px solid var(--link-color); /* Equivalent to border-t-2 border-blue-500 */
    border-bottom: 2px solid var(--link-color); /* Equivalent to border-b-2 */
    border-radius: 50%; /* Equivalent to rounded-full */
    animation: spin 1s linear infinite; /* Equivalent to animate-spin */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.modal-title {
    font-size: 1.25rem; /* Equivalent to text-xl */
    font-weight: 600; /* Equivalent to font-semibold */
    color: var(--text-color);
}

.modal-subtitle {
    font-size: 0.875rem; /* Equivalent to text-sm */
    color: var(--text-color); /* Equivalent to text-gray-600 */
}

.empty-episodes-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 4rem; /* Adds spacing from the top */
    padding: 2rem; /* Adds some padding around the content */
    text-align: center;
}

.empty-episodes-container .logo {
    width: 96px; /* Fixed size for the logo */
    height: 96px;
    margin-bottom: 1.5rem; /* Spacing between logo and text */
}

.empty-episodes-container .page-paragraphs {
    max-width: 600px; /* Constrains text width for better readability */
    margin: 0.75rem 0; /* Vertical spacing between text elements */
}

.empty-episodes-container h1.page-paragraphs {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-episodes-container p.page-paragraphs {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color-secondary, #666);
}

.episodes-container {
    padding-top: 80px;
    /* Adjust the value to the height of your search bar */
}

.center-text {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo {
    max-width: 100px;
    /* Adjust size as needed */
    margin-bottom: 20px;
}

.search-bar-container {
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 10px 20px;
    background-color: var(--secondary-background);
    /* Adjust the color as needed */
    position: fixed;
    /* Fix the position relative to the viewport */
    top: 0;
    /* Align to the top of the viewport */
    left: 0;
    /* Align to the left of the viewport */
    right: 0;
    /* Ensure it extends to the right of the viewport */
    z-index: 49;
    /* Make sure it stays on top of other content */
}

/* Category UI styles */
.category-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 6rem;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.category-input:focus {
    outline: none;
    border-color: var(--hover-color);
    box-shadow: 0 0 0 2px rgba(var(--link-color-rgb), 0.2);
}

.category-input::placeholder {
    color: var(--text-secondary-color);
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--secondary-background);
    color: var(--text-color);
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.category-tag:hover {
    background-color: var(--hover-background);
}

.category-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem; /* 40px touch target */
    min-height: 2.5rem; /* 40px touch target */
    margin: -0.5rem -0.75rem -0.5rem 0; /* Negative margin to maintain visual spacing */
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.category-remove-btn:hover {
    background-color: var(--destructive-color);
    color: var(--destructive-text);
}

.category-add-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.5rem; /* Consistent height */
    padding: 0 1rem;
    background-color: var(--primary-color);
    color: var(--primary-text);
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

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

/* Mobile optimizations */
@media (max-width: 640px) {
    .category-add-btn {
        padding: 0;
        width: 2.5rem;
        justify-content: center;
    }
}

.search-input,
.search-btn {
    box-sizing: border-box;
    line-height: normal;
}

.search-input-dropdown-border {
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
}


.search-input {
    padding: 5px 10px;
    background-color: var(--background-color);
    border-radius: 4px;
    color: var(--text-color);
    outline: none;
    border: none;
}

.search-input:focus {
    border-color: var(--hover-color);
    ring-color: var(--link-color);
}

.search-input::placeholder {
    color: var(--text-secondary-color);
}

.search-source {
    padding: 5px 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Search component styles */
.search-btn {
    background-color: transparent;
    color: var(--text-color);
    border-color: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover, .search-btn:focus {
    transform: scale(1.05);
}

.search-button:focus {
    outline-color: var(--hover-color);
    ring-color: var(--link-color);
}

/* Enhanced styling for the mobile dropdown */
.search-drop-solid {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 10;
    background-color: var(--accent-color);
    padding: 16px;
    margin-bottom: 10px;
    /* More pronounced shadow for depth */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    /* Rounded corners for modern look */
    border-radius: 12px;
    /* Subtle border */
    border: 1px solid var(--border-color);
    /* Add glass-like effect with slight opacity if supported */
    background-color: var(--secondary-background);
}

/* Animation for showing and hiding dropdown */
.dropdown-visible {
    animation: dropdownFadeIn 0.3s ease-out forwards;
    transform-origin: top center;
}

.dropdown-hiding {
    animation: dropdownFadeOut 0.3s ease-in forwards;
    transform-origin: top center;
}

@keyframes dropdownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes dropdownFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

/* Enhancing the styling for the buttons in dropdown */
.search-drop-button {
    color: var(--text-color);
    margin-right: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: var(--button-color);
    border: 1px solid var(--border-color);
}

.search-drop-button:hover {
    background-color: var(--container-button-color);
    transform: translateY(-2px);
}

.search-drop-button.active {
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Input styling within dropdown */
.search-drop-solid .search-input {
    border-radius: 8px;
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.2s ease;
    padding: 10px 12px;
}

.search-drop-solid .search-input:focus {
    background-color: var(--container-background);
    border-color: var(--hover-color);
    box-shadow: 0 0 0 2px var(--hover-color);
    outline: none;
}

/* Search button styling within dropdown */
.search-drop-solid .search-btn {
    width: 100%;
    background-color: var(--hover-color);
    color: var(--text-color);
    font-weight: 600;
    border-radius: 8px;
    padding: 10px;
    margin-top: 4px;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-drop-solid .search-btn:hover,
.search-drop-solid .search-btn:focus {
    background-color: var(--link-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.search-drop-solid .search-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Add this to your CSS */
.relative.inline-flex {
    display: flex;
    align-items: center;
}

/* styles.css */
.shorter-input {
    max-width: 88%;
    margin-bottom: 1px;
}

/* Additional mobile styling */
@media (max-width: 768px) {
    .search-drop-solid {
        width: 100%;
        max-width: 300px;
        right: 0;
    }

    /* Ensure the buttons are properly spaced */
    .search-drop-button:last-child {
        margin-right: 0;
    }

    /* Make the icons stand out more */
    .search-drop-button img {
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
        transition: all 0.2s ease;
    }

    .search-drop-button:hover img,
    .search-drop-button.active img {
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
        transform: scale(1.1);
    }
}

/* Add this to your CSS */
.relative.inline-flex {
    display: flex;
    align-items: center;
}

/* styles.css */
.shorter-input {
    max-width: 88%;
    margin-bottom: 1px;
}

/* Additional mobile styling */
@media (max-width: 768px) {
    .search-drop-solid {
        width: 100%;
        max-width: 300px;
        right: 0;
    }

    /* Ensure the buttons are properly spaced */
    .search-drop-button:last-child {
        margin-right: 0;
    }

    /* Make the icons stand out more */
    .search-drop-button img {
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
        transition: all 0.2s ease;
    }

    .search-drop-button:hover img,
    .search-drop-button.active img {
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
        transform: scale(1.1);
    }
}

/* Enhancing the styling for the buttons in dropdown */
.search-drop-button {
    color: var(--text-color);
    margin-right: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.search-drop-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.search-drop-button.active {
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Input styling within dropdown */
.search-drop-solid .search-input {
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transition: all 0.2s ease;
    padding: 10px 12px;
}

.search-drop-solid .search-input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(var(--hover-color-rgb, 0, 120, 212), 0.25);
}

/* Search button styling within dropdown */
.search-drop-solid .search-btn {
    width: 100%;
    background-color: var(--hover-color, #0078d4);
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px;
    margin-top: 4px;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-drop-solid .search-btn:hover,
.search-drop-solid .search-btn:focus {
    background-color: var(--active-color, #106ebe);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.search-drop-solid .search-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Add this to your CSS */
.relative.inline-flex {
    display: flex;
    align-items: center;
}

/* styles.css */
.shorter-input {
    max-width: 88%;
    margin-bottom: 1px;
}

/* Additional mobile styling */
@media (max-width: 768px) {
    .search-drop-solid {
        width: 100%;
        max-width: 300px;
        right: 0;
    }

    /* Ensure the buttons are properly spaced */
    .search-drop-button:last-child {
        margin-right: 0;
    }

    /* Make the icons stand out more */
    .search-drop-button img {
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
        transition: all 0.2s ease;
    }

    .search-drop-button:hover img,
    .search-drop-button.active img {
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
        transform: scale(1.1);
    }
}

/* Enhancing the styling for the buttons in dropdown */
.search-drop-button {
    color: var(--text-color);
    margin-right: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

.search-drop-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.search-drop-button.active {
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Input styling within dropdown */
.search-drop-solid .search-input {
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transition: all 0.2s ease;
    padding: 10px 12px;
}

.search-drop-solid .search-input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(var(--hover-color-rgb, 0, 120, 212), 0.25);
}

/* Search button styling within dropdown */
.search-drop-solid .search-btn {
    width: 100%;
    background-color: var(--hover-color, #0078d4);
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px;
    margin-top: 4px;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-drop-solid .search-btn:hover,
.search-drop-solid .search-btn:focus {
    background-color: var(--active-color, #106ebe);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.search-drop-solid .search-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Add this to your CSS */
.relative.inline-flex {
    display: flex;
    align-items: center;
}

/* styles.css */
.shorter-input {
    max-width: 88%;
    margin-bottom: 1px;
}

/* Additional mobile styling */
@media (max-width: 768px) {
    .search-drop-solid {
        width: 100%;
        max-width: 300px;
        right: 0;
    }

    /* Ensure the buttons are properly spaced */
    .search-drop-button:last-child {
        margin-right: 0;
    }

    /* Make the icons stand out more */
    .search-drop-button img {
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
        transition: all 0.2s ease;
    }

    .search-drop-button:hover img,
    .search-drop-button.active img {
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
        transform: scale(1.1);
    }
}

.no-margin {
    margin-top: 0 !important;
}

.no-padding {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.chapter-select-modal {
    z-index: 1000;
}

.chapter-progress-container {
    width: 100%;
    height: 2px;
    background-color: rgba(128, 128, 128, 0.2);
    margin-top: 8px;
    border-radius: 1px;
    overflow: hidden;
}

.chapter-progress-bar {
    height: 100%;
    background: var(--prog-bar-color);
    transition: width 0.1s linear;
}

.current-chapter {
    background-color: var(--hover-color);
}

.chapter-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.modal-container {
    background-color: var(--container-background);
    border-color: var(--border-color);
    color: var(--text-color);
    border-radius: 10px;
}

.chapter-item {
    display: flex;
    align-items: flex-start; /* Change from center to flex-start to prevent squishing */
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    background-color: var(--container-background);
    transition: all 0.2s ease;
    cursor: pointer; /* Add cursor pointer since whole item is clickable */
}

.chapter-item:hover {
    background-color: var(--hover-color);
    transform: translateX(4px);
}

.chapter-play-button {
    flex-shrink: 0; /* Prevent button from shrinking */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-width: 2.5rem; /* Add min-width to prevent shrinking */
    height: 2.5rem;
    min-height: 2.5rem; /* Add min-height to prevent shrinking */
    border-radius: 50%;
    background-color: var(--button-color);
    margin-right: 1rem;
    transition: all 0.2s ease;
}

.chapter-play-button:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.chapter-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.chapter-title {
    font-weight: 500;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2em; /* Add line height for better spacing */
    max-height: 2.4em; /* 2 lines × 1.2em line height */
}

.chapter-time {
    font-size: 0.875rem;
    color: var(--text-secondary-color);
}

input[type="range"] {
    accent-color: var(--prog-bar-color); /* Controls the filled part */
    background: var(--unfilled-color); /* Controls the unfilled part */
}

input[type="range"]::-webkit-slider-thumb {
    background-color: var(--thumb-color) !important; /* Controls thumb color */
    /* rest of your existing thumb styles */
}

input[type="range"]::-moz-range-thumb {
    background-color: var(--thumb-color) !important; /* Controls thumb color */
    /* rest of your existing thumb styles */
}

.title {
    color: var(--text-color) !important;
}

.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* Initial height */
    background-color: var(--secondary-background);
    display: flex;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    z-index: 500;
    /* Ensure it's on top */

    /* Animate the height */
    transition: height 0.5s ease-in-out;
}

.audio-player .line-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 1;
    visibility: visible;
    width: 100%;
}

.audio-player.expanded .line-content {
    opacity: 0;
    visibility: hidden;
}

.audio-player .top-section {
    opacity: 0;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.audio-player.expanded .top-section {
    opacity: 1;
    visibility: visible;
}

.audio-player .line-content .left-group {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
}

.audio-player .line-content .right-group {
    display: flex;
    align-items: center;
}

.audio-player .line-content .title {
    margin-right: 10px;
}

/* .audio-player .line-content,
.audio-player .line-content .right-group {
    width: 100%;
} */

.audio-player .line-content .ml-auto {
    display: flex;
    align-items: center;
}

.audio-player .line-content {
    padding: 10px 20px;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        visibility: hidden;
    }

    to {
        opacity: 1;
        visibility: visible;
    }
}

.playback-speed-display {
    position: relative;
    width: 100%;
    padding: 10px 0;
}

.speed-text {
    position: absolute;
    left: 215px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: var(--text-color);
}

.slider {
    width: 100%;
    display: block;
    margin: auto;
}

@media (max-width: 768px) {
    .speed-text {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        text-align: center;
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .speed-display-container {
        flex-direction: column-reverse;
        align-items: center;
    }
}

.playback-speed-display {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }

    to {
        opacity: 0;
        visibility: hidden;
    }
}

.playback-speed-display.hidden {
    animation: fadeOut 0.3s ease-out forwards;
}

.playback-speed-display.visible {
    animation-name: fadeIn;
    /* Only change the animation name to trigger it */
}

.audio-player .line-content .right-group {
    justify-content: flex-end;
    padding-right: 5px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Seek bar container for minimized player */
.audio-player .line-content .seek-bar-container {
    flex: 1;
    max-width: 50%;
    min-width: 200px;
    margin-left: 16px;
}

/* Better responsive title sizing - dynamic space allocation */
.audio-player .line-content .title {
    flex: 1 1 auto;
    min-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 24px;
    max-width: calc(100vw - 400px); /* Reserve space for controls */
}

/* Responsive breakpoints - dynamic space allocation */
@media (min-width: 768px) {
    .audio-player .line-content .title {
        max-width: calc(100vw - 350px);
    }
}

@media (min-width: 1200px) {
    .audio-player .line-content .seek-bar-container {
        max-width: 45%;
    }
    .audio-player .line-content .title {
        max-width: calc(100vw - 320px);
    }
}

@media (min-width: 1600px) {
    .audio-player .line-content .seek-bar-container {
        max-width: 50%;
    }
    .audio-player .line-content .title {
        max-width: calc(100vw - 300px);
    }
}

@media (min-width: 2000px) {
    .audio-player .line-content .seek-bar-container {
        max-width: 55%;
    }
    .audio-player .line-content .title {
        max-width: calc(100vw - 280px);
    }
}

@media (max-width: 640px) {
    .audio-player .line-content .right-group {
        padding-right: 0;
    }
}

.audio-player.expanded {
    height: 100vh;
    /* Full viewport height when expanded */
    bottom: 0;
    /* Keep at bottom */
    align-items: center;
    justify-content: space-between;
}

.audio-player-line {
    /* Add these properties here */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.audio-player .top-section,
.audio-player .line-content {
    transition: opacity 0.5s linear;
    position: absolute;
    width: 100%;
}

.audio-player .top-section .retract-button {
    position: absolute;
    top: 25px;
    /* Adjust as needed */
    left: 45px;
    /* Adjust as needed */
    border: none;
    /* Remove the border */
    background: none;
    /* Remove the background */
    padding: 0;
    /* Remove the padding */
    cursor: pointer;
    /* Cursor as pointer */
    font-size: 48px;
}

.audio-player .top-section .retract-button {
    font-size: 48px;
    /* Adjust as needed */
}

.audio-player .top-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.audio-image-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.audio-image-container img {
    border-radius: 8px;  /* Adding rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    cursor: pointer;
}

.audio-image-container img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.audio-player.expanded .line-content,
.audio-player.expanded .top-section {
    transition:
        visibility 0s 0.5s,
        opacity 0.5s linear;
}

.audio-player button {
    background-color: transparent;
    /* Button background color */
    padding: 10px 15px;
    /* Padding inside the button */
    margin-right: 20px;
    /* Margin to the right */
    cursor: pointer;
    /* Cursor as pointer */
    border-radius: 5px;
    /* Rounded corners */
}

.audio-player .line-content .title {
    text-align: left;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-basis: 90%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: pointer;
}

/* Mobile/tablet progress bar container */
.audio-player .mobile-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(128, 128, 128, 0.2);
    overflow: hidden;
}

.audio-player .mobile-progress-bar {
    height: 100%;
    background: var(--prog-bar-color);
    transition: width 0.1s linear;
}

/* Hide on desktop */
@media (min-width: 769px) {
    .audio-player .mobile-progress-container {
        display: none;
    }
}

/* Adjust padding for mobile/tablet */
@media (max-width: 768px) {
    .audio-player .line-content {
        padding-top: 12px;
    }
}

.audio-player .top-section {
    display: flex;
    justify-content: center;
}

.audio-player .top-section .title {
    text-align: center;
    margin: 20px 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: pointer;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 40px);
    font-size: 1em; /* Default for mobile */
}

@media (min-width: 768px) {
    .audio-player .top-section .title {
        font-size: 1.5em;
    }
}

.audio-player .top-section .scrub-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 20px;
    font-size: 0.9em;
    margin: 10px auto;
    gap: 10px; /* Use gap instead of margins for better spacing */
}

.audio-player .top-section .scrub-bar span {
    flex-shrink: 0;
    color: var(--text-color);
    min-width: 65px; /* Ensure consistent width for time displays */
    text-align: center;
}

.audio-player .top-section .scrub-bar input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent; /* Remove default background */
    height: 4px;
    cursor: pointer;
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default padding */
}

/* Thumb styles */
.audio-player
    .top-section
    .scrub-bar
    input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #1db954;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px; /* Centers the thumb on the track */
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

.audio-player .top-section .scrub-bar input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #1db954;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

/* Track styles */
.audio-player
    .top-section
    .scrub-bar
    input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--prog-bar-color);
    border: none;
}

.audio-player .top-section .scrub-bar input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--prog-bar-color);
    border: none;
}

/* Hover effects */
.audio-player
    .top-section
    .scrub-bar
    input[type="range"]:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

.audio-player
    .top-section
    .scrub-bar
    input[type="range"]:hover::-moz-range-thumb {
    transform: scale(1.2);
}

/* Active state */
.audio-player
    .top-section
    .scrub-bar
    input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.1);
    background: #1ed760;
}

.audio-player
    .top-section
    .scrub-bar
    input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.1);
    background: #1ed760;
}

/* Container wrapper for better touch targets */
.scrub-bar-wrapper {
    position: relative;
    padding: 10px 0;
    flex-grow: 1;
}

/* Remove focus outline but keep it accessible */
.audio-player .top-section .scrub-bar input[type="range"]:focus {
    outline: none;
}

.audio-player
    .top-section
    .scrub-bar
    input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
}

.audio-player
    .top-section
    .scrub-bar
    input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
}

.lower-scrub input[type="range"].flex-grow {
    -webkit-appearance: none;
    /* Necessary to remove default styling in WebKit browsers */
    width: 100%;
    height: 5px;
    /* Adjust the height of the slider track */
    /* background: var(--prog-bar-color, #ddd); Default background color */
    cursor: pointer;
    outline: none;
}

/* Track styles for WebKit browsers */
.lower-scrub input[type="range"].flex-grow::-webkit-slider-runnable-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    animate: 0.2s;
    background: linear-gradient(
        to right,
        var(--link-color, #000) 50%,
        var(--prog-bar-color, #ddd) 50%
    );
}

/* Since Firefox does not support styling the filled part directly,
   we only set the overall track appearance */
.lower-scrub input[type="range"].flex-grow::-moz-range-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    background: var(--prog-bar-color, #ddd);
}

.search-bar-input {
    background-color: var(--container-background);
    color: var(--text-color);
    border-color: var(--border-color);
}

.search-bar-input::placeholder {
    color: var(--text-secondary-color);
    opacity: 0.6;
}

.search-bar-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(var(--accent-color), 0.15);
}

.search-input::placeholder {
    color: var(--text-color);
}

.search-page-button {
    background-color: var(--button-color);
    color: var(--button-text-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-page-button:hover {
    background-color: var(--hover-color);
}

.audio-player span {
    text-align: left;
    /* Align text to the left */
    color: var(--text-color);
}

.audio-player .top-section img {
    max-width: 100%;
    /* Ensure the image doesn't exceed its container */
    height: auto;
    /* Maintain aspect ratio */
    border-radius: 1;
    /* Remove the rounded effect */
}

/* Small screens */
@media (max-width: 600px) {
    .audio-player .top-section img {
        width: 50vw;
        /* 50% of the viewport width */
    }
}

/* Medium screens */
@media (min-width: 601px) and (max-width: 1024px) {
    .audio-player .top-section img {
        width: 40vw;
        /* 40% of the viewport width */
    }
}

/* Large screens */
@media (min-width: 1025px) {
    .audio-player .top-section img {
        width: 30vw;
        /* 30% of the viewport width */
    }
}

.top-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    height: 100vh;
    background: var(--background-color);
}

.audio-player .artwork {
    width: 40px;
    /* Adjust as needed */
    height: 40px;
    /* Adjust as needed */
    border-radius: 50%;
    /* Make the image a circle */
    object-fit: cover;
    /* Resize the image to cover the element */
    margin-right: 10px;
    /* Add some space to the right of the image */
}

.artwork.playing {
    animation: spin 3s linear infinite;
}

.episode-description-container a {
    color: blue;
    /* or any color you prefer */
    text-decoration: underline;
}

.page_header {
    color: var(--text-color);
}

.page-paragraphs {
    color: var(--text-color);
}

.page-subtitles {
    color: var(--text-color);
    font-size: 1.9rem;
}

.header-text {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-color);
}

.item-header {
    display: flex;
    align-items: start;
    /* Ensure items are centered vertically */
    background-color: var(--bonus-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-header-cover {
    flex-shrink: 0;
    /* Prevent the image from shrinking */
    flex-basis: 25%;
    /* Set a base width */
    min-width: 150px;
    /* Prevent the image from becoming too small */
    object-fit: cover;
    border-radius: 5px;
    margin-right: 20px;
    height: auto;
    /* Adjust height automatically */
}

.header-add-button-container {
    display: flex;
    /* Use flexbox to center the button */
    justify-content: center;
    /* Center button horizontally */
    width: 100%;
    /* Take the full width of its parent */
    padding: 10px 0;
    /* Optional: Add some vertical padding */
    width: 150px;
    /* Fixed width for the button */
}

.header-add-button {
    display: flex;
    /* Use flexbox to center the button */
    justify-content: center;
    /* Center button horizontally */
    width: 100%;
    /* Take the full width of its parent */
    padding: 10px 0;
    /* Optional: Add some vertical padding */
    width: 150px;
    /* Fixed width for the button */
}

.item-header-info {
    flex-grow: 1;
    min-width: 0;
}

.item-header-title {
    font-size: 1.5em;
    /* Larger title size */
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
    margin-right: 20px;
    /* Adds space between title and button */
}

.title-button-container {
    display: flex;
    align-items: center;
    width: 100%;
    /* Ensures the container takes full width */
}

.item-header-description {
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 15px;
}

.item-header-button {
    color: var(--text-color);
    background-color: var(--button-color);
    margin: 15px;
}

.large-card-button {
    color: var(--text-color);
    background-color: var(--button-color);
    margin: 15px;
}

.large-card-button:hover {
    background-color: var(--hover-color);
}

.large-card-button:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--border-color);
}

.category-box {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--bonus-color);
    padding: 5px 10px;
    margin: 5px;
    border-radius: 4px;
    /* Slightly rounded corners */
    font-size: 0.8em;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-color);
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-out;
}

.download-button:hover {
    background-color: var(--hover-color);
}

.save-button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-color);
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-out;
}

.save-button:hover {
    background-color: var(--hover-color);
}

.filter-button {
    color: var(--button-text-color);
    background-color: var(--button-color);
    border-color: var(--border-color);
}
.filter-input {
    background-color: var(--button-color);
    color: var(--button-text-color);
    padding: 0.7rem;
    margin-bottom: 9px;
    font-size: 1rem;
    border-radius: 0.5rem; /* Rounded corners */
    border: none;
    width: 157px;
}
.filter-input-pods {
    background-color: var(--button-color);
    color: var(--button-text-color);
    padding: 0.7rem;
    font-size: 1rem;
    border-radius: 0.5rem; /* Rounded corners */
    border: none;
    width: 157px;
}
@media (max-width: 530px) {
    .filter-input {
        width: 100px;
    }
}
@media (max-width: 530px) {
    .filter-input-pods {
        width: 100px;
    }
}
.filter-input::placeholder {
    color: var(--button-text-color);
    opacity: 0.7;
}
.filter-input-pods::placeholder {
    color: var(--button-text-color);
    opacity: 0.7;
}
.filter-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--button-color), 0.5);
}
.filter-input-pods:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--button-color), 0.5);
}

.filter-dropdown-pods select {
    background-color: var(--button-color); /* Semi-transparent background */
    color: var(--button-text-color);
    padding: 0.7rem;
    margin-bottom: 9px;
    font-size: 1rem;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: 98%;
    background-position-y: 50%;
    cursor: pointer;
    padding-right: 2rem; /* Increase right padding to prevent text overlap with arrow */
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23FFFFFF' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-position: right 0.5rem center; /* Move arrow slightly more to the right */
    background-repeat: no-repeat;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important; /* Standard */
    text-indent: 1px;
    text-overflow: "";
    padding-right: 2rem;
    padding: 0.5rem 2rem 0.5rem 0.5rem; /* Adjusted padding to match py-2 px-2 */
    line-height: 1.8rem;
}

.filter-dropdown select {
    background-color: var(--button-color); /* Semi-transparent background */
    color: var(--button-text-color);
    padding: 0.7rem;
    margin-bottom: 9px;
    font-size: 1rem;
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: 98%;
    background-position-y: 50%;
    cursor: pointer;
    padding-right: 2rem; /* Increase right padding to prevent text overlap with arrow */
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23FFFFFF' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-position: right 0.5rem center; /* Move arrow slightly more to the right */
    background-repeat: no-repeat;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important; /* Standard */
    text-indent: 1px;
    text-overflow: "";
    padding-right: 2rem;
    padding: 0.5rem 2rem 0.5rem 0.5rem; /* Adjusted padding to match py-2 px-2 */
    margin-bottom: 0; /* Remove margin-bottom if it's causing extra space */
    line-height: 2.5rem;
}

.filter-dropdown select::-ms-expand {
    display: none;
}

.filter-dropdown-pods select::-ms-expand {
    display: none;
}

.filter-dropdown select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--button-color), 0.5);
}

.filter-dropdown-pods select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--button-color), 0.5);
}

/* Style for when dropdown is open */
.filter-dropdown select:active {
    background-color: var(--hover-color);
}

.filter-dropdown-pods select:active {
    background-color: var(--hover-color);
}

/* Style for the options in the dropdown */
.filter-dropdown select option {
    background-color: var(--button-color); /* Light grey background */
    color: var(--text-color, #333); /* Dark grey text */
    padding: 10px;
}

.filter-dropdown-pods select option {
    background-color: var(--button-color); /* Light grey background */
    color: var(--text-color, #333); /* Dark grey text */
    padding: 10px;
}

/* Style for the hover state of options */
.filter-dropdown select option:hover,
.filter-dropdown select option:focus {
    background-color: var(
        --dropdown-hover-bg-color,
        #e0e0e0
    ); /* Slightly darker on hover */
    color: var(--dropdown-hover-text-color, #000); /* Black text on hover */
}

.filter-dropdown-pods select option:hover,
.filter-dropdown-pods select option:focus {
    background-color: var(
        --dropdown-hover-bg-color,
        #e0e0e0
    ); /* Slightly darker on hover */
    color: var(--dropdown-hover-text-color, #000); /* Black text on hover */
}

/* Style for the selected option */
.filter-dropdown select option:checked {
    background-color: var(
        --dropdown-selected-bg-color,
        #d0d0d0
    ); /* Even darker for selected */
    color: var(
        --dropdown-selected-text-color,
        #000
    ); /* Black text for selected */
}

.filter-dropdown-pods select option:checked {
    background-color: var(
        --dropdown-selected-bg-color,
        #d0d0d0
    ); /* Even darker for selected */
    color: var(
        --dropdown-selected-text-color,
        #000
    ); /* Black text for selected */
}

.input-black {
    color: black; /* Set the text color to white to make it readable */
    border-color: var(--border-color); /* Maintain consistent border styling */
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-color);
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-out;
    width: auto;
}

.share-button:hover {
    background-color: var(--hover-color);
}

.share-button-mobile {
    display: block; /* Makes the button block-level to use margin auto */
    margin-left: auto; /* Centers the button horizontally */
    margin-right: auto; /* Centers the button horizontally */
}

.text-primary {
    color: var(--accent-color);
}

.checked\:bg-primary:checked {
    background-color: var(--accent-color);
}

.checked\:border-primary:checked {
    border-color: var(--accent-color);
}

/* Customize the focus ring */
.focus\:ring-primary:focus {
    --tw-ring-color: var(--accent-color);
    --tw-ring-opacity: 0.2;
}

.share:hover {
    background-color: var(--hover-color);
}

.bg-container-background {
    background-color: var(--secondary-background);
    border-color: var(--border-color);
    color: var(--text-color);
}

.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    max-width: 100%;
}

.podcast-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    cursor: pointer;
}

.touch-none {
    touch-action: none;
}

.podcast-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.podcast-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* This creates a 1:1 aspect ratio */
    overflow: hidden;
}

.podcast-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.podcast-grid-item:hover .podcast-image {
    transform: scale(1.1);
}

.podcast-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.podcast-grid-item:hover .podcast-info {
    opacity: 1;
}

.podcast-title-grid {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile screens (3 columns) */
@media (max-width: 768px) {
    .podcast-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0.5rem;
    }
    .podcast-title-grid {
        font-size: 0.75rem;
    }
}

/* Medium screens (4 columns) */
@media (min-width: 769px) and (max-width: 1200px) {
    .podcast-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large screens (5 columns) */
@media (min-width: 1201px) and (max-width: 1600px) {
    .podcast-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Extra-large screens (6 columns max) */
@media (min-width: 1601px) {
    .podcast-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 1800px;
        margin: 0 auto;
    }
}

.import-box {
    background-color: var(--container-background);
    border-color: var(--border-color);
    color: var(--text-color);
    padding: 20px;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.import-list {
    display: flex;
    align-items: center;
    /* Aligns items vertically in the center */
    gap: 8px;
}

.link {
    color: var(--link-color);
    text-decoration: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color); /* Solid background instead of transparent */
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 32rem;
    margin: auto;
    max-height: min(95vh, 50rem);
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto; /* Enable scrolling in the body */
    flex: 1;
}

/* Ensure the header stays fixed */
.modal-header {
    position: sticky;
    top: 0;
    background-color: var(--container-background);
    border-bottom: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
}

.modal-form-group {
    margin-bottom: 1.5rem;
}

.modal-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modal-select {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-color);
}

.modal-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.modal-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background-color: var(--button-color);
    color: var(--button-text-color);
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease-out;
}

.modal-button:hover {
    background-color: var(--hover-color);
    color: var(--button-text-color);
}

.modal-welcome {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary-color);
    margin-bottom: 1.5rem;
}

.modal-container {
    background-color: var(--container-background);
    border-color: var(--border-color);
    color: var(--text-color);
    border-radius: 10px;
}

.playlist-modal-background {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.playlist-modal-container {
    position: relative;
    padding: 1rem;
    width: 100%;
    max-width: 42rem;
    max-height: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.playlist-modal-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    background-color: var(--secondary-background);
}

.playlist-modal-close {
    position: absolute;
    right: 0.75rem;
    color: var(--text-color-secondary);
    background: transparent;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.playlist-modal-close:hover {
    background-color: var(--hover-color);
}

.playlist-modal-content {
    padding: 1rem 1.5rem;
    overflow-y: auto;
}

.playlist-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.playlist-input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.playlist-modal-input {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--input-background);
}

.playlist-error-text {
    color: var(--error-color);
    font-size: 0.75rem;
    font-style: italic;
}

.playlist-submit-btn {
    width: 100%;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: 0.375rem;
    background: var(--primary-color);
    transition: all 0.2s;
}

.playlist-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playlist-duration-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.mfa-code-box {
    background-color: var(--bonus-color);
    /* Replace with your desired color */
    color: var(--text-color);
    /* Replace with your desired color */
}

.desc-expanded {
    max-height: none;
    overflow: visible;
}

.desc-collapsed {
    max-height: 50px;
    /* or whatever max height you determine */
    overflow: hidden;
    text-overflow: ellipsis;
}

.desc-pod-collapsed {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* Limit to 3 lines initially */
    -webkit-box-orient: vertical;
}

.desc-pod-expanded {
    display: block;
}

.item-container {
    background-color: var(--container-background);
    border-color: var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Add this line */
    overflow: visible;
    transition: transform 0.1s ease;
}

.align-top-cover {
    align-self: flex-start;
}

.button-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    /* Centers button horizontally */
    line-height: 1;
}

@media (max-width: 768px) {
    /* Adjust breakpoint as needed */
    /* Styling for the button container */
    .button-container {
        display: flex;
        flex-basis: 15%;
        /* Adjust this percentage based on your design needs */
        flex-grow: 0;
        flex-shrink: 0;
        flex-direction: column;
        align-items: center;
        /* Center align the buttons vertically */
        justify-content: center;
        /* Center align the buttons horizontally */
        padding: 8px;
        gap: 8px;
        /* Space between buttons */
    }

    .button-container button {
        width: 60px;
        /* Fixed width */
        height: 60px;
        /* Fixed height */
        border-radius: 30px;
        /* Fully rounded borders */
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        /* Remove border */
    }
}

.episode-button-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
    /* Centers button horizontally */
    line-height: 1;
}

@media (max-width: 768px) {
    /* Adjust breakpoint as needed */
    /* Styling for the button container */
    .episode-button-container {
        display: flex;
        flex-basis: 15%;
        /* Adjust this percentage based on your design needs */
        flex-grow: 0;
        flex-shrink: 0;
        align-items: center;
        /* Center align the buttons vertically */
        justify-content: center;
        /* Center align the buttons horizontally */
        padding: 8px;
        gap: 8px;
        /* Space between buttons */
    }

    .episode-button-container button {
        border-radius: 30px;
        /* Fully rounded borders */
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        /* Remove border */
    }
}

.item-container img {
    width: 100%;
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    align-self: flex-start;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    /* Adjust breakpoint as needed */
    .item-container img {
        max-width: 125px;
        /* Smaller max width for smaller screens */
        max-height: 125px;
        /* Smaller max height for smaller screens */
        width: 125px;
        height: 125px;
    }
}

@media (max-width: 530px) {
    /* Adjust breakpoint as needed */
    .item-container img {
        max-width: 100px;
        /* Smaller max width for smaller screens */
        max-height: 100px;
        /* Smaller max height for smaller screens */
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 530px) {
    .show-on-large {
        display: none;
    }
}

@media (min-width: 531px) {
    .show-on-large {
        display: block;
    }
}

/* Base styles */
.item-container-text {
    font-size: 1.25rem;
    /* example base size */
}

.item-description-text {
    font-size: 0.9rem;
    /* example base size */
}

@media (max-width: 530px) {
    .flex-col.space-y-2 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* Additional styles for better alignment and consistency */
.item-container {
    align-items: center;
    /* Align items vertically */
    justify-content: center;
    /* Center items horizontally */
}

.dragging {
    opacity: 0.5;
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
}

.sliding-rail-container {
    display: flex;
    overflow-x: scroll;
    scrollbar-width: none;
    /* Hide scrollbar in Firefox */
}

.sliding-rail-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar in WebKit browsers */
}

.sliding-rail-item {
    min-width: 100px;
    margin: 0 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    cursor: grab;
}

.item_container-text {
    color: var(--text-color);
}

.item_container-text.episode-title {
    font-size: 1rem;
    cursor: pointer;
    /* Base font size for larger screens */
}

@media (max-width: 768px) {
    /* Adjust breakpoint as needed */
    .item_container-text.episode-title {
        font-size: 1rem;
        /* Smaller font size for smaller screens */
    }
}

@media (max-width: 480px) {
    /* Further adjustment for even smaller screens if needed */
    .item_container-text.episode-title {
        font-size: 0.875rem;
        /* Even smaller font size for very small screens */
    }
}

.item-container-text-link {
    color: var(--standout-color);
    /*background-color: var(--accent-color);*/
    cursor: pointer;
}

.audio-top-button {
    color: var(--text-secondary-color);
    background-color: transparent;
}

@media (max-width: 768px) {
    .pronounce-mobile {
        width: 54px !important;
        height: 54px !important;
    }

    .pronounce-mobile .material-icons {
        font-size: 54px;
    }
}

.drag-handle {
    color: var(--text-secondary-color);
    background-color: var(--container-button-color);
    border-color: var(--text-secondary-color);
}

.drag-handle-wrapper {
    display: flex;
    align-items: center; /* Vertically centers the drag handle */
    height: 100%; /* Ensure it spans the full height of the parent */
}

.item-container-button {
    color: var(--text-secondary-color);
    background-color: var(--container-button-color);
    border-color: var(--text-secondary-color);
}

.search-border-bottom: 1px solid var(--border-color);
    background-color: var(--secondary-background);
    min-height: 180px;
}

.search-podcast-image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background-color: var(--secondary-background);
}

.search-podcast-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-podcast-image-container:hover img {
    transform: scale(1.05);
}

/* Force two columns on small screens */
@media (max-width: 639px) {
    .grid-cols-2 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .gap-4 {
        gap: 0.75rem !important;
    }

    .search-item-container h3 {
        font-size: 1rem;
    }

    .search-item-container .text-sm {
        font-size: 0.75rem;
    }

    .search-item-container button {
        width: 32px !important;
        height: 32px !important;
    }

    .search-item-container button i {
        font-size: 1.25rem;
    }
}

.podcast-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 12px 24px;
    width: 100%;
}

/* Better hover effects and card styling */
.search-item-container {
    display: flex;
    flex-direction: column;
    background-color: var(--container-background);
    border-color: var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    width: 100%;
}

.search-item-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Fix text colors */
.search-item-container .item_container-text {
    color: var(--text-color);
}

/* Line clamp utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.animate-spin {
    animation: spin 1s linear infinite;
}

/* Ensure grid styles always work */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Ensure images take full width and height */
.w-full {
    width: 100% !important;
}

.w-less-full {
    width: 100%;
}

.h-full {
    height: 100% !important;
}

.object-cover {
    object-fit: cover !important;
}

/* Fix aspect ratio */
[style*="aspect-ratio"] {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

[style*="aspect-ratio"] img,
[style*="aspect-ratio"] > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix for missing icons */
.ph {
    display: inline-block;
}

.ph-trash:before {
    content: "🗑️";
}

.ph-plus-circle:before {
    content: "➕";
}

.ph-spinner-gap:before {
    content: "⌛";
}

.ph-microphone:before {
    content: "🎙️";
}

.selector-button {
    background-color: var(--container-button-color);
    color: var(--button-text-color);
    transition: all 0.2s ease;
}

.selector-button:active {
    transform: scale(0.95);
}

/* Improved description styling */
.item-container .item_container-text {
    color: var(--text-color);
}

/* Line clamp utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-item-container {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .podcast-grid-container {
        gap: 10px;
        padding: 0 8px 16px;
    }

    .search-item-container {
        border-radius: 8px;
    }

    .search-item-container .p-4 {
        padding: 10px;
    }
}

.item-header-details {
    text-align: center;
    display: flex;
}

.item-header-pod {
    text-align: center;
    color: var(--text-color);
}

.episode-single-desc {
    overflow-y: auto;
    padding-bottom: calc(
        80px + 1rem
    ); /* Audio player height (typically around 80px) plus some padding */
    margin-bottom: 18px; /* Match the audio player height */
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .item-container-button {
        border: none;
        /* Remove border on small screens */
    }
}

@media (max-width: 768px) {
    .header-info {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px; /* Space between the elements */
        margin: 8px auto;
        max-width: 90%;
        flex-wrap: wrap; /* Allow wrapping on very small screens */
        text-align: center;
    }

    /* Remove the individual padding/margin from these elements since they're now handled by the container */
    .header-info .item-container-button,
    .header-info .scroll-container {
        padding: 0;
        margin: 0;
    }

    /* Make sure the dropdown content still works as expected */
    .scroll-container {
        position: relative; /* Ensure dropdown positioning works */
        white-space: nowrap;
        overflow: visible; /* Allow dropdown to overflow */
    }

    .item-header-pod {
        margin: 8px auto; /* Center the header */
        max-width: 90%; /* Don't stretch full width */
        border-radius: 12px;
        background: var(--button-background, rgba(0, 0, 0, 0.05));
        transition: all 0.2s ease;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background: var(--button-background, rgba(0, 0, 0, 0.05));
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        font-size: 1.2rem; /* Larger text */
        font-weight: 600;
    }

    .item-header-pod:active {
        transform: translateY(1px);
        background: var(--button-hover-background, rgba(0, 0, 0, 0.08));
    }

    /* Add subtle hover effect */
    .item-header-pod:hover {
        background: var(--button-hover-background, rgba(0, 0, 0, 0.08));
    }

    /* Add a subtle indicator that it's clickable */
    .item-header-pod::after {
        content: "›";
        font-size: 24px;
        opacity: 0.5;
        margin-left: 8px;
    }

    .mobile-layout .button-container {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    .mobile-layout .item-header-mobile-cover-container {
        display: flex;
        justify-content: center;
        /* Center horizontally */
        align-items: center;
        /* Center vertically */
        border-radius: 1.25rem;
    }

    .episode-title .material-icons {
        margin-left: 8px; /* Adjust spacing as needed */
    }

    .mobile-layout .item-header-mobile-cover {
        margin-top: 10px;
        flex-shrink: 0;
        /* Prevent the image from shrinking */
        flex-basis: 40%;
        /* Set a base width */
        min-width: 150px;
        /* Prevent the image from becoming too small */
        max-width: 250px;
        /* Prevent the image from becoming too large */
        object-fit: cover;
        border-radius: 5px;
        margin-right: 20px;
        height: auto;
        /* Adjust height automatically */
    }

    .categories-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        /* Center horizontally */
        align-items: center;
        /* Center vertically */
        padding-bottom: 10px;
    }

    .mobile-layout .category-box {
        padding-bottom: 10px;
    }

    .mobile-layout .item-header-title,
    .mobile-layout .item-header-description,
    .header-text {
        text-align: center;
        margin: 10px 0;
    }

    .mobile-layout .header-info {
        text-align: left;
        margin: 10px 0;
        padding-left: 4rem;
        font-weight: bold;
        margin-bottom: 5px;
        color: var(--text-color);
    }

    .mobile-layout .header-info-episode {
        text-align: center;
        margin: 10px 0;
        font-weight: bold;
        margin-bottom: 5px;
        color: var(--text-color);
    }

    .mobile-layout .button-row {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        background: var(--background-color);
        border-radius: 8px;
        padding: 4px;
    }

    .mobile-layout .button-row button {
        flex: 1;
        padding: 12px 8px;
        border-radius: 8px;
        transition: all 0.2s ease;
        background: var(--button-background, rgba(0, 0, 0, 0.05));
        border: none !important; /* Force remove any borders */
        outline: none !important; /* Remove outline as well */
    }

    .mobile-layout .episode-action-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 8px;
        background: transparent; /* Make container background transparent */
        border-radius: 12px;
        margin-top: 8px;
    }

    /* Remove the vertical lines between buttons */
    .button-row button:not(:last-child)::after {
        display: none;
    }

    /* Remove horizontal lines */
    .button-row::before,
    .button-row::after {
        display: none;
    }

    /* Add hover effects */
    .button-row button:hover {
        background: var(--button-hover-background, rgba(0, 0, 0, 0.1));
        transform: translateY(-1px);
    }

    .button-row button:active {
        transform: translateY(0px);
    }

    /* Specific button styles */
    .play-button {
        background: var(--button-color) !important;
        color: var(--button-text-color) !important;
    }

    .queue-button {
        background: var(--container-background) !important;
        color: var(--text-color) !important;
    }

    .save-button {
        background: var(--container-background) !important;
        color: var(--text-color) !important;
    }

    .download-button-ep {
        background: var(--container-background) !important;
        color: var(--text-color) !important;
    }

    /* Icon adjustments */
    .button-row button i {
        margin-right: 4px;
        vertical-align: middle;
    }

    .mobile-layout .item-header-description {
        padding: 0 20px;
    }

    .mobile-layout .icon-button {
        margin: 0 auto;
    }

    .mobile-layout .item-header-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* ── Mobile Episode Page (ep-mobile-*) ─────────────────────────────────── */
.ep-mobile-page {
    padding-bottom: calc(80px + 1rem);
}

.ep-mobile-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px 8px;
}

.ep-mobile-art {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

.ep-mobile-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-top: 2px;
}

.ep-mobile-podcast-name {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
    color: var(--text-color);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.ep-mobile-podcast-name:hover { opacity: 0.9; color: var(--link-color); }

.ep-mobile-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.ep-mobile-complete-badge {
    font-size: 1rem;
    color: #22c55e;
    vertical-align: middle;
    margin-left: 4px;
}

.ep-mobile-subinfo {
    font-size: 0.71rem;
    opacity: 0.5;
    color: var(--text-color);
    margin: 2px 0 0;
}

.ep-mobile-progress {
    padding: 2px 16px 6px;
}

/* Action icon bar */
.ep-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 10px 12px 14px;
    border-bottom: 1px solid rgba(128,128,128,.12);
}

.ep-mobile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--container-background);
    color: var(--text-color);
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.ep-mobile-action-btn i { font-size: 20px; pointer-events: none; }
.ep-mobile-action-btn:active { transform: scale(0.87); }

.ep-mobile-action-play {
    background: var(--button-color) !important;
    color: var(--button-text-color) !important;
    width: 54px;
    height: 54px;
}

.ep-mobile-action-play i { font-size: 24px; }

.ep-mobile-active {
    background: var(--standout-color) !important;
    color: var(--button-text-color) !important;
}

/* 2-button pre-subscribed state: center rather than spreading to edges */
.ep-mobile-actions.ep-mobile-actions-sparse {
    justify-content: center;
    gap: 2rem;
}

.ep-mobile-no-media {
    font-size: 0.85rem;
    opacity: 0.6;
    text-align: center;
    padding: 8px 0;
}

/* Section label */
.ep-mobile-section-label {
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.45;
    color: var(--text-color);
    margin: 0 0 8px;
}

/* Host strip */
.ep-mobile-hosts {
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(128,128,128,.12);
}

.ep-mobile-hosts-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ep-mobile-hosts-scroll::-webkit-scrollbar { display: none; }

.ep-mobile-no-hosts-msg {
    font-size: 0.85rem;
    color: var(--text-color);
    margin: 0;
}

.ep-mobile-no-hosts-link {
    color: var(--link-color);
    margin-left: 0.25em;
}

.ep-mobile-host-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    width: 62px;
}

.ep-mobile-host-chip:active { opacity: 0.65; }

.ep-mobile-host-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--container-background);
}

.ep-mobile-host-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 22px;
}

.ep-mobile-host-name {
    font-size: 0.68rem;
    color: var(--text-color);
    text-align: center;
    width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.ep-mobile-host-role {
    font-size: 0.6rem;
    opacity: 0.45;
    color: var(--text-color);
    text-align: center;
    text-transform: capitalize;
    line-height: 1;
}

/* Transcript row */
.ep-mobile-transcript {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(128,128,128,.12);
}

.ep-mobile-transcript-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--link-color);
    -webkit-tap-highlight-color: transparent;
}

.ep-mobile-transcript-btn:hover { opacity: 0.75; }
.ep-mobile-transcript-btn i { font-size: 16px; }

/* Description */
.ep-mobile-desc {
    padding: 12px 16px 0;
}

/* Podcast header on episode_layout — no bottom audio-player padding needed */
.ep-mobile-pod-header {
    padding-bottom: 4px;
}

/* Episode layout mobile extras */
.ep-mobile-desc-section {
    padding: 8px 16px 4px;
    border-bottom: 1px solid rgba(128,128,128,.12);
}

.ep-mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 16px 8px;
}

/* ── End Mobile Episode Page ─────────────────────────────────────────────── */

.podcast-icon-button {
    padding: 0;
    margin: 0 4px;
    /* Adjust as needed for spacing between buttons */
    width: 40px;
    /* Adjust as needed */
    height: 40px;
    /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* To ensure the buttons remain round */
}

/* Podcast dropdown styles */
.podcast-dropdown-header {
    background-color: var(--container-background);
    border-color: var(--border-color);
    border-width: 1px;
    border-style: solid;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    overflow: hidden;
}

.podcast-dropdown-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.podcast-dropdown-content {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.podcast-dropdown-image {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.375rem;
    object-fit: cover;
}

.podcast-dropdown-info {
    flex-grow: 1;
    margin-left: 1rem;
    margin-right: 1rem;
}

.podcast-dropdown-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.podcast-dropdown-count {
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.8;
}

.podcast-dropdown-arrow {
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.podcast-dropdown-arrow.expanded {
    transform: rotate(180deg);
}

.podcast-dropdown-checkbox {
    margin-right: 0.75rem;
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 0.25rem;
    border: 2px solid var(--check-box-color);
    cursor: pointer;
    appearance: none;
    position: relative;
    background-color: var(--container-background);
}

.podcast-dropdown-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--check-box-color);
}

.podcast-dropdown-checkbox:checked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use mask instead of background-image */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l3.793-3.793a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l3.793-3.793a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: var(--check-box-color, var(--text-color));
}

.ep-select-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-left: 8px;
}
.ep-range-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--text-secondary-color);
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 0;
    font-size: 13px;
    opacity: 0.6;
    transition: opacity var(--dur-fast), background var(--dur-fast);
}
.ep-range-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,.08);
}
.ep-select-col .podcast-dropdown-checkbox {
    margin-right: 0;
}

/* Episode list container that will be shown/hidden */
.podcast-episodes-container {
    max-height: 0;
    overflow: visible;
    transition: max-height 0.3s ease-out;
}

.podcast-episodes-container.expanded {
    max-height: 2000px; /* Large value to accommodate any number of episodes */
    transition: max-height 0.5s ease-in;
}

/* Inner padding for the episode list */
.podcast-episodes-inner {
    padding: 0 1rem 1rem 1rem;
    overflow-y: auto;
    max-height: 850px;
    margin-bottom: 0.75rem;
}

.item-container-alert-button {
    color: var(--text-color);
    background-color: var(--alert-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    /* Adjust as needed */
    padding: 10px 20px;
    /* Adjust as needed */
    margin-left: 10px;
    margin-right: 10px;
}

button.item-container-action-button.item-container-action-button {
    background-color: var(--alert-color);
}

.text-button {
    border-color: var(--standout-color);
}

.border-color {
    border-color: var(--border-color);
}

.spinner-border.custom-spinner-color {
    /*background-color: var(--standout-color); !* Specify only for the spinner *!*/
}

.material-icons {
    margin: 0;
    padding: 0;
    line-height: 1;
    /* Adjust the size if necessary */
}

.material-standard-color {
    color: var(--text-color);
}

.material-bonus-color {
    color: var(--text-secondary-color);
}

.large-material-icons {
    width: 40px;
    height: 40px;
    font-size: 36px !important;
    /* Or whatever size you prefer */
}

.home-material-icons {
    width: 30px;
    height: 35px;
    font-size: 33px !important;
    /* Or whatever size you prefer */
}

.icon-space {
    margin-right: 10px;
}

.icon-size {
    transform: translateY(3px);
    margin-right: 10px;
}

.align-avatar {
    display: flex;
    align-items: center;
}

.quick-link-card {
    background-color: var(--container-background);
    border: 1px solid var(--button-color);
    color: var(--text-color)
    transition: all 0.2s ease-in-out;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0.5rem;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quick-link-card i {
    color: var(--text-color);
    font-size: 1.5rem;
}

.quick-link-card span {
    color: var(--text-color);
    margin-top: 0.25rem;
    font-size: 0.875rem;
    text-align: center;
}

@media (max-width: 768px) {
    .quick-link-card {
        min-height: 60px;
    }

    .quick-link-card i {
        font-size: 1.25rem;
    }

    .quick-link-card span {
        font-size: 0.75rem;
    }
}

/* Count badge shown on quick-link cards */
.quick-link-badge {
    margin-top: 0.25rem;
    background-color: var(--button-color);
    color: var(--text-color);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    min-width: 1.2rem;
    text-align: center;
}

/* ===== "This Week" stats cards ===== */
.weekly-stat-card {
    flex-direction: row;
    gap: 0.7rem;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
}

.weekly-stat-card i {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.weekly-stat-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    gap: 0.1rem;
}

.weekly-stat-text .weekly-stat-value {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0;
    text-align: left;
}

.weekly-stat-text .weekly-stat-label {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.8rem;
    margin-top: 0;
    text-align: left;
}

/* ===== Welcome / first-run home page ===== */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem 1rem 6rem;
    max-width: 980px;
    margin: 0 auto;
}

.welcome-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 2.5rem 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(
        160deg,
        var(--container-background) 0%,
        var(--secondary-background) 100%
    );
    border: 1px solid var(--button-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.welcome-logo {
    width: 88px;
    height: 88px;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.welcome-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--link-color);
    margin: 0.5rem 0 1.25rem;
}

.welcome-intro {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary-color);
    opacity: 0.85;
    max-width: 620px;
    margin: 0 0 1.75rem;
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    border: 1px solid transparent;
}

.welcome-btn i {
    font-size: 1.2rem;
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.welcome-btn-secondary {
    background-color: var(--container-background);
    color: var(--text-color);
    border-color: var(--button-color);
}

.welcome-tips {
    width: 100%;
}

.welcome-tips-heading {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    margin: 0 0 1.5rem;
}

.welcome-tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.welcome-tip-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 0.85rem;
    background-color: var(--container-background);
    border: 1px solid var(--button-color);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.welcome-tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.welcome-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.6rem;
    background-color: var(--secondary-background);
    color: var(--link-color);
}

.welcome-tip-icon i {
    font-size: 1.6rem;
}

.welcome-tip-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.welcome-tip-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary-color);
    opacity: 0.8;
    margin: 0;
}

@media (max-width: 768px) {
    .welcome-tips-grid {
        grid-template-columns: 1fr;
    }

    .welcome-hero {
        padding: 2rem 1rem;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-actions {
        width: 100%;
    }

    .welcome-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}


.playlist-card {
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.playlist-card:hover {
    transform: translateY(-4px);
}

.playlist-card:hover .playlist-card-stack::before {
    transform: translateX(-50%) rotate(2deg);
}

.playlist-card:hover .playlist-card-stack::after {
    transform: translateX(-50%) rotate(-2deg);
}

.playlist-card-stack {
    position: relative;
    padding: 0.5rem;
}

.playlist-card-stack::before,
.playlist-card-stack::after {
    content: "";
    position: absolute;
    background-color: var(--container-background);
    border-radius: 0.5rem;
    left: 50%;
    width: 95%;
    height: 100%;
    transform: translateX(-50%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.playlist-card-stack::before {
    bottom: -4px;
    opacity: 0.7;
}

.playlist-card-stack::after {
    bottom: -8px;
    width: 90%;
    opacity: 0.4;
}

.playlist-card-content {
    background-color: var(--container-background);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.playlist-icon {
    font-size: 2rem;
    color: var(--text-color);
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    min-width: 0;
}

.playlist-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-color);
    margin: 0;
}

.playlist-count {
    font-size: 0.875rem;
    color: var(--text-secondary-color);
}

.playlist-description {
    font-size: 0.875rem;
    color: var(--text-secondary-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* ── User Stats ────────────────────────────────────── */

.user-stats-header {
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
    text-align: center;
}

.user-stats-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

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

.stats-card {
    background-color: var(--container-background);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stats-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.7rem;
    color: var(--text-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.stats-detail {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary-color);
    margin-top: 0.25rem;
    word-break: break-all;
}

.stats-sync-card {
    margin-bottom: 1rem;
}

.large-card {
    background-color: var(--container-background);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 1rem;
}

.large-card-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.about-info {
    flex: 1;
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.large-card-content {
    margin-top: 1rem;
}

.large-card-link {
    display: block;
    color: var(--link-color);
    text-decoration: none;
    margin: 0.5rem 0;
}

.large-card-paragraph {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .user-stats-grid {
        grid-template-columns: 1fr;
    }

    .large-card {
        flex-direction: column;
        align-items: center;
    }
}

/* old .search-container / .search-page-input blocks removed — replaced by .sp-* below */

.episode-time-badge {
    color: var(--text-color);
    /* Dark gray text */
    font-size: 0.875rem;
    /* Larger text */
    display: inline-flex;
    /* Keeps elements in line but allows for internal flex properties */
    align-items: center;
    white-space: nowrap; /* Prevent line breaks */
    overflow: hidden;    /* Hide overflow if needed */
    text-overflow: ellipsis; /* Show ellipsis for overflow */
    font-size: 14px;
    /* Aligns children vertically in the center */
}

/* Progressively reduce text size on smaller screens */
@media (max-width: 600px) {
    .episode-time-badge {
        font-size: 13px;
    }
}

@media (max-width: 500px) {
    .episode-time-badge {
        font-size: 11px;
        padding: 1px 4px !important; /* Reduce padding */
    }

    .episode-time-badge .time-icon {
        width: 2px !important;
        height: 2px !important;
        margin-right: 3px !important;
    }
}

@media (max-width: 400px) {
    .episode-time-badge {
        font-size: 10px;
        padding: 1px 3px !important;
    }
}

/* Ensure the container doesn't grow too large */
.episode-time-badge-container {
    max-width: 100%;
    display: flex;
    align-items: center;
}

.time-icon {
    /* Customize your SVG icon here if needed */
}

.tab.active {
    background-color: var(--secondary-background);
    /* Light gray background */
    color: var(--text-color);
    /* Darker text color */
    border-bottom-color: transparent;
    /* Hide bottom border */
}

/* Example background colors */
.bg-custom-light {
    background-color: var(--secondary-background);
    /* Adjust the color as needed */
}

.bg-custom-dark {
    background-color: var(--background-color);
    /* Adjust the color as needed */
}

.setting-box {
    background-color: var(--accent-color);
    border-color: var(--border-color);
    color: var(--text-color);
    border-width: 1px;
}

.tab-base {
    @apply px-6 py-3 font-medium transition-all relative;
}

.tab-hightlight-colors {
    color: var(--text-color);
    background-color: var(--accent-color);
}

.tab-unselect-colors {
    color: var(--text-color);
    background-color: var(--secondary-background);
}

.tab-active {
    @apply text-accent-color;
}

.tab-active::after {
    content: "";
    @apply absolute bottom-0 left-0 w-full h-0.5 bg-accent-color;
}

/* Specific targeting for first and last accordion item */
#accordion-collapse > :first-child > button {
    border-top-left-radius: 0.75rem;
    /* 12px */
    border-top-right-radius: 0.75rem;
    /* 12px */
}

#accordion-collapse > :last-child > button {
    border-bottom-left-radius: 0.75rem;
    /* 12px */
    border-bottom-right-radius: 0.75rem;
    /* 12px */
}

/* Background color for accordion content */
.accordion-content {
    background-color: var(--secondary-background);
    /* Example color, adjust as needed */
    color: --var(--text-color);
}

/* Background color for accordion arrow */
.accordion-arrow {
    background-color: transparent;
    /* Transparent background */
    position: relative;
    /* Relative position */
    width: 24px;
    /* Define width */
    height: 24px;
    /* Define height */
}

/* Accordion styling */
.accordion-container {
    @apply border-0; /* Remove default borders */
}

.accordion-button {
    @apply w-full px-6 py-4 flex items-center justify-between transition-colors hover:bg-opacity-5 hover:bg-white;
}

.accordion-content {
    @apply px-6 py-4 bg-opacity-5 bg-black;
}

.accordion-arrow {
    @apply w-5 h-5 transition-transform duration-200 text-accent-color;
}

/* Remove the hover circle and replace with subtle background */
.accordion-button:hover::before {
    display: none;
}

/* Setting box container */
.setting-box {
    @apply bg-transparent border-0 shadow-none;
}

/* First and last items */
.accordion-container:first-child .accordion-button {
    @apply rounded-t-xl;
}

.accordion-container:last-child .accordion-button {
    @apply rounded-b-xl;
}

.hosts-arrow {
    margin-bottom: 0.2rem;
    margin-left: 0.5rem;
}

/* Hover background color for accordion arrow */
/* Hover effect for the button, with a smaller circle */
.accordion-button:hover::before {
    content: "";
    position: absolute;
    top: 50%;
    /* Center the circle vertically relative to the button */
    left: 50%;
    /* Center the circle horizontally relative to the button */
    transform: translate(-50%, -50%);
    /* Offset the centering to the exact middle */
    left: calc(100% - 26px);
    width: 30px;
    /* Smaller width, adjust based on your arrow or button size */
    height: 30px;
    /* Smaller height, match width for circle */
    background-color: var(--hover-color);
    /* Example color, adjust as needed */
    border-radius: 50%;
    /* Rounded shape */
    z-index: 0;
    /* Ensure it's visible above the button background but below text/icons */
}

.accordion-button {
    @apply w-full px-6 py-4 flex items-center justify-between transition-colors hover:bg-opacity-5 hover:bg-white;
}

/* Styles for the select dropdown */
.theme-select-dropdown {
    background-color: var(--background-color);
    color: var(--text-color);
    border-color: var(--border-color);
}

.theme-select-dropdown:hover {
    border-color: var(--dropdown-hover-border-color);
}

.theme-select-dropdown:focus {
    outline-color: var(--dropdown-focus-outline-color);
    box-shadow: 0 0 0 3px var(--dropdown-focus-shadow-color);
}

.tab-background {
    background-color: var(--secondary-background);
}

/* Styles for the dropdown arrow */
.theme-dropdown-arrow {
    color: var(--text-color);
}

/* Styles for the submit button */
.theme-submit-button {
    background-color: var(--transparent-background);
    color: var(--text-color);
}

.theme-submit-button:hover {
    background-color: var(--hover-color);
}

.theme-submit-button:focus {
    outline-color: var(--button-focus-outline-color);
    box-shadow: 0 0 0 3px var(--button-focus-shadow-color);
}

.email-input {
    background-color: var(--background-color);
    /* Change to your desired background color */
    color: var(--button-text-color);
    /* Change to your desired text color */
    border: 1px solid var(--border-color);
    /* You can change this as needed */
    padding: 8px;
    /* Adjust padding as needed */
    border-radius: 4px;
    /* Rounded corners */
}

.email-input::placeholder {
    /* Chrome, Firefox, Opera, Safari 10.1+ */
    color: var(--accent-color);
    /* Change to your desired placeholder text color */
    opacity: 1;
    /* Firefox */
}

.email-input:-ms-input-placeholder {
    /* Internet Explorer 10-11 */
    color: var(--accent-color);
}

.email-input::-ms-input-placeholder {
    /* Microsoft Edge */
    color: var(--accent-color);
}

.email-select {
    background-color: var(--background-color);
    /* Change to your desired background color */
    color: var(--text-color);
    /* Change to your desired text color */
    border: 1px solid var(--border-color);
    /* You can change this as needed */
    padding: 8px;
    /* Adjust padding as needed */
    border-radius: 4px;
    /* Rounded corners */
}

.settings-button {
    color: var(--button-text-color);
    background-color: var(--button-color);
    border-color: var(--border-color);
    margin-bottom: 10px;
    margin-top: 10px;
    display: inline-block;
    padding: 5px 10px;
    /* Adjust as needed */
    cursor: pointer;
    border-radius: 5px;
    /* Adjust as needed */
    border: 1px solid var(--button-border-color);
}

/* OIDC Provider Styles */
.oidc-provider-card {
    margin-bottom: 1rem;
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.oidc-provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.oidc-provider-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.oidc-info-group {
    padding: 0.75rem;
    background-color: var(--background-color);
    border-radius: 6px;
}

.oidc-info-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.oidc-info-value {
    color: var(--text-color);
    opacity: 0.8;
    word-break: break-all;
    font-size: 0.9rem;
}

.oidc-empty-state {
    text-align: center;
    padding: 2rem;
    background-color: var(--container-background);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    opacity: 0.7;
}

.oidc-remove-button {
    background-color: var(--error-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
}

.oidc-remove-button:hover {
    opacity: 0.9;
}

/* User Settings Styles */
.user-settings-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--container-background);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.settings-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

@media (min-width: 640px) {
    .settings-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.settings-header i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 1.75rem;
    background-color: var(--background-color);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--button-color);
    border-radius: 6px;
    background-color: var(--container-background);
    color: var(--text-color);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(93, 128, 170, 0.1);
}

.form-input:hover {
    border-color: var(--hover-color);
}

.password-section {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
}

.password-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.error-text {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding-left: 0.25rem;
}

.success-message {
    background-color: rgba(0, 204, 0, 0.1);
    color: var(--success-color);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message::before {
    content: "✓";
    font-weight: bold;
}

.submit-button {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.submit-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button i {
    font-size: 1.25rem;
}

/* Notification settings helper text */
.form-helper-text {
    color: var(--text-secondary-color);
    opacity: 0.8;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Modern toggle switch for notification enable/disable */
.notification-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.notification-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--button-color);
    transition: 0.3s;
    border-radius: 26px;
    border: 2px solid var(--border-color);
}

.notification-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-color);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .notification-toggle-slider {
    background-color: var(--accent-color);
    border-color: var(--hover-color);
}

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

.notification-toggle-slider:hover {
    background-color: var(--hover-color);
}

/* Notification platform selector tabs */
.notification-platform-tabs {
    background-color: var(--secondary-background);
    padding: 0.25rem;
    border-radius: 0.5rem;
    width: fit-content;
    display: inline-flex;
}

.notification-platform-tab {
    color: var(--text-color);
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background-color: var(--secondary-background);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.25rem;
}

.notification-platform-tab:last-child {
    margin-right: 0;
}

.notification-platform-tab:hover {
    background-color: var(--container-button-color);
    transform: translateY(-1px);
}

.notification-platform-tab.active {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.playback-submit-button {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.playback-submit-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
}

.playback-submit-button:active {
    transform: translateY(0);
}

.playback-submit-button i {
    font-size: 1.25rem;
}

.input-button {
    display: none;
    /* Hide the default file input */
}

.input-button-label {
    display: inline-block;
    padding: 10px 20px;
    /* Adjust as needed */
    background-color: var(--button-color);
    color: var(--button-text-color);
    cursor: pointer;
    border-radius: 5px;
    /* Adjust as needed */
    border: 1px solid var(--button-border-color);
}

.input-button-label:hover {
    background-color: var(--hover-color);
}

.links-custom a {
    color: #3182ce; /* or your preferred link color */
    text-decoration: underline;
    transition: color 0.2s;
}

.links-custom a:hover {
    color: #2c5282; /* darker shade for hover */
}

.dark .links-custom a {
    color: #63b3ed; /* lighter blue for dark mode */
}

.dark .links-custom a:hover {
    color: #90cdf4; /* even lighter for hover in dark mode */
}

// Add this to your styles.css
/* OIDC Provider Buttons */
.oidc-divider {
    position: relative;
    margin: 1rem 0;
}

.oidc-divider-line {
    width: 100%;
    border-top: 1px solid;
}

.oidc-divider-text {
    position: relative;
    padding: 0 0.5rem;
    color: var(--text-color);
}

.oidc-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6rem 1rem;
    margin: 0.25rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.2s ease-out;
}

.oidc-button:hover {
    opacity: 0.9;
}

.oidc-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
}

.dropdown-content-class {
    top: 100%;
    /* Position just below the button */
    right: 0;
    /* Align with the left edge of the button */
    background-color: var(--background-color);
    border-color: var(--border-color);
    /* ... other styles ... */
}

.search-dropdown-content-class {
    top: 100%;
    /* Position just below the button */
    left: 0;
    /* Align with the left edge of the button */
    background-color: var(--background-color);
    border-color: var(--border-color);
    /* ... other styles ... */
}

.search-input-custom-border,
.search-input.search-input-custom-border {
    border-style: solid;
    border-width: 1px 1px 1px 0; /* top, right, bottom, left */
    border-color: var(--border-color);
    background-color: var(--background-color);
    border-radius: 0 0.5rem 0.5rem 0; /* right corners only — left must be flush with dropdown */
}


.dropdown-container {
    background-color: var(--background-color);
    /* Remove the background-color property */
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-300 {
    transition-duration: 300ms;
}

.rotate-180 {
    transform: rotate(180deg);
}

.rotate-0 {
    transform: rotate(0deg);
}

/* Optional: Add hover effect to the header */
.podcast-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.person-avatar {
    height: 6rem !important;
    width: 6rem !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 200ms ease;
}

.person-avatar:hover {
    border-color: var(--accent-color);
}

@media (prefers-color-scheme: dark) {
    .person-avatar {
        border-color: var(--border-color-dark);
    }
    .person-avatar:hover {
        border-color: var(--accent-color-dark);
    }
}

.buffering-indicator {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    border-radius: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dropdown-button {
    cursor: pointer;
    background-color: var(--button-color);
    color: var(--text-color);
}

.dropdown-button:hover {
    background-color: var(--hover-color);
    /* Add your hover color here */
}

.dropdown-button:hover {
    background-color: var(--hover-color);
    /* Change background color on hover */
}

.dropdown-option {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #eee;
    /* Border for each option */
    transition: background-color 0.3s;
    /* Remove the background-color property */
    color: var(--text-color);
}

.dropdown-option:hover {
    background-color: var(--hover-color);
    /* Add your hover color here */
}

.dropdown-option:last-child {
    border-bottom: none;
    /* Remove border for the last option */
}

.dropdown-option:hover {
    background-color: var(--hover-color);
    /* Change background color on hover */
}

.table-header {
    text-transform: uppercase;
    background-color: var(--bonus-color);
    /* Light gray background for table header */
    color: var(--text-color);
}

.table-row {
    background-color: var(--secondary-background);
    color: var(--text-color);
    /* Regular font color */
    cursor: pointer;
    /* Change cursor to pointer */
}

.table-row:hover {
    background-color: var(--secondary-background);
    /* Slightly darker background on hover */
}

.episode-top-info {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: var(--container-background);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.rounded-corners {
    border-radius: 1rem;
}

.episode-artwork {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px !important;
    flex-shrink: 0;
}

.episode-mobile-artwork {
    /* Adjust to scale with page size */
    max-width: 30%;
    height: auto;
    object-fit: cover;
}

.episode-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.custom-volume-button {
    margin-top: 9px;
    /* Adjust the value as needed */
}

.volume-control-container {
    position: relative;
    display: inline-block;
}

.volume-slider-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    width: 160px;
    margin-top: 8px;
    z-index: 100;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) translateX(-50%);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s;
}

.volume-slider-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateX(-50%);
}

.volume-text {
    text-align: center;
    margin-bottom: 4px;
    font-size: 0.875rem;
    color: var(--text-color);
}

.volume-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--button-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--hover-color);
}

.speed-control-container {
    position: relative;
    display: inline-block;
}

.speed-slider-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    width: 160px;
    margin-top: 8px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) translateX(-50%);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Force consistent container behavior regardless of screen size */
@media (min-width: 768px) {
    .speed-slider-container {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 160px !important;
    }

    .speed-control-content {
        width: 100% !important;
        position: relative !important;
    }

    .speed-text {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        color: var(--text-color);
    }
}

.speed-slider-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateX(-50%);
}

.speed-control-content {
    background: var(--background-color);
    border-radius: 6px;
    padding: 8px;
    width: 100%;
}

.speed-text {
    text-align: center;
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.speed-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    outline: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--button-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.speed-slider::-webkit-slider-thumb:hover {
    background: var(--hover-color);
}

.podcast-title {
    font-size: 0.75rem;
    color: var(--text-secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.1rem;
}

.hover-pointer-podcast-name {
    cursor: pointer;
}

.episode-title {
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.episode-duration,
.episode-release-date {
    font-size: 0.85rem;
    color: var(--text-secondary-color);
    font-style: normal;
}

.episode-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.episode-action-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background-color: var(--container-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    flex-grow: 0;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease-out, transform 0.1s ease-out;
}

.episode-action-buttons button:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
}

.episode-action-buttons button:active {
    transform: translateY(0);
}

.episode-action-buttons .play-button {
    background-color: var(--button-color);
    color: var(--button-text-color);
    border-color: var(--button-color);
}

.no-media-warning {
    display: inline-flex;
    align-items: center;
    background-color: var(--background-accent);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.context-button-wrapper {
    position: relative;
}

/* Context menu dropdown — position:fixed so it escapes any overflow:hidden ancestor */
.ep-context-menu {
    position: fixed; /* overridden inline when needed */
    background: var(--container-background);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    min-width: 180px;
    overflow: hidden;
}
.ep-context-menu-list {
    list-style: none;
    margin: 0; padding: 4px 0;
}
.ep-context-menu-list .dropdown-option {
    display: block; width: 100%;
    padding: 9px 14px; text-align: left;
    background: transparent; border: none;
    color: var(--text-color); font-family: var(--font-body); font-size: 13px;
    cursor: pointer; white-space: nowrap;
    transition: background-color var(--dur-fast);
    border-radius: 0;
    font-weight: normal;
}
.ep-context-menu-list .dropdown-option:hover { background: rgba(255,255,255,.06); }

.dropdown-content-class {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: #fff; /* Adjust as needed */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Ensure the dropdown is on top of other elements */
.item-container {
    overflow: visible !important;
}

/* If needed, adjust the container of the ContextButton */
.button-container {
    position: static !important;
}

.episode-action-buttons .no-media-warning {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.episode-action-buttons i {
    font-size: 1rem;
    line-height: 1;
}

.episode-action-buttons button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-color);
}

.episode-description {
    max-width: 800px; /* Adjust this value based on your desired width */
    margin-left: auto;
    margin-right: auto;
    /* Other styles as needed */
}

.episode-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    opacity: 0.3;
    margin: 1rem 0;
}

.episode-single-desc {
    margin-top: 0.5rem;
}

.qr-code-container {
    /* Center content */
    display: flex;
    justify-content: center;
    align-items: center;

    /* White background */
    background-color: white;

    /* Rounded corners */
    border-radius: 8px;

    /* Optional: Set a specific size for the QR code container if necessary */
    width: auto;
    height: auto;

    /* Add some padding around the QR code for better aesthetics */
    padding: 10px;

    /* Drop shadow for depth (optional) */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.progress-bar-container {
    height: 6px;
    background-color: var(--unfilled-color);
    width: 100%;
    border-radius: 3px;
}

.progress-bar {
    height: 100%;
    background-color: var(--prog-bar-color);
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
}

.cursor-pointer:hover {
    cursor: pointer;
}

.time-display {
    display: inline-block;
    width: 80px;
    /* Adjust this width based on the maximum expected length of the time strings */
    text-align: center;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family:
        system-ui,
        -apple-system,
        sans-serif;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border: 4px solid var(--text-color-dim);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    position: relative;
    animation: spinner-rotate 1s linear infinite;
}

.loading-spinner::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-right-color: var(--accent-color-dim);
    border-radius: 50%;
    animation: spinner-pulse 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loading-container p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0;
    animation: text-fade 400ms ease forwards;
    animation-delay: 200ms;
}

.auth-error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 2rem;
    gap: 2rem;
}

.auth-error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    color: var(--error-color);
}

.auth-error-message .material-icons {
    font-size: 3rem;
}

.auth-error-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.auth-error-button:hover {
    background-color: var(--primary-color-dark);
}


/* Add these styles to your main.css or create a new notification_center.css file */
/* Add to your existing CSS */
/* Toast Container */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1rem;
  max-width: 24rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

/* Individual Toast Item */
.toast-item {
  transform-origin: top right;
  pointer-events: auto;
  transition: transform 0.3s ease-in-out,
              opacity 0.3s ease-in-out,
              max-height 0.3s ease-in-out,
              margin-bottom 0.3s ease-in-out;
  will-change: transform, opacity;
}

/* Toast Visibility States with Explicit Animations */
.toast-visible {
  opacity: 1;
  transform: translateX(0);
  max-height: 200px;
  margin-bottom: 0.75rem;
  animation: slideIn 0.3s ease-in-out forwards;
}

.toast-hidden {
  opacity: 0;
  transform: translateX(100%);
  max-height: 0;
  margin-bottom: 0;
  animation: slideOut 0.3s ease-in-out forwards;
}

/* Toast Styling */
.toast {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  background-color: var(--container-background);
  width: 100%;
}

.toast-info {
  border-left: 4px solid #3b82f6; /* Blue accent */
}

.toast-error {
  border-left: 4px solid #ef4444; /* Red accent */
}

.toast-message {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--text-color);
  word-break: break-word;
}

/* Toast Dismiss Button */
.toast-dismiss {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  margin-left: auto;
  padding-left: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-color);
}

.toast-dismiss:hover {
  opacity: 1;
}

/* Define explicit keyframe animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Notification bell styling */
.notification-bell {
    color: var(--text-color);
    background-color: var(--container-button-color);
    transition: background-color 0.2s ease;
}

/* Notification badge */
.notification-badge {
    background-color: var(--alert-color);
    color: var(--text-color);
    min-width: 18px;
    height: 18px;
}

/* Notification dropdown */
.notification-dropdown {
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.2s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification header */
.notification-header {
    background-color: var(--secondary-background);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Notification items */
.notification-item {
    background-color: var(--background-color);
    border-left: 3px solid var(--accent-color);
    margin-bottom: 8px;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: var(--secondary-background);
}

/* Status styles */
.notification-status {
    font-weight: 500;
}

.status-pending {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.status-started {
    background-color: var(--prog-bar-color);
    color: var(--text-color);
}

.status-success {
    background-color: var(--success-color);
    color: var(--text-color);
}

.status-failed {
    background-color: var(--error-color);
    color: var(--text-color);
}

/* Progress bar */
.notification-progress-bar-container {
    background-color: var(--secondary-background);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    background-color: var(--prog-bar-color);
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-color);
    font-size: 0.75rem;
}

/* Message notifications */
.notification-error {
    border-left-color: var(--error-color);
}

.notification-error i {
    color: var(--error-color);
}

.notification-info {
    border-left-color: var(--success-color);
}

.notification-info i {
    color: var(--success-color);
}

/* Empty state */
.notification-empty {
    color: var(--accent-color);
    font-style: italic;
}

/* Scrollbar styling for notification dropdown */
.notification-dropdown::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown::-webkit-scrollbar-track {
    background: var(--secondary-background);
    border-radius: 8px;
}

.notification-dropdown::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 8px;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .notification-dropdown {
        width: 100%;
        max-width: calc(100vw - 20px);
        right: -5px;
    }
}

@keyframes spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinner-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes text-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes frameAnimation {
    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.loading-animation {
    display: flex;
    justify-content: center;
    align-items: start;
    width: 100%;
    height: 100vh;
    position: relative;
    padding-top: 6vh;
}

.loading-animation div {
    position: absolute;
    width: min(
        500px,
        80vw
    ); /* Use the smaller of 500px or 80% viewport width */
    height: min(500px, 80vw); /* Keep it square by using same value */
    background-size: cover;
    animation: frameAnimation 3s infinite;
}

/* Media query for smaller screens */
@media (max-width: 640px) {
    .loading-animation {
        padding-top: 4vh; /* Reduce top padding on mobile */
    }

    .loading-animation div {
        width: 85vw; /* Take up most of the screen width */
        height: 85vw; /* Keep it square */
    }
}

/* Animation frames stay the same */
.loading-animation .frame1 {
    background-image: url("./assets/images/og-same.png");
    animation-delay: -4.5s;
}
/* ... rest of the frames ... */

.loading-animation .frame2 {
    background-image: url("./assets/images/low5.png");
    animation-delay: -4s;
}

.loading-animation .frame3 {
    background-image: url("./assets/images/low4.png");
    animation-delay: -3.5s;
}

.loading-animation .frame4 {
    background-image: url("./assets/images/low3.png");
    animation-delay: -3s;
}

.loading-animation .frame5 {
    background-image: url("./assets/images/low2.png");
    animation-delay: -2.5s;
}

.loading-animation .frame6 {
    background-image: url("./assets/images/low1.png");
    animation-delay: -2s;
}

/* History Filter Styling */
.page-tab-indicator {
    position: absolute;
    top: -1.5rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem 0.5rem 0 0;
    border: 1px solid var(--border-color);
    border-bottom: 0;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--background-color);
    color: var(--text-secondary-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tab-icon {
    color: var(--accent-color);
}

.search-input {
    width: 100%;
    height: 100%;
    padding-left: 1rem;
    padding-right: 3rem;
    font-size: 1rem;
    border-radius: 0.75rem 0 0 0.75rem;
    border: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    outline: none;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--accent-color);
    z-index: 10;
}

.search-input::placeholder {
    color: var(--text-secondary-color);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--text-secondary-color);
    pointer-events: none;
}

.sort-dropdown {
    appearance: none;
    width: 100%;
    height: 100%;
    padding-left: 1rem;
    padding-right: 3rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0 0.75rem 0.75rem 0;
    border: 1px solid var(--border-color);
    border-left: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    outline: none;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s;
}

.sort-dropdown:focus {
    border-color: var(--accent-color);
    z-index: 10;
}

.dropdown-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: var(--text-secondary-color);
    pointer-events: none;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: none;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 44px;
    cursor: pointer;
}

.filter-chip:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.filter-chip-active {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.filter-chip-active:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.filter-chip-alert {
    background-color: var(--alert-color);
    color: var(--text-color);
}

.filter-chip-alert:hover {
    background-color: var(--alert-color);
    color: var(--text-color);
}

.downloads-search-input {
    width: 100%;
    height: 48px;
    padding-left: 1rem;
    padding-right: 3rem;
    font-size: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.downloads-search-input:focus {
    border-color: var(--accent-color);
}

.downloads-search-input::placeholder {
    color: var(--text-secondary-color);
}

/* Bulk Episode Management Styles */
.bulk-select-button {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: var(--container-background);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.bulk-select-button:hover {
    background-color: var(--hover-color);
}

.bulk-filter-button {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: var(--secondary-background);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.bulk-filter-button:hover {
    background-color: var(--hover-color);
}

.bulk-action-success {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bulk-action-success:hover {
    opacity: 0.8;
}

.bulk-action-primary {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    background-color: var(--link-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bulk-action-primary:hover {
    opacity: 0.8;
}

.bulk-action-queue {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    background-color: var(--accent-color);
    color: var(--background-color);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bulk-action-queue:hover {
    opacity: 0.8;
}

.bulk-action-download {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    background-color: var(--standout-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bulk-action-download:hover {
    opacity: 0.8;
}

/* Bulk Actions Toolbar */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.bulk-actions-bar__count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
}

.bulk-actions-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.episode-select-button {
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.episode-select-button:hover {
    opacity: 0.8;
}

/* Merged Podcast Styles */
.merged-podcast-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background-color: var(--secondary-background);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.merged-podcast-name {
    font-size: 0.875rem;
    color: var(--text-color);
}

.unmerge-button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* ============================================================
   PINEPODS DESIGN SYSTEM v2.0
   Modern tokens + component CSS. Appended after existing styles
   so new rules win where class names match.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
    --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
    --font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
                    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono:    "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

    --radius-xs:   4px;
    --radius-sm:   6px;
    --radius-md:   8px;
    --radius-lg:   10px;
    --radius-xl:   16px;
    --radius-full: 9999px;

    --shadow-sm:     0 1px 2px rgba(0,0,0,.15);
    --shadow-md:     0 4px 8px rgba(0,0,0,.15);
    --shadow-lg:     0 4px 12px rgba(0,0,0,.20);
    --shadow-xl:     0 8px 24px rgba(0,0,0,.30);
    --shadow-player: 0 -2px 5px rgba(0,0,0,.3);

    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast:    150ms;
    --dur-base:    200ms;
    --dur-slow:    380ms;

    /* unfilled track color for range inputs */
    --unfilled-color: rgba(255,255,255,.18);
}

body {
    font-family: var(--font-body);
}

/* ============================================================
   SIDEBAR — modernised overlay drawer
   ============================================================ */
.drawer-background {
    display: flex !important;
    flex-direction: column !important;
    background-color: var(--secondary-background) !important;
    padding: 0 !important;
    overflow-y: auto !important;
}

/* Brand header strip inside drawer */
.sb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 8px;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 8px;
}
.sb-brand img { width: 28px; height: 28px; }

.sb-hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,.08);
    margin: 8px 12px;
}

.sb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 12px;
}
.sb-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-color);
}
.sb-username { font-size: 15px; color: var(--text-color); }

/* Sidebar navigation items */
.sb-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 9px 12px !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-color) !important;
    font-size: 15px !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    transition: background-color var(--dur-fast) !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    margin: 0 !important;
}
.sb-item i { font-size: 22px !important; flex-shrink: 0; }
.sb-item:hover { background: rgba(255,255,255,.06) !important; }
.sb-item.is-active,
.sb-item:focus-visible { background: rgba(255,255,255,.10) !important; }

.sb-spacer { flex: 1; }
.sb-version {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary-color);
    opacity: .5;
    padding: 8px 0 4px;
}

/* Lift sign-out + version above the mini player when audio is active */
body.audio-player-active .sb-bottom {
    margin-bottom: 74px;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.search-bar-container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 16px !important;
    height: 56px !important;
    background-color: var(--secondary-background) !important;
    border-bottom: 1px solid rgba(0,0,0,.2) !important;
    gap: 8px !important;
}

/* ============================================================
   AUDIO PLAYER BAR — modern 3-column compact bar
   ============================================================ */

/* Increase bar height to 72px */
.audio-player {
    height: 72px !important;
    transition: height var(--dur-slow) cubic-bezier(.22,1,.36,1) !important;
}
.audio-player.expanded { height: 100vh !important; }

/* New 3-column bar layout */
.player-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 460px) minmax(120px, 1fr);
    align-items: center;
    padding: 0 18px;
    gap: 12px;
    width: 100%;
    height: 100%;
    position: relative;
}

@media (max-width: 640px) {
    .player-bar {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }
    .player-center { display: none; } /* mobile: only left+right visible */
}

/* Left: art circle + title */
.player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    cursor: pointer;
}

/* Artwork as a compact circle */
.artwork-container {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.audio-player .artwork {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin-right: 0 !important;
    display: block;
}
.audio-player .artwork.playing {
    animation: pp-spin 6s linear infinite !important;
}
@keyframes pp-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.player-info { min-width: 0; }
.player-title {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
    max-width: 100%;
}
.player-subtitle {
    font-size: 12px;
    color: var(--text-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center: transport + scrub */
.player-center {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.player-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Individual player buttons */
.player-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background-color var(--dur-fast);
    padding: 0;
}
.player-btn:hover { background: rgba(255,255,255,.08); }
.player-btn i { font-size: 20px; }
.player-btn.play i { font-size: 30px; }

/* Scrub bar */
.player-scrub {
    display: flex;
    align-items: center;
    gap: 8px;
}
.player-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary-color);
    min-width: 48px;
    text-align: center;
    flex-shrink: 0;
}
.player-range {
    flex: 1;
    height: 4px;
    cursor: pointer;
    accent-color: var(--prog-bar-color);
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}
.player-range::-webkit-slider-runnable-track {
    height: 4px;
    background: linear-gradient(
        to right,
        var(--prog-bar-color) var(--progress, 0%),
        var(--unfilled-color) var(--progress, 0%)
    );
    border-radius: 2px;
}
.player-range::-moz-range-track {
    height: 4px;
    background: var(--unfilled-color);
    border-radius: 2px;
}
.player-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--prog-bar-color);
    margin-top: -4px;
    cursor: pointer;
}
.player-range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--prog-bar-color);
    border: none;
    cursor: pointer;
}

/* Right: expand + secondary controls */
.player-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Mobile progress strip at very top of bar */
.audio-player .mobile-progress-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: rgba(128,128,128,.2);
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}
.audio-player .mobile-progress-bar {
    height: 100%;
    background: var(--prog-bar-color);
    transition: width .1s linear;
}

/* ============================================================
   EPISODE ROWS — compact 3-column grid
   ============================================================ */
.ep-row {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: var(--container-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 10px;
    border: none;
    overflow: visible;
    touch-action: manipulation;
    transition: transform var(--dur-fast);
    position: relative;
}
.ep-row--select {
    grid-template-columns: auto 96px 1fr auto;
}
.ep-row:active { transform: scale(.99); }
/* When a context menu is open inside the row, suppress the transform.
   A transform on any ancestor turns position:fixed children into
   position:absolute, displacing the menu so clicks miss the li items. */
.ep-row:has(.ep-context-menu):active { transform: none; }

.ep-row--pressing, .ep-row-pressing {
    background: color-mix(in srgb, var(--accent-color) 12%, var(--container-background)) !important;
    transform: scale(.98) !important;
}

.ep-art-wrap {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    align-self: start;
    margin-top: 2px;
    position: relative;
}
.ep-art-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--bg-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #4ade80;
    line-height: 1;
}
.ep-art-img {
    width: 96px !important;
    max-width: 96px !important;
    height: 96px !important;
    max-height: 96px !important;
    object-fit: cover !important;
    border-radius: var(--radius-md) !important;
    display: block !important;
    margin: 0 !important;
}

.ep-body { min-width: 0; }

.ep-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-color);
    margin-bottom: 6px;
}
.ep-title:hover { color: var(--link-color); }

.ep-divider {
    height: 1px;
    background: var(--accent-color);
    opacity: .3;
    margin-bottom: 7px;
}

.ep-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-color);
    opacity: .8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    cursor: pointer;
}

.ep-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary-color);
    flex-wrap: wrap;
    line-height: 1;
}
.ep-meta i { font-size: 13px; vertical-align: -1px; }
.ep-meta-sep { opacity: .4; }

.ep-progress {
    width: 80px;
    height: 3px;
    background: var(--unfilled-color);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}
.ep-progress-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--prog-bar-color);
    border-radius: 2px;
}

/* Actions column */
.ep-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* Flat icon button — no border, no rounded outline */
.ico {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    color: var(--text-color);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--dur-fast), background-color var(--dur-base);
    padding: 0;
}
.ico i { font-size: 18px; }
.ico:hover { background: rgba(255,255,255,.08); }
.ico.playing { color: var(--prog-bar-color); }

/* Mobile: shrink episode grid */
@media (max-width: 530px) {
    .ep-row {
        grid-template-columns: 72px 1fr auto;
        gap: 10px;
        padding: 10px 12px;
    }
    .ep-row--select {
        grid-template-columns: auto 72px 1fr auto;
    }
    .ep-art-wrap { width: 72px; height: 72px; }
    .ep-art-img {
        width: 72px !important; max-width: 72px !important;
        height: 72px !important; max-height: 72px !important;
    }
    .ep-desc { display: none; }
}

/* ============================================================
   BUTTONS — shared design system
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background-color var(--dur-base);
    white-space: nowrap;
}
.btn i { font-size: 18px; }
.btn-primary { background: var(--button-color); color: var(--button-text-color); }
.btn-primary:hover { background: var(--hover-color); }
.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--accent-color);
}
.btn-secondary:hover { background: var(--container-background); }
.btn-ghost { background: transparent; color: var(--text-color); }
.btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn-danger {
    background: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}
.btn-danger:hover { background: rgba(229,72,77,.12); }
.btn input[type="file"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
input[type="file"]::file-selector-button { display: none; }
input[type="file"] { color: var(--text-color); font-size: 13px; }

/* ============================================================
   INPUTS — shared design system
   ============================================================ */
.ds-input, .ds-select, .input, .select {
    width: 100%;
    padding: 8px 10px;
    background: var(--container-background);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: border-color var(--dur-base);
}
.ds-input:focus, .ds-select:focus, .input:focus, .select:focus {
    border-color: var(--hover-color);
    box-shadow: 0 0 0 2px rgba(93,128,170,.18);
}
.ds-input::placeholder, .input::placeholder { color: var(--text-secondary-color); opacity: .7; }

/* ============================================================
   SETTINGS — flat layout (no accordions)
   ============================================================ */
.settings-section {
    background: var(--container-background);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
}
.settings-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 10px;
}
.settings-section-head i { font-size: 24px; color: var(--accent-color); }
.settings-section-title { font-size: 16px; font-weight: 600; color: var(--text-color); }
.settings-section-desc { font-size: 12px; color: var(--text-secondary-color); margin-top: 2px; }
.settings-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
}
.settings-row + .settings-row { border-top: 1px solid rgba(255,255,255,.04); }
.settings-row > div:first-child { flex: 1; min-width: 0; }
.settings-row-label { font-size: 14px; font-weight: 500; color: var(--text-color); }
.settings-row-desc  { font-size: 12px; color: var(--text-secondary-color); margin-top: 2px; line-height: 1.4; }
.settings-row-control { flex-shrink: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track {
    width: 36px; height: 20px;
    background: var(--unfilled-color);
    border-radius: 999px;
    position: relative;
    transition: background-color 180ms;
    flex-shrink: 0;
}
.toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform 180ms cubic-bezier(.22,1,.36,1);
}
.toggle input:checked + .toggle-track { background: var(--hover-color); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(16px); }
.toggle-label { font-size: 13px; color: var(--text-secondary-color); }

/* ============================================================
   TYPOGRAPHY — display headings
   ============================================================ */
.screen-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.05;
    color: var(--text-color);
    margin: 4px 0 18px;
}
.screen-subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary-color);
    margin: -12px 0 18px;
}

/* ============================================================
   PODCAST CARD GRID
   ============================================================ */
.pc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 16px;
}
.pc {
    background: var(--container-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--dur-base), box-shadow var(--dur-base);
}
.pc:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.pc-cover {
    aspect-ratio: 1/1;
    background-size: cover;
    background-position: center;
    background-color: var(--secondary-background);
}
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-meta { padding: 10px 12px 12px; }
.pc-title { font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--text-color); }
.pc-sub   { font-size: 12px; color: var(--text-secondary-color); margin-top: 2px; }

/* ============================================================
   TOPBAR — fixed full-width header with search + queue toggle
   ============================================================ */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--secondary-background);
    border-bottom: 1px solid rgba(0,0,0,.2);
    padding: 0 18px;
    height: 56px;
    /* Break out of .main-container's max-width to span full viewport */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 100vw;
    z-index: 45;
    box-sizing: border-box;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Spacer for the drawer-icon buttons which float above this at z-49 */
    min-width: 160px;
}
.topbar-right { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; }

/* Reserve space for fixed topbar so page content isn't hidden under it */
/* 56px = topbar height, 20px = breathing room between topbar and page content */
.episodes-container {
    height: 76px;
    margin-bottom: 0 !important;
    padding: 0 !important;
}
.iconbtn {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: none; border-radius: var(--radius-sm);
    color: var(--text-color); cursor: pointer;
    transition: background-color var(--dur-fast);
    flex-shrink: 0;
    position: relative;
}
.iconbtn i { font-size: 22px; }
.iconbtn:hover { background: rgba(255,255,255,.07); }

.topbar-queue-badge {
    position: absolute;
    top: 4px; right: 4px;
    min-width: 16px; height: 16px;
    background: var(--accent-color);
    color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.src-source {
    display: flex; align-items: center; gap: 5px;
    background: var(--container-background);
    padding: 6px 11px;
    border-radius: var(--radius-full);
    font-size: 12px; color: var(--text-color);
    cursor: pointer; white-space: nowrap;
    border: none;
    transition: background-color var(--dur-fast);
    font-family: var(--font-body);
}
.src-source i { font-size: 14px; }
.src-source:hover { background: rgba(255,255,255,.07); }

.src-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--container-background);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255,255,255,.08);
    min-width: 140px;
    z-index: 100;
    overflow: hidden;
}
.src-dropdown-item {
    display: block; width: 100%;
    padding: 9px 14px; text-align: left;
    background: transparent; border: none;
    color: var(--text-color); font-family: var(--font-body); font-size: 13px;
    cursor: pointer;
    transition: background-color var(--dur-fast);
}
.src-dropdown-item:hover { background: rgba(255,255,255,.06); }
.src-dropdown-item.is-active { color: var(--accent-color); font-weight: 600; }

.src-input {
    background: var(--container-background);
    border-radius: var(--radius-full);
    padding: 0 12px;
    display: flex; align-items: center;
    flex: 1; max-width: 300px;
}
.src-input input {
    background: transparent; border: none; outline: none;
    color: var(--text-color); font-family: var(--font-body);
    padding: 8px 6px; width: 100%; font-size: 13px;
}
.src-input input::placeholder { color: var(--text-secondary-color); }

/* ============================================================
   Mobile search compacting — TAKEOVER pattern
   Breakpoint: 820px. Below it, the topbar shows left buttons +
   queue + a search icon. Tapping the icon morphs the topbar row
   into [back] [source-icon-pill] [input (grows)] [submit].
   No backdrop, no overlay, single state transition.
   ============================================================ */

/* --- Clear (×) button inside the input pill --- */
.src-input { position: relative; }
.src-input-clear {
    background: transparent; border: none; color: var(--text-secondary-color);
    width: 26px; height: 26px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 999px; cursor: pointer; padding: 0;
    flex-shrink: 0;
}
.src-input-clear i { font-size: 14px; }
.src-input-clear:hover { background: rgba(255,255,255,.08); color: var(--text-color); }

/* --- Source picker menu (icon + label rows, used in mobile expanded) --- */
.src-menu {
    position: absolute; top: calc(100% + 6px); left: 0;
    background: var(--container-background);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    padding: 4px; min-width: 180px; z-index: 50;
    display: flex; flex-direction: column; gap: 2px;
}
.src-menu-item {
    display: flex; align-items: center; gap: 10px;
    background: transparent; border: none; color: var(--text-color);
    font-family: var(--font-body); font-size: 13px; text-align: left;
    padding: 9px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.src-menu-item i { font-size: 18px; color: var(--text-secondary-color); }
.src-menu-item:hover { background: rgba(255,255,255,.08); }
.src-menu-item.is-active { background: rgba(255,255,255,.10); }
.src-menu-item.is-active i { color: var(--accent-color); }

/* Source pill in icon-only mode (expanded takeover row) */
.src-source-icon { padding: 7px 10px; gap: 4px; }
.src-source-icon i:first-child { font-size: 18px; }
.src-combined-caret { font-size: 12px !important; opacity: .6; }

/* --- Expanded takeover topbar row --- */
.topbar.is-expanded { padding: 0 12px; }
.topbar-search-takeover {
    display: flex; align-items: center; gap: 8px;
    width: 100%; position: relative;
}
.topbar-search-takeover .src-input {
    flex: 1; min-width: 0;
    background: var(--container-background);
    border-radius: var(--radius-full); padding: 0 10px;
    display: flex; align-items: center;
    max-width: none;
}
.topbar-search-takeover .src-input input {
    background: transparent; border: none; outline: none;
    color: var(--text-color); font-family: var(--font-body);
    padding: 10px 6px; width: 100%; font-size: 14px; min-width: 0;
}
.topbar-search-takeover .src-input input::placeholder { color: var(--text-secondary-color); }
.src-menu-takeover { top: calc(100% + 6px); left: 48px; right: auto; }

/* Hide the fixed-position drawer icons while the search takeover is open */
body.search-takeover-open .drawer-icon { display: none; }

/* --- Narrow-viewport topbar tweaks --- */
@media (max-width: 819px) {
    .topbar { padding: 0 10px; }
    .topbar-left { gap: 4px; }
    .topbar-right { gap: 6px; }
}

/* ============================================================
   AUDIO PLAYER — bar + fullscreen expansion
   ============================================================ */

/* Override old audio-player to new player design */
.audio-player {
    height: 72px !important;
    transition: height 380ms cubic-bezier(.22, 1, .36, 1) !important;
    overflow: hidden !important;
    background: var(--secondary-background) !important;
    box-shadow: 0 -2px 5px rgba(0,0,0,.3) !important;
    position: fixed !important;
    bottom: 0 !important;
    z-index: 50 !important;
    width: 100% !important;
}
.audio-player.expanded {
    height: 100dvh !important;
}

/* Backdrop blur — hidden until expanded */
.player-fs-backdrop {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: blur(48px) saturate(1.1);
    transform: scale(1.2);
    opacity: 0;
    transition: opacity 380ms cubic-bezier(.22, 1, .36, 1);
    z-index: 0; pointer-events: none;
}
.audio-player.expanded .player-fs-backdrop { opacity: .55; }

.player-fs-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--background-color) 80%, transparent) 0%,
        var(--background-color) 100%);
    opacity: 0;
    transition: opacity 380ms cubic-bezier(.22, 1, .36, 1);
    z-index: 1; pointer-events: none;
}
.audio-player.expanded .player-fs-overlay { opacity: 1; }

/* Floating cover removed — artwork is now inline in fullscreen layout */

/* Fullscreen layout — hidden until expanded */
.player-fs {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    padding: 18px 24px 32px;
    opacity: 0; transform: translateY(12px);
    pointer-events: none;
    transition:
        opacity 200ms ease-out 100ms,
        transform 280ms cubic-bezier(.22,1,.36,1) 100ms;
    z-index: 3;
    overflow-y: auto;
}
.audio-player.expanded .player-fs {
    opacity: 1; transform: translateY(0);
    pointer-events: auto;
}

/* Bar fades out when expanded */
.audio-player.expanded .player-bar {
    opacity: 0 !important;
    pointer-events: none !important;
}

.player-fs-topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.player-fs-eyebrow {
    font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-secondary-color);
}

.player-fs-main {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 720px; width: 100%;
    margin: 0 auto;
    padding-bottom: 24px;
}

.player-fs-cover-slot {
    width: 100%;
    max-width: min(44vh, 360px);
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.player-fs-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.player-fs-meta { text-align: center; width: 100%; }
.player-fs-podcast {
    font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--accent-color); margin-bottom: 8px;
}
.player-fs-title {
    font-family: var(--font-body); font-weight: 600;
    font-size: clamp(22px, 4vw, 36px);
    line-height: 1.1; margin-bottom: 8px; color: var(--text-color);
}
.player-fs-desc {
    font-size: 14px; line-height: 1.55;
    color: var(--text-secondary-color);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; max-width: 560px; margin: 0 auto;
}

.player-fs-scrub-area {
    display: flex; flex-direction: row; align-items: center; gap: 8px;
    padding: 0 6px; width: 100%;
}

.player-fs-controls {
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.player-fs-ctrl {
    position: relative;
    background: transparent; border: none; color: var(--text-color);
    cursor: pointer; width: 56px; height: 56px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color var(--dur-fast), transform 100ms;
}
.player-fs-ctrl:hover { background: rgba(255,255,255,.08); }
.player-fs-ctrl:active { transform: scale(.96); }
.player-fs-ctrl i { font-size: 28px; }
.player-fs-ctrl span {
    position: absolute;
    font-family: var(--font-mono); font-size: 10px; font-weight: 600;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.player-fs-ctrl-big { width: 80px; height: 80px; }
.player-fs-ctrl-big i { font-size: 72px; }
.player-fs-ctrl-big:hover { background: transparent; transform: scale(1.04); }
.player-fs-ctrl-big:active { transform: scale(.98); }

.player-fs-side-btns {
    display: flex; align-items: center; gap: 8px;
    min-width: 120px; /* matches 2×56px + 8px gap on right side */
}
.player-fs-side-btns--left { justify-content: flex-end; }

.player-fs-footer {
    display: flex; align-items: center; justify-content: center; gap: 14px;
}

/* ============================================================
   QUEUE PANEL — right-side slide-over
   ============================================================ */
.queue-scrim {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0; pointer-events: none;
    transition: opacity 250ms ease-out;
    z-index: 150;
}
.queue-scrim.is-open { opacity: 1; pointer-events: auto; }

.queue-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(420px, 100vw);
    background: var(--secondary-background);
    box-shadow: -8px 0 32px rgba(0,0,0,.35);
    z-index: 160;
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(.22, 1, .36, 1);
    display: flex; flex-direction: column;
    border-left: 1px solid rgba(0,0,0,.25);
}
.queue-panel.is-open { transform: translateX(0); }

.queue-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(128,128,128,.15);
    flex-shrink: 0;
}
.queue-title {
    font-family: var(--font-body); font-weight: 600;
    font-size: 22px; color: var(--text-color);
}
.queue-sub { font-size: 12px; color: var(--text-secondary-color); margin-top: 2px; }
.queue-head-actions { display: flex; align-items: center; gap: 4px; }

.queue-nowplaying {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--hover-color) 22%, transparent), transparent);
    border-bottom: 1px solid rgba(128,128,128,.15);
    flex-shrink: 0;
}
.queue-nowplaying-art {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    object-fit: cover; flex-shrink: 0;
}
.queue-now-eyebrow {
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent-color); margin-bottom: 2px;
}
.queue-now-title {
    font-size: 13px; font-weight: 500; color: var(--text-color);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-now-equalizer {
    display: inline-flex; gap: 2px; align-items: flex-end;
    height: 14px; flex-shrink: 0;
}
.queue-now-equalizer span {
    display: block; width: 3px;
    background: var(--accent-color); border-radius: 1px;
    animation: eq-bounce 800ms ease-in-out infinite;
}
.queue-now-equalizer span:nth-child(1) { animation-delay: 0ms; height: 60%; }
.queue-now-equalizer span:nth-child(2) { animation-delay: 150ms; height: 100%; }
.queue-now-equalizer span:nth-child(3) { animation-delay: 300ms; height: 75%; }
@keyframes eq-bounce {
    0%, 100% { transform: scaleY(.4); transform-origin: bottom; }
    50%       { transform: scaleY(1);  transform-origin: bottom; }
}

.queue-list { flex: 1; overflow-y: auto; padding: 8px 8px 18px; }

.queue-item {
    display: grid;
    grid-template-columns: 24px 44px 1fr auto;
    gap: 10px; align-items: center;
    padding: 8px 10px; border-radius: var(--radius-md);
    cursor: pointer; user-select: none;
    transition: background-color var(--dur-fast), opacity 100ms;
}
.queue-item:hover { background: var(--container-background); }
.queue-item.is-dragging { opacity: 0.4; cursor: grabbing; }
.queue-item-art-wrap {
    position: relative;
    width: 44px; height: 44px;
    flex-shrink: 0;
    cursor: pointer;
}
.queue-item-art {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    object-fit: cover; display: block;
}
.queue-item-art-overlay {
    position: absolute; inset: 0;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 17px;
    opacity: 0;
    transition: opacity var(--dur-fast);
}
.queue-item:hover .queue-item-art-overlay,
.queue-item-art-overlay.is-playing { opacity: 1; }
.queue-item-body { min-width: 0; flex: 1; }
.queue-item-title-link { cursor: pointer; }
.queue-item-title-link:hover { text-decoration: underline; text-decoration-color: var(--text-secondary-color); }
.queue-item-title {
    font-size: 13px; font-weight: 500; color: var(--text-color);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 2px;
}
.queue-item-sub {
    display: flex; gap: 5px;
    font-size: 11px; color: var(--text-secondary-color);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-item-remove {
    background: transparent; border: none; color: var(--text-secondary-color);
    cursor: pointer; width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    transition: background-color var(--dur-fast), color var(--dur-fast), opacity var(--dur-fast);
    opacity: 0;
}
.queue-item:hover .queue-item-remove { opacity: 1; }
.queue-item-remove:hover { background: rgba(229,72,77,.15); color: var(--error-color); }

.queue-drag-handle {
    color: var(--text-secondary-color); cursor: grab;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}

.queue-empty {
    padding: 60px 20px; text-align: center;
    color: var(--text-secondary-color);
}
.queue-empty i { font-size: 56px; color: var(--accent-color); display: block; margin-bottom: 10px; }
.queue-empty-title { font-size: 16px; color: var(--text-color); margin-bottom: 4px; font-weight: 500; }
.queue-empty-sub { font-size: 13px; }

/* ============================================================
   SETTINGS — flat sections, no accordions
   ============================================================ */
.settings-page { padding: 0 0 40px; }

.settings-section {
    background: var(--container-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    overflow: visible;
}
.settings-section > .settings-section-head,
.settings-section > .settings-section-body > .settings-row:first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}
.settings-section > .settings-section-body > .settings-row:last-child {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}
.settings-section-head {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.settings-section-head i { font-size: 20px; color: var(--accent-color); flex-shrink: 0; }
.settings-section-title-row { display: flex; align-items: center; gap: 6px; }
.settings-section-title { font-size: 14px; font-weight: 600; color: var(--text-color); }
.settings-section-desc { font-size: 12px; color: var(--text-secondary-color); margin-top: 1px; }
.settings-section-body { padding: 2px 0; }

/* Sub-section title inside a settings-section-body */
.settings-subsection-title {
    font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-secondary-color);
    padding: 10px 20px 6px;
    border-top: 1px solid rgba(255,255,255,.04);
    margin-top: 4px;
}
.settings-subsection-title:first-child { border-top: none; margin-top: 0; }

/* "OR" divider between mutually-exclusive sync options */
.sync-option-divider {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 20px; margin: 2px 0;
    color: var(--text-secondary-color);
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.sync-option-divider::before,
.sync-option-divider::after {
    content: ""; flex: 1; height: 1px;
    background: rgba(255,255,255,.08);
}

/* Info tooltip button */
.info-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; border-radius: 50%;
    background: transparent; border: 1px solid var(--text-secondary-color);
    color: var(--text-secondary-color); font-size: 9px; font-weight: 700;
    cursor: default; flex-shrink: 0; line-height: 1; padding: 0;
    position: relative;
}
.info-btn::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px); left: 0;
    background: var(--secondary-background);
    color: var(--text-color); padding: 8px 12px;
    border-radius: 8px; font-size: 12px; font-weight: 400;
    width: max-content; max-width: 260px;
    white-space: normal; line-height: 1.45;
    opacity: 0; pointer-events: none;
    transition: opacity 120ms; z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,.07);
}
.info-btn:hover::before { opacity: 1; }

.settings-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px; gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    min-height: 48px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row > div:first-child { flex: 1; min-width: 0; }
.settings-row-label { font-size: 13px; font-weight: 500; color: var(--text-color); }
.settings-row-desc { font-size: 11px; color: var(--text-secondary-color); margin-top: 2px; line-height: 1.4; }
.settings-row-control { flex-shrink: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Toggle */
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
    width: 36px; height: 20px; border-radius: var(--radius-full);
    background: var(--unfilled-color);
    position: relative; flex-shrink: 0;
    transition: background-color 180ms;
}
.toggle input:checked + .toggle-track { background: var(--hover-color); }
.toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform 180ms cubic-bezier(.22,1,.36,1);
}
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(16px); }
.toggle-label { font-size: 13px; color: var(--text-secondary-color); min-width: 24px; }

/* Tabs (user vs admin) */
.settings-tabs {
    display: flex; gap: 6px;
    margin-bottom: 20px;
}
.settings-tab {
    padding: 7px 18px; border-radius: var(--radius-full);
    font-size: 14px; font-weight: 500;
    background: transparent; border: none;
    color: var(--text-secondary-color); cursor: pointer;
    transition: background-color var(--dur-fast), color var(--dur-fast);
}
.settings-tab.is-active {
    background: var(--accent-color);
    color: #fff;
}
.settings-tab:hover:not(.is-active) { background: rgba(255,255,255,.06); color: var(--text-color); }

/* ── Theme picker card grid ───────────────────────────────────────── */
.theme-card-grid,
.theme-expanded-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.theme-card-item {
    transition: transform 150ms cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-card-item:hover {
    transform: translateY(-2px);
}

.theme-card-item:focus-visible {
    outline: 2px solid var(--hover-color);
    outline-offset: 2px;
    border-radius: 10px;
}

.theme-show-more-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 150ms;
}

.theme-show-more-btn:hover {
    opacity: 0.82;
}

.theme-expanded-grid {
    animation: themeGridFadeIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes themeGridFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Custom themes divider */
.custom-themes-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary-color);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.custom-themes-divider::before,
.custom-themes-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
    opacity: 0.3;
}

/* Delete button on custom theme cards */
.custom-theme-delete-btn {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    border-radius: 4px;
    color: #fff;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    opacity: 0;
    transition: opacity 150ms;
}

.theme-card-item:hover .custom-theme-delete-btn {
    opacity: 1;
}

.custom-theme-delete-btn:hover {
    background: rgba(200, 30, 30, 0.75);
}

/* Custom theme creator */
.custom-theme-preview-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.custom-theme-preview-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary-color);
    min-width: 52px;
}

.custom-theme-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-theme-name-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    min-width: 110px;
}

.custom-theme-name-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--container-background);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    transition: border-color 150ms;
}

.custom-theme-name-input:focus {
    border-color: var(--accent-color);
}

.custom-theme-colors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
}

@media (max-width: 540px) {
    .custom-theme-colors-grid {
        grid-template-columns: 1fr;
    }
}

.custom-theme-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-theme-color-label {
    font-size: 13px;
    color: var(--text-secondary-color);
    min-width: 130px;
    flex-shrink: 0;
}

.custom-theme-color-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-theme-color-picker {
    width: 36px;
    height: 28px;
    border: none;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    background: var(--container-background);
    border: 1px solid var(--border-color);
}

.custom-theme-color-hex {
    font-size: 12px;
    font-family: monospace;
    color: var(--text-secondary-color);
}

.custom-theme-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--button-color);
    color: var(--button-text-color);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 150ms;
}

.custom-theme-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.custom-theme-submit-btn:not(:disabled):hover {
    opacity: 0.82;
}


/* ── Extended Stats ── */
.extended-stats-section {
    margin-top: 1.5rem;
}

.extended-stats-section-title {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.insights-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.insights-row-2col {
    grid-template-columns: 1fr 1fr;
}

.chart-card {
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.chart-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.chart-bar { fill: var(--accent-color); opacity: 0.85; }
.chart-label { font-size: 10px; fill: var(--text-secondary-color, #888); }
.chart-value-label { font-size: 9px; fill: var(--text-secondary-color, #888); }

.badge-icon { font-size: 2rem; color: var(--accent-color); display: block; margin-bottom: 0.4rem; }
.badge-name { font-size: 1rem; font-weight: 600; color: var(--text-color); }
.streak-number { font-size: 2rem; font-weight: 700; color: var(--accent-color); line-height: 1; }
.completion-rate-value { font-size: 2rem; font-weight: 700; color: var(--accent-color); line-height: 1; }
.longest-ep-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}
.longest-ep-podcast { font-size: 0.75rem; color: var(--text-secondary-color, #888); }

.top-podcast-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.top-podcast-artwork {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.top-podcast-bar-container { flex: 1; min-width: 0; }
.top-podcast-name {
    font-size: 0.78rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 4px;
}
.top-podcast-bar-track {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}
.top-podcast-bar-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    transition: width 0.4s ease;
}
.top-podcast-time {
    font-size: 0.72rem;
    color: var(--text-secondary-color, #888);
    flex-shrink: 0;
    min-width: 3.2rem;
    text-align: right;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    color: var(--text-color);
}
.category-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .insights-row { grid-template-columns: 1fr; }
    .insights-row-2col { grid-template-columns: 1fr; }
}

/* ── Search Page (sp-*) ─────────────────────────────────────────────────────
   All classes resolve to existing theme CSS vars so the page re-skins across
   all 24 themes automatically. Prefix: sp- (search page).
   ─────────────────────────────────────────────────────────────────────────── */

/* ---- Collapsing sticky header ---- */
.sp-head {
    position: sticky; top: 0; z-index: 8;
    background: var(--background-color);
    padding: 40px 32px 20px;
    transition: padding 380ms cubic-bezier(.16,1,.3,1);
}

.sp-head.is-collapsed {
    padding-top: 14px; padding-bottom: 12px;
    background: color-mix(in srgb, var(--background-color) 82%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 6px 20px -12px rgba(0,0,0,.6);
}

/* Headline — collapses to zero height + fades when searching */
.sp-head-titles {
    text-align: center;
    overflow: hidden;
    max-height: 140px; opacity: 1;
    margin-bottom: 20px;
    transition: max-height 380ms cubic-bezier(.16,1,.3,1),
                opacity 240ms ease-out,
                margin-bottom 380ms cubic-bezier(.16,1,.3,1);
}

.sp-head.is-collapsed .sp-head-titles {
    max-height: 0; opacity: 0; margin-bottom: 0;
}

.sp-title {
    font-weight: 600;
    font-size: 34px; line-height: 1.05; margin: 0 0 7px;
    color: var(--text-color);
}

.sp-subtitle {
    font-size: 13.5px; color: var(--text-secondary-color); margin: 0;
}

/* Input row */
.sp-input-row {
    display: flex; align-items: center; gap: 10px;
    max-width: 640px; margin: 0 auto;
    transition: max-width 380ms cubic-bezier(.16,1,.3,1);
}

.sp-head.is-collapsed .sp-input-row { max-width: 100%; }

.sp-input {
    flex: 1; min-width: 0;
    display: flex; align-items: center; gap: 12px;
    height: 56px; padding: 0 18px;
    background: var(--container-background);
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 6px 20px -10px rgba(0,0,0,.5);
    transition: height 380ms cubic-bezier(.16,1,.3,1),
                border-color 180ms, box-shadow 240ms,
                padding 380ms cubic-bezier(.16,1,.3,1);
}

.sp-head.is-collapsed .sp-input { height: 44px; padding: 0 14px; box-shadow: none; }
.sp-input.is-focused { border-color: var(--hover-color); box-shadow: 0 0 0 3px rgba(93,128,170,.22); }

.sp-input > i.sp-search-ico {
    font-size: 22px; color: var(--text-secondary-color); flex-shrink: 0;
    transition: font-size 380ms cubic-bezier(.16,1,.3,1);
}
.sp-head.is-collapsed .sp-input > i.sp-search-ico { font-size: 18px; }

.sp-input input {
    flex: 1; min-width: 0;
    background: transparent; border: none; outline: none;
    color: var(--text-color); font-family: inherit;
    font-size: 17px;
    transition: font-size 380ms cubic-bezier(.16,1,.3,1);
}
.sp-head.is-collapsed .sp-input input { font-size: 14px; }
.sp-input input::placeholder { color: var(--text-secondary-color); opacity: .85; }

.sp-kbd {
    font-size: 11px;
    color: var(--text-secondary-color);
    border: 1px solid rgba(255,255,255,.14); border-radius: 5px;
    padding: 2px 7px; opacity: .7; flex-shrink: 0;
}

.sp-clear {
    width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
    flex-shrink: 0; background: rgba(255,255,255,.10); color: var(--text-color);
    display: inline-flex; align-items: center; justify-content: center;
}
.sp-clear:hover { background: rgba(255,255,255,.18); }
.sp-clear i { font-size: 13px; }

/* Filters button — hidden until header collapses (desktop) */
.sp-filters-btn {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 7px;
    height: 44px; padding: 0 14px; border-radius: 999px;
    background: var(--container-background); color: var(--text-color);
    border: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500;
    white-space: nowrap;
    max-width: 0; padding-left: 0; padding-right: 0; opacity: 0; overflow: hidden;
    transition: max-width 380ms cubic-bezier(.16,1,.3,1),
                opacity 240ms ease-out,
                padding 380ms cubic-bezier(.16,1,.3,1);
}
.sp-head.is-collapsed .sp-filters-btn { max-width: 140px; padding: 0 14px; opacity: 1; }
.sp-filters-btn i { font-size: 16px; }
.sp-filters-badge {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--hover-color); color: #fff;
    font-size: 11px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ---- Filter chip rail ---- */
.sp-chips {
    display: flex; gap: 8px; flex-wrap: wrap;
    justify-content: center;
    max-width: 640px; margin: 16px auto 0;
    transition: max-width 380ms cubic-bezier(.16,1,.3,1),
                margin-top 380ms cubic-bezier(.16,1,.3,1);
}
.sp-head.is-collapsed .sp-chips {
    max-width: 100%; margin-top: 12px;
    justify-content: flex-start; flex-wrap: nowrap;
    overflow-x: auto; padding-bottom: 2px; scrollbar-width: none;
}
.sp-head.is-collapsed .sp-chips::-webkit-scrollbar { display: none; }

.sp-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 13px; border-radius: 8px;
    background: var(--container-background); color: var(--text-color);
    font-size: 13px; font-weight: 500;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background-color 150ms, color 150ms, border-color 150ms, transform 100ms;
}
.sp-chip:hover { border-color: var(--accent-color); }
.sp-chip:active { transform: scale(.97); }
.sp-chip i { font-size: 15px; opacity: .85; }
.sp-chip-count {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary-color); font-weight: 400; font-size: 12px;
}
.sp-chip.is-active {
    background: var(--accent-color); color: var(--background-color);
    border-color: var(--accent-color);
}
.sp-chip.is-active i { opacity: 1; }
.sp-chip.is-active .sp-chip-count { color: var(--background-color); opacity: .65; }

/* ---- Body (discovery / results) ---- */
.sp-body { padding: 4px 32px 36px; }

.sp-sec-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin: 24px 0 12px;
}
.sp-sec-head:first-child { margin-top: 14px; }
.sp-sec-head h3 {
    font-weight: 600; font-size: 13px;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-secondary-color); margin: 0;
}
.sp-sec-head a {
    font-size: 12px; color: var(--link-color); text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
}
.sp-sec-head a i { font-size: 14px; }

.sp-results-count { font-size: 13.5px; color: var(--text-color); }
.sp-results-count em { font-style: normal; font-weight: 600; }

/* Recent search pills */
.sp-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-recent-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 10px 8px 11px; border-radius: 8px;
    background: var(--container-background); font-size: 13px;
    color: var(--text-color); cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 150ms;
}
.sp-recent-pill:hover { border-color: var(--accent-color); }
.sp-recent-pill > i { font-size: 14px; color: var(--text-secondary-color); }
.sp-recent-x {
    width: 18px; height: 18px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-secondary-color); margin-left: 2px;
}
.sp-recent-x:hover { background: rgba(255,255,255,.12); color: var(--text-color); }
.sp-recent-x i { font-size: 11px; }

/* Most-played shelf */
.sp-shelf {
    display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
    scrollbar-width: none;
    margin: 0 -32px; padding-left: 32px; padding-right: 32px;
}
.sp-shelf::-webkit-scrollbar { display: none; }
.sp-tile { flex: 0 0 132px; width: 132px; cursor: pointer; }
.sp-tile-cover {
    aspect-ratio: 1/1; border-radius: 10px; background-size: cover;
    background-position: center; overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,.18);
    transition: transform 150ms;
    background-color: var(--secondary-background);
}
.sp-tile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-tile:hover .sp-tile-cover { transform: translateY(-2px); }
.sp-tile-title {
    font-size: 13px; font-weight: 600; line-height: 1.25; margin-top: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; color: var(--text-color);
}
.sp-tile-sub { font-size: 11.5px; color: var(--text-secondary-color); margin-top: 2px; }

/* Category grid */
.sp-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.sp-cat {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 14px; border-radius: 8px;
    background: var(--container-background); cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 150ms, background-color 150ms;
}
.sp-cat:hover { border-color: var(--accent-color); background: var(--secondary-background); }
.sp-cat.is-active {
    border-color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color) 15%, var(--container-background));
}
.sp-cat-name { font-size: 13px; font-weight: 500; color: var(--text-color); text-align: center; }
.sp-active-cats { margin-top: 8px; }

/* ---- Result rows ---- */
.sp-result {
    display: grid; grid-template-columns: 60px 1fr auto;
    gap: 14px; align-items: center;
    padding: 12px 14px; border-radius: 10px;
    background: var(--container-background);
    margin-bottom: 10px; cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 150ms, transform 100ms;
    animation: sp-row-in 320ms cubic-bezier(.16,1,.3,1) both;
}
.sp-result:hover { border-color: var(--accent-color); }

@keyframes sp-row-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sp-result-art {
    width: 60px; height: 60px; border-radius: 9px;
    background-color: var(--secondary-background);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.sp-result-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-result-body { min-width: 0; }
.sp-result-eyebrow {
    font-size: 11px; color: var(--text-secondary-color);
    text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 3px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.sp-result-title {
    font-size: 14.5px; font-weight: 600; line-height: 1.3; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden; color: var(--text-color);
}
.sp-result-snippet {
    font-size: 12.5px; line-height: 1.45; color: var(--text-secondary-color);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 6px;
}
.sp-result mark {
    background: rgba(232,177,74,.26); color: inherit;
    padding: 0 2px; border-radius: 3px;
}
.sp-result-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 11.5px; color: var(--text-secondary-color); flex-wrap: wrap;
}
.sp-result-meta i { font-size: 13px; vertical-align: -1px; }
.sp-mdot {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--text-secondary-color); opacity: .5;
}
.sp-status { font-weight: 500; }
.sp-status.is-prog  { color: var(--prog-bar-color, #5D80AA); }
.sp-status.is-played { color: var(--success-color, #30A46C); }
.sp-status.is-saved  { color: var(--warning-color, #E8B14A); }

.sp-result-actions { display: flex; align-items: center; gap: 3px; }
.sp-result-actions .sp-ico-btn {
    width: 36px; height: 36px; border-radius: 999px; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text-color);
    transition: background-color 150ms;
}
.sp-result-actions .sp-ico-btn:hover { background: rgba(255,255,255,.07); }
.sp-result-actions .sp-ico-btn i { font-size: 18px; }
.sp-result-actions .sp-ico-play {
    background: var(--button-color); color: var(--button-text-color);
}
.sp-result-actions .sp-ico-play:hover { background: var(--hover-color); }
.sp-result-actions .sp-ico-play i { font-size: 16px; margin-left: 1px; }

/* Empty state */
.sp-noresults {
    text-align: center; padding: 56px 20px;
    color: var(--text-secondary-color);
}
.sp-noresults i { font-size: 44px; opacity: .5; margin-bottom: 12px; display: block; }
.sp-noresults h4 {
    font-size: 18px; font-weight: 600;
    color: var(--text-color); margin: 0 0 6px;
}
.sp-noresults p { font-size: 13.5px; margin: 0; }

/* Loading sentinel */
.sp-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 18px 0 8px;
    color: var(--text-secondary-color); font-size: 13px;
}
.sp-spinner {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.18);
    border-top-color: var(--accent-color);
    animation: sp-spin 700ms linear infinite;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }

.sp-select-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0 0 0.75rem;
}

/* Mobile bottom filter sheet */
.sp-sheet-scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40;
    opacity: 0; pointer-events: none; transition: opacity 220ms;
}
.sp-sheet-scrim.is-open { opacity: 1; pointer-events: auto; }
.sp-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
    background: var(--secondary-background);
    border-radius: 18px 18px 0 0; padding: 8px 16px 22px;
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(.16,1,.3,1);
}
.sp-sheet.is-open { transform: translateY(0); }
.sp-sheet-grip {
    width: 38px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,.2); margin: 8px auto 14px;
}
.sp-sheet h4 { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--text-color); }
.sp-sheet .sp-chips { flex-direction: column; max-width: 100%; margin: 0; }
.sp-sheet .sp-chip { justify-content: flex-start; width: 100%; }

/* ---- Mobile overrides ---- */
@media (max-width: 500px) {
    .sp-head { padding: 22px 16px 14px; }
    .sp-head.is-collapsed { padding-top: 12px; padding-bottom: 10px; }
    .sp-title { font-size: 25px; }
    .sp-body { padding: 4px 16px 28px; }
    .sp-shelf { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
    .sp-result { grid-template-columns: 52px 1fr auto; gap: 11px; padding: 10px 11px; }
    .sp-result-art { width: 52px; height: 52px; }
    .sp-result-actions .sp-ico-btn { width: 32px; height: 32px; }
    .sp-chips {
        flex-wrap: nowrap; overflow-x: auto;
        justify-content: flex-start; scrollbar-width: none;
    }
    .sp-chips::-webkit-scrollbar { display: none; }
}

/* Reduced motion: instant transitions, no entrance fade */
@media (prefers-reduced-motion: reduce) {
    .sp-head, .sp-head-titles, .sp-input, .sp-input > i.sp-search-ico,
    .sp-input input, .sp-filters-btn, .sp-chips, .sp-sheet {
        transition: none !important;
    }
    .sp-result { animation: none !important; }
}

/* ── Page Filter Bar (pfb-*) ─────────────────────────────────────────────────
   Consistent search-bar header used across Saved, History, Downloads,
   Episode Layout, and Podcasts — shares sp-* visual tokens.
   ─────────────────────────────────────────────────────────────────────────── */

.pfb-section { margin: 16px 0 20px; }

.pfb-bar {
    display: flex; align-items: center; gap: 10px;
}

/* sp-input inside pfb-bar: same pill/shadow look, compact 44px height */
.pfb-bar .sp-input {
    flex: 1; height: 44px; padding: 0 16px; gap: 10px;
}
.pfb-bar .sp-input:focus-within {
    border-color: var(--hover-color);
    box-shadow: 0 0 0 3px rgba(93,128,170,.22);
}
.pfb-bar .sp-input > i.sp-search-ico { font-size: 18px; }
.pfb-bar .sp-input input { font-size: 14px; }

/* Sort dropdown — same pill/shadow as sp-input */
.pfb-sort {
    flex-shrink: 0;
    display: flex; align-items: center;
    height: 44px; padding: 0 32px 0 16px;
    background: var(--container-background);
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 6px 20px -10px rgba(0,0,0,.5);
    min-width: 150px;
    position: relative;
    transition: border-color 180ms, box-shadow 240ms;
}
.pfb-sort:focus-within {
    border-color: var(--hover-color);
    box-shadow: 0 0 0 3px rgba(93,128,170,.22);
}

.pfb-sort-select {
    flex: 1; min-width: 0; width: 100%;
    background: transparent; border: none; outline: none;
    color: var(--text-color); font-family: inherit; font-size: 13px; font-weight: 500;
    appearance: none; -webkit-appearance: none; cursor: pointer;
}

.pfb-sort-arrow {
    font-size: 14px; color: var(--text-secondary-color);
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%); pointer-events: none;
}

/* Alert chip state (danger / destructive) */
.sp-chip.is-alert {
    background: var(--alert-color);
    color: var(--text-color);
    border-color: var(--alert-color);
}
.sp-chip.is-alert:hover { border-color: color-mix(in srgb, var(--alert-color) 80%, white); }

/* Chip row for pfb pages — left-aligned, single-line horizontal scroll */
.pfb-chips {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    max-width: 100%;
    margin: 12px 0 0;
}
.pfb-chips::-webkit-scrollbar { display: none; }

/* Mobile icon — hidden on desktop */
.pfb-sort-icon-mobile { display: none; }

@media (max-width: 640px) {
    .pfb-bar { gap: 6px; }

    /* Collapse sort dropdown to a 44×44 icon-only button */
    .pfb-sort {
        min-width: unset;
        width: 44px;
        padding: 0;
        justify-content: center;
    }
    /* Funnel icon visible on mobile */
    .pfb-sort-icon-mobile {
        display: block;
        font-size: 18px;
        pointer-events: none;
        color: var(--text-color);
    }
    /* Select overlaid invisibly so it's still tappable */
    .pfb-sort-select {
        position: absolute;
        inset: 0;
        opacity: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    /* Hide caret arrow on mobile */
    .pfb-sort-arrow { display: none; }

    /* Hide text labels from chip buttons (custom feed, list/grid) */
    .pfb-chip-text { display: none; }
}

/* ============================================================
   PODCAST DETAIL — immersive banner header (desktop)
   Adapted from the Pinepods Design System "Variant A" exploration.
   All colors resolve to the existing theme variables so every
   theme keeps working; fonts inherit the app default.
   ============================================================ */
.pd-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    background-color: var(--bonus-color);
}
.pd-banner-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.3);
    filter: blur(54px) saturate(1.35) brightness(.75);
    opacity: .85;
    pointer-events: none;
}
.pd-banner-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--background-color) 30%, transparent) 0%,
        color-mix(in srgb, var(--background-color) 62%, transparent) 52%,
        var(--background-color) 100%);
    pointer-events: none;
}
.pd-banner-inner {
    position: relative;
    padding: 28px 32px 26px;
}
.pd-banner-top {
    display: flex;
    align-items: flex-end;
    gap: 28px;
}
.pd-banner-cover {
    width: 184px;
    height: 184px;
    flex-shrink: 0;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .45);
}
.pd-banner-head {
    min-width: 0;
    flex: 1;
    padding-bottom: 6px;
}

.pd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.pd-eyebrow i { font-size: 14px; }

.pd-banner-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 0;
}
.pd-banner-title {
    font-size: clamp(28px, 3.2vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--text-color);
    font-weight: 700;
    margin: 0;
    text-wrap: balance;
}

.pd-banner-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    color: var(--text-secondary-color);
    font-size: 14px;
}
.pd-banner-meta .pd-author strong {
    color: var(--text-color);
    font-weight: 600;
}
.pd-banner-meta .pd-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pd-banner-meta .pd-stat i {
    font-size: 15px;
    color: var(--accent-color);
}
.pd-banner-meta .pd-dot { opacity: .4; }

.pd-banner-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

/* Primary subscribe pill */
.pd-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--accent-color);
    color: var(--background-color);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-color) 38%, transparent);
    transition: transform 140ms var(--ease-out), background-color 160ms;
    white-space: nowrap;
}
.pd-btn-primary i { font-size: 18px; }
.pd-btn-primary:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}
.pd-btn-primary.is-subscribed {
    background: color-mix(in srgb, var(--accent-color) 18%, transparent);
    color: var(--accent-color);
    box-shadow: none;
    border: 1px solid color-mix(in srgb, var(--accent-color) 45%, transparent);
}

/* Round icon actions (download / website / settings / rss / funding) */
.pd-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 150ms, transform 120ms;
}
.pd-icon-btn i { font-size: 18px; }
.pd-icon-btn:hover {
    background: var(--hover-color);
    transform: translateY(-1px);
}

/* Collapsible description inside the banner */
.pd-banner-desc {
    margin-top: 22px !important;
    margin-bottom: 0 !important;
    max-width: 70ch;
}

/* Host avatar cluster */
.pd-banner-hosts {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.pd-host-stack { display: flex; }
.pd-host-avatar-wrap {
    margin-left: -12px;
    cursor: pointer;
    transition: transform 140ms var(--ease-out);
}
.pd-host-avatar-wrap:first-child { margin-left: 0; }
.pd-host-avatar-wrap:hover {
    transform: translateY(-3px);
    z-index: 2;
}
.pd-host-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--background-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
    background: var(--secondary-background);
    display: block;
}
.pd-host-avatar-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary-color);
}
.pd-host-avatar-ph i { font-size: 22px; }
.pd-host-label {
    font-size: 13.5px;
    color: var(--text-secondary-color);
    line-height: 1.45;
}
.pd-host-by {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .6;
    margin-bottom: 2px;
}
.pd-host-names {
    color: var(--text-color);
    font-weight: 600;
}

/* No-hosts message + Podcast Index unmatched warning */
.pd-banner-nohosts { margin-top: 22px; }
.pd-banner-nohosts-msg {
    color: var(--text-secondary-color);
    font-size: 13.5px;
    margin: 0;
}
.pd-banner-nohosts-link {
    color: var(--link-color);
    text-decoration: underline;
    margin-left: 4px;
}
.pd-banner-warning { margin-top: 22px; }
.pd-banner-warning .import-box { width: 100%; }

/* Categories */
.pd-banner-cats {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Narrow desktop / split-screen: stack the cover above the head */
@media (max-width: 768px) {
    .pd-banner-inner { padding: 20px; }
    .pd-banner-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
    .pd-banner-cover {
        width: 140px;
        height: 140px;
    }
}

/* ============================================================
   EPISODE DETAIL (/episode) — hero + panes (desktop)
   Adapted from the Pinepods Design System "EpisodeScreen".
   Colors resolve to existing theme variables; fonts inherit.
   ============================================================ */
.ep-hero {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    background-color: var(--bonus-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    padding: 24px;
    margin-bottom: 20px;
}
.ep-hero-cover {
    flex-shrink: 0;
    width: 200px;
    max-width: 30%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .34);
    transition: transform 160ms var(--ease-out);
}
.ep-hero-cover:hover { transform: translateY(-2px); }
/* Static (non-navigable) cover/show — used on the public shared-episode page */
.ep-hero-cover-static { cursor: default; }
.ep-hero-cover-static:hover { transform: none; }
.ep-hero-show.is-static { cursor: default; }
.ep-hero-show.is-static:hover { text-decoration: none; }
.ep-hero-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ep-hero-body {
    min-width: 0;
    flex: 1;
}

.ep-hero-show {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
    width: fit-content;
}
.ep-hero-show:hover { text-decoration: underline; }
.ep-hero-show i { font-size: 15px; }

.ep-hero-title {
    font-size: clamp(22px, 2.6vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text-color);
    font-weight: 700;
    margin: 10px 0 0;
    text-wrap: balance;
}

.ep-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: var(--text-secondary-color);
    font-size: 14px;
}
.ep-hero-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.ep-hero-meta i { font-size: 15px; opacity: .85; }
.ep-meta-dot { opacity: .4; }
.ep-meta-played { color: var(--success-color); }
.ep-meta-played i { color: var(--success-color); opacity: 1; }

.ep-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* Primary play pill */
.ep-hero-play {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--accent-color);
    color: var(--background-color);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-color) 38%, transparent);
    transition: transform 140ms var(--ease-out), background-color 160ms;
    white-space: nowrap;
}
.ep-hero-play i { font-size: 18px; }
.ep-hero-play:hover { background: var(--hover-color); transform: translateY(-2px); }

/* Secondary chip actions (queue / save / download / complete / share / transcript) */
.ep-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 150ms, transform 120ms, border-color 150ms;
}
.ep-action i { font-size: 17px; }
.ep-action:hover { background: var(--hover-color); transform: translateY(-1px); }
.ep-action:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ep-action.is-active {
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
    border-color: color-mix(in srgb, var(--accent-color) 45%, transparent);
    color: var(--accent-color);
}
.ep-actions-note {
    font-size: 13.5px;
    opacity: .8;
    align-self: center;
}

/* ----- Content panes (People / Episode notes) ----- */
.ep-pane {
    background-color: var(--container-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
    padding: 20px;
    margin-bottom: 20px;
}
.ep-pane-head {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 14px;
}

/* Tab selector (Notes / Chapters / Transcript / People) */
.ep-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.ep-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 140ms, border-color 140ms;
}
.ep-tab i { font-size: 17px; }
.ep-tab:hover { color: var(--text-color); }
.ep-tab.is-active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.ep-tab-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
    color: var(--accent-color);
}

/* Chapters list */
.ep-chapters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ep-chapter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color 140ms;
}
.ep-chapter:hover { background: var(--hover-color); }
.ep-chapter.is-current {
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}
.ep-chapter.is-current .ep-chapter-title { color: var(--accent-color); font-weight: 600; }
.ep-chapter.is-current .ep-chapter-play {
    background: var(--accent-color);
    color: var(--background-color);
}

/* Inline transcript (Transcript tab) */
.ep-transcript-content {
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.6;
}
.ep-transcript-content p { margin: 0 0 8px; }
.ep-chapter-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent-color) 16%, transparent);
    color: var(--accent-color);
    flex-shrink: 0;
}
.ep-chapter-play i { font-size: 14px; }
.ep-chapter-num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary-color);
    opacity: .7;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}
.ep-chapter-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.ep-chapter-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-chapter-time {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-secondary-color);
    flex-shrink: 0;
}

/* People cards */
.ep-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ep-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--secondary-background);
    cursor: pointer;
    transition: transform 160ms var(--ease-out), border-color 160ms;
    min-width: 0;
}
.ep-person:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent-color) 45%, transparent);
}
.ep-person-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--background-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.ep-person-avatar-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary-color);
}
.ep-person-avatar-ph i { font-size: 22px; }
.ep-person-body { min-width: 0; }
.ep-person-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-person-role {
    display: inline-block;
    margin-top: 3px;
    font-size: 11px;
    color: var(--text-secondary-color);
    opacity: .8;
}

/* No-hosts message */
.ep-nohosts-msg {
    color: var(--text-secondary-color);
    font-size: 13.5px;
    margin: 0;
}
.ep-nohosts-link {
    color: var(--link-color);
    text-decoration: underline;
    margin-left: 4px;
}

/* Episode notes description inherits the existing description container styling */
.ep-about .episode-description-container {
    color: var(--text-color);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .ep-hero {
        flex-direction: column;
        gap: 18px;
        padding: 18px;
    }
    .ep-hero-cover {
        width: 150px;
        max-width: 50%;
    }
}
