/* Podcast Episode Display */

/* === INDEX === */
.podcast-index {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Search */
.podcast-search {
    margin: 0 0 24px;
}

.podcast-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.podcast-search-input:focus {
    border-color: #FF9500;
}

/* List items */
.podcast-list-item {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.podcast-list-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.podcast-list-item.active {
    border-color: #FF9500;
    box-shadow: 0 2px 12px rgba(255,149,0,0.15);
}

.podcast-list-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    flex-wrap: wrap;
}

.podcast-list-item-header:hover {
    background: #faf6f0;
}

.podcast-episode-number {
    display: inline-block;
    background: #FF9500;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.podcast-list-keyword {
    font-weight: 600;
    font-size: 1.1em;
    color: #1a1a1a;
}

.podcast-list-reading {
    color: #888;
    font-size: 0.95em;
}

.podcast-list-definition {
    color: #666;
    font-size: 0.95em;
}

.podcast-list-toggle {
    margin-left: auto;
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}

/* Detail (accordion content) */
.podcast-detail {
    border-top: 1px solid #eee;
}

.podcast-list-item.hidden {
    display: none;
}

/* No results message */
.podcast-no-results {
    text-align: center;
    padding: 40px 16px;
    color: #999;
    font-size: 1.1em;
}

/* Pagination */
.podcast-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 16px;
    flex-wrap: wrap;
}

.podcast-page-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s;
}

.podcast-page-link:hover {
    background: #fff3e0;
    border-color: #FF9500;
    color: #FF9500 !important;
}

.podcast-page-current {
    display: inline-block;
    padding: 8px 14px;
    background: #FF9500;
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
}

/* === EPISODE DETAIL === */
.podcast-episode {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Banner */
.podcast-banner img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Grammar */
.podcast-grammar {
    margin: 30px 0;
}

.podcast-grammar h1,
.podcast-grammar h2 {
    font-size: 2em;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.podcast-reading {
    font-size: 0.5em;
    color: #666;
    font-weight: normal;
}

.podcast-definition {
    font-size: 1.2em;
    color: #333;
    margin: 0 0 12px;
}

.podcast-explanation {
    font-size: 1em;
    color: #555;
    line-height: 1.7;
}

/* PDF Download */
.podcast-pdf {
    margin: 24px 0;
}

.podcast-pdf-btn {
    display: inline-block;
    background: #FF9500;
    color: #fff !important;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.2s;
}

.podcast-pdf-btn:hover {
    background: #E68500;
}

/* Audio */
.podcast-audio-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: #fff8f0;
    border: 2px solid #FF9500;
    border-radius: 12px;
}

.podcast-audio-wrapper h2 {
    margin: 0 0 12px;
    font-size: 1.3em;
    color: #333;
}

.podcast-audio-player,
.podcast-sentence-audio {
    width: 100%;
    border-radius: 8px;
}

/* Example Sentence */
.podcast-example-sentence {
    margin: 30px 0;
}

.podcast-example-sentence h2 {
    font-size: 1.3em;
    color: #333;
    margin: 0 0 12px;
}

.podcast-play-sentence {
    display: inline-block;
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}
.podcast-play-sentence:hover {
    background: linear-gradient(135deg, #005a87, #004065);
    transform: scale(1.03);
}
.podcast-play-sentence.playing {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.podcast-sentence-audio {
    margin-bottom: 16px;
}

.podcast-sentence-japanese {
    font-size: 2em;
    line-height: 1.8;
    color: #1a1a1a;
    text-align: center;
    padding: 16px;
}

.podcast-sentence-japanese ruby {
    ruby-position: over;
}

.podcast-sentence-japanese rt {
    font-size: 0.5em;
    color: #888;
}

/* Translation (blurred) */
.podcast-translation {
    position: relative;
    padding: 16px 20px;
    margin: 16px 0 30px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 1.1em;
    color: #333;
    text-align: center;
    line-height: 1.6;
}

.podcast-translation.blurred {
    filter: blur(4px);
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.podcast-translation.blurred:hover {
    filter: blur(3px);
    background: rgba(255, 149, 0, 0.05);
    border-color: rgba(255, 149, 0, 0.3);
}

.podcast-translation.blurred .podcast-reveal-overlay {
    display: block;
}

.podcast-reveal-overlay {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 149, 0, 0.9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    filter: none;
}

/* Vocabulary */
.podcast-vocabulary {
    margin: 30px 0;
}

.podcast-vocabulary h2 {
    font-size: 1.3em;
    color: #333;
    margin: 0 0 16px;
}

.podcast-vocab-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.podcast-vocab-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.05em;
}

.podcast-vocab-list li:last-child {
    border-bottom: none;
}

.podcast-vocab-ja {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.1em;
}

.podcast-vocab-sep {
    margin: 0 8px;
    color: #ccc;
}

.podcast-vocab-en {
    color: #555;
}

.podcast-save-word {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    margin-left: 6px;
    line-height: 1;
    opacity: 0.6;
    transition: all 0.2s ease;
}
.podcast-save-word:hover {
    opacity: 1;
    transform: scale(1.15);
}
.podcast-save-word.saved {
    cursor: default;
    color: #28a745;
    opacity: 1;
}

/* Action Buttons */
.podcast-actions {
    display: flex;
    gap: 16px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.podcast-quiz-btn,
.podcast-matching-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    flex: 1;
    min-width: 200px;
    transition: opacity 0.2s;
    color: #fff !important;
}

.podcast-quiz-btn {
    background: linear-gradient(135deg, #FF9500, #E68500);
}

.podcast-matching-btn {
    background: linear-gradient(135deg, #FF6B35, #E05A2B);
}

.podcast-quiz-btn:hover,
.podcast-matching-btn:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 600px) {
    .podcast-grammar h1,
    .podcast-grammar h2 {
        font-size: 1.8em;
    }

    .podcast-sentence-japanese {
        font-size: 1.5em;
    }

    .podcast-actions {
        flex-direction: column;
    }

    .podcast-quiz-btn,
    .podcast-matching-btn {
        min-width: unset;
    }

    .podcast-list-definition {
        display: none;
    }
}
