/* podcast-styles.css - Empires to Ashes Podcast Styling */

:root {
    --audio-controls-scale: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Section */
.header {
    background: url('/assets/e2a-bg.webp') center center / cover no-repeat;
    padding: 60px 20px 40px;
    text-align: center;
    border-bottom: 2px solid #8b0000;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.header h1 {
    font-size: 3.5em;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #912424;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.75);
    padding: 15px 30px;
    border-radius: 8px;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tagline {
    font-size: 1.2em;
    color: #8d3f3f;
    font-style: italic;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.75);
    padding: 10px 25px;
    border-radius: 6px;
    display: inline-block;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Season Selector */
.season-selector {
    text-align: center;
    margin: 40px 0;
    position: relative;
    z-index: 10;
}

.season-selector label {
    font-size: 1.1em;
    margin-right: 15px;
    color: #c0c0c0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.season-dropdown {
    background: rgba(30, 30, 30, 0.9);
    color: #e0e0e0;
    border: 2px solid #8b0000;
    padding: 12px 20px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 300px;
}

.season-dropdown:hover {
    background: rgba(139, 0, 0, 0.2);
    border-color: #ff0000;
}

.season-dropdown option {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 10px;
}

/* Season Navigation */
.season-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.btn-season-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #851da7, #24042e);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-season-nav:hover {
    background: linear-gradient(135deg, #a024d1, #3a0654);
    transform: translateY(-3px);
}

.btn-season-nav:active {
    transform: translateY(-1px);
}

.btn-season-nav .nav-icon {
    font-size: 1.3em;
    font-weight: bold;
}

.btn-prev {
    margin-right: auto;
}

.btn-next {
    margin-left: auto;
}

/* Responsive adjustments for season navigation */
@media (max-width: 768px) {
    .season-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .btn-season-nav {
        width: 100%;
        max-width: 300px;
    }

    .btn-prev,
    .btn-next {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .btn-season-nav {
        font-size: 0.9em;
        padding: 10px 20px;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Season Info */
.season-info {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(139, 0, 0, 0.3);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.season-title {
    font-size: 2.5em;
    color: #ff6b6b;
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: 2px;
}

.season-description {
    font-size: 1.2em;
    color: #c0c0c0;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Play All Button */
.play-all-wrapper {
    margin-top: 20px;
}

.btn-play-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #851da7, #24042e);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-play-all:hover {
    background: linear-gradient(135deg, #a024d1, #3a0654);
    transform: translateY(-3px);
}

.btn-play-all:active {
    transform: translateY(-1px);
}

.btn-play-all .play-icon {
    font-size: 1.2em;
    font-style: normal;
}

/* Playlist Navigation */
.playlist-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 8px 0;
}

.playlist-position {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.btn-prev-episode,
.btn-next-episode {
    white-space: nowrap;
}

.btn-prev-episode:disabled,
.btn-next-episode:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Episodes Grid */
.episodes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.2s forwards;
}

/* 2 columns on larger screens */
@media (min-width: 992px) {
    .episodes {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Episode Card */
.episode-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

.episode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.05), transparent);
    transition: left 0.5s ease;
}

.episode-card:hover::before {
    left: 100%;
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #8b0000;
}

.episode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.episode-number {
    background: linear-gradient(135deg, #8b0000, #660000);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.episode-title {
    font-size: 1.8em;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.episode-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.episode-description {
    color: #4a4a4a;
    margin-bottom: 25px;
    line-height: 1.7;
}

/* Play Podcast Button */
.play-podcast-wrapper {
    /* background: #f5f5f5; */
    padding: 20px;
    /* border-radius: 8px; */
    /* border: 1px solid #e0e0e0; */
    text-align: center;
}

.btn-play-podcast {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #851da7, #24042e);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /* box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3); */
}

.btn-play-podcast:hover {
    background: linear-gradient(135deg, #a00000, #8b0000);
    transform: translateY(-3px);
    /* box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4); */
}

.btn-play-podcast:active {
    transform: translateY(-1px);
}

.play-icon {
    font-size: 1.2em;
    font-style: normal;
}

/* Audio Modal */
.audio-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.audio-modal.show {
    display: block;
}

.audio-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.audio-modal-header {
    background: linear-gradient(135deg, #8b0000, #660000);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audio-modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.audio-modal-body {
    padding: 30px;
}

/* Audio Player Styling */
.audio-player-wrapper {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    position: relative;
}

audio {
    width: 100%;
    height: 54px;
    outline: none;
    font-size: 18px;
}

/* Increase size of audio controls */
audio::-webkit-media-controls-panel {
    height: 54px;
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display,
audio::-webkit-media-controls-timeline,
audio::-webkit-media-controls-volume-slider,
audio::-webkit-media-controls-mute-button {
    transform: scale(var(--audio-controls-scale));
}

/* Firefox */
audio::-moz-media-controls-panel {
    height: 54px;
}

audio::-moz-media-controls-play-button,
audio::-moz-media-controls-time-display,
audio::-moz-media-controls-volume-slider,
audio::-moz-media-controls-mute-button {
    transform: scale(var(--audio-controls-scale));
}

/* Custom Audio Control Buttons */
.custom-audio-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.btn-audio {
    background: linear-gradient(135deg, #8b0000, #660000);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9em;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.btn-audio:hover {
    background: linear-gradient(135deg, #a00000, #8b0000);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn-audio:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.coming-soon-msg {
    text-align: center;
    font-weight: 700;
    color: #1a1a1a;
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.95em;
}

/* Share Button */
.share-button,
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #1f1f1f;
    color: #fff;
    border: 1px solid #8b0000;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.share-button:hover,
.btn-share:hover {
    background: #8b0000;
    border-color: #660000;
    color: #fff;
}

.share-button:active,
.btn-share:active {
    transform: translateY(0);
}

.share-button i,
.btn-share svg {
    font-size: 1em;
}

/* Captions and Transcript */
.captions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-captions {
    background: #1f1f1f;
    color: #fff;
    border: 1px solid #8b0000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-captions.active {
    background: linear-gradient(135deg, #8b0000, #660000);
    border-color: #8b0000;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25) inset;
}

.btn-captions:hover {
    background: #8b0000;
    border-color: #660000;
}

/* Preview button (disabled state) */
.btn-captions.btn-preview {
    background: #680997;
    color: #fff;
    border-color: #4a066d;
    cursor: not-allowed;
}

.btn-captions.btn-preview:hover {
    background: #680997;
    border-color: #4a066d;
}

.transcript {
    margin-top: 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-height: 240px;
    overflow: auto;
    padding: 12px;
    display: none; /* hidden until toggled */
    scroll-behavior: smooth;
}

.transcript-line {
    padding: 4px 6px;
    line-height: 1.5;
    color: #333;
    border-left: 3px solid transparent;
    cursor: pointer;
    scroll-margin-block: 40px; /* top and bottom margin when scrolling to a line */
}

.transcript-line.active {
    background: #fff5f5;
    border-left-color: #8b0000;
}

.transcript {
    margin-top: 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-height: 240px;
    overflow: auto;
    padding: 12px;
    display: none; /* hidden until toggled */
}

.transcript-line {
    padding: 4px 6px;
    line-height: 1.5;
    color: #333;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.transcript-line.active {
    background: #fff5f5;
    border-left-color: #8b0000;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    background: #ffebeb;
    color: #8b0000;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #ffcccc;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #808080;
}

.spinner {
    border: 4px solid rgba(139, 0, 0, 0.1);
    border-top: 4px solid #8b0000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(139, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.5);
    margin-top: 80px;
}

.footer p {
    color: #808080;
    font-size: 0.95em;
}

/* Floating Copy Alert */
.copy-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2e7d32; /* deep green */
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.copy-alert.show {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8b0000, #660000);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #a00000, #8b0000);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        min-height: 200px;
        padding: 40px 20px 30px;
    }

    .header h1 {
        font-size: 2.2em;
        padding: 12px 20px;
        letter-spacing: 2px;
    }

    .tagline {
        font-size: 1em;
        padding: 8px 18px;
    }

    .season-title {
        font-size: 1.8em;
    }

    .episode-title {
        font-size: 1.4em;
    }

    .episode-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .season-dropdown {
        width: 100%;
        max-width: 400px;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}