:root {
    --bg-color: #0a0a0f;
    --text-main: #e8e6e3;
    --text-muted: #a09d98;
    --accent: #7c5bf0;
    --accent-hover: #5b3cc4;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.artwork {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff5e62);
    box-shadow: 0 0 30px rgba(124, 91, 240, 0.3);
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.header-text h2 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
    margin: 0;
}

/* Main Content */
.description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* Episode Card (Glassmorphism) */
.episode-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.episode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.episode-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.duration {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Audio Player */
.player-container {
    margin-bottom: 2rem;
}

audio {
    width: 100%;
    border-radius: 0.5rem;
    outline: none;
}

/* Audio pseudo-elements for webkit browsers */
audio::-webkit-media-controls-panel {
    background-color: rgba(255, 255, 255, 0.05);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: var(--text-main);
}

/* Chapters */
.chapters-container h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chapters-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chapter-btn {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    background: none;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.chapter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.chapter-time {
    color: var(--accent);
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    min-width: 60px;
}

.chapter-title {
    flex-grow: 1;
}

/* Episode Books Accordion */
.books-accordion {
    margin-top: 1.5rem;
    border: 1px solid rgba(124, 91, 240, 0.25);
    border-radius: 1rem;
    background: rgba(15, 15, 24, 0.55);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.books-accordion:hover {
    border-color: rgba(124, 91, 240, 0.45);
}

.books-accordion[open] {
    border-color: rgba(124, 91, 240, 0.55);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.books-accordion-summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(90deg, rgba(124, 91, 240, 0.08), rgba(255, 94, 98, 0.04));
    transition: background 0.2s ease;
}

.books-accordion-summary::-webkit-details-marker {
    display: none;
}

.books-accordion-summary:hover {
    background: linear-gradient(90deg, rgba(124, 91, 240, 0.14), rgba(255, 94, 98, 0.08));
}

.books-summary-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.books-summary-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.books-summary-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.books-summary-subtitle {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.books-summary-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.indie-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 2rem;
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.28);
    white-space: nowrap;
}

.accordion-chevron {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

.books-accordion[open] .accordion-chevron {
    transform: rotate(180deg);
    color: var(--text-main);
}

.books-accordion-content {
    padding: 1.25rem;
    border-top: 1px solid var(--card-border);
}

.books-ethical-banner {
    margin: 0 0 1.25rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.18);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.books-ethical-banner strong {
    color: #6ee7b7;
}

.books-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.book-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--card-border);
    border-radius: 0.9rem;
    padding: 1.15rem;
    transition: border-color 0.2s ease;
}

.book-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.book-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.book-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.book-author {
    margin: 0.2rem 0 0 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: #c4b5fd;
}

.book-meta {
    color: var(--text-muted);
    font-weight: 400;
}

.book-role-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.22rem 0.6rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.book-role-badge.main {
    background: rgba(124, 91, 240, 0.18);
    color: #ddd6fe;
    border-color: rgba(124, 91, 240, 0.4);
}

.book-reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.review-box {
    padding: 0.85rem 0.95rem;
    border-radius: 0.75rem;
    font-size: 0.86rem;
    line-height: 1.55;
}

.review-box p {
    margin: 0;
    color: var(--text-main);
    font-style: italic;
}

.review-box.gabrielle {
    background: rgba(255, 94, 98, 0.06);
    border: 1px solid rgba(255, 94, 98, 0.2);
}

.review-box.luc {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.reviewer-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.review-box.gabrielle .reviewer-header {
    color: #fda4af;
}

.review-box.luc .reviewer-header {
    color: #7dd3fc;
}

.reviewer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.reviewer-dot.gabrielle {
    background: #fb7185;
    box-shadow: 0 0 8px rgba(251, 113, 133, 0.6);
}

.reviewer-dot.luc {
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.book-buy-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: 0.6rem;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-buy small {
    font-weight: 400;
    opacity: 0.8;
    font-size: 0.76rem;
}

.btn-buy.leslibraires {
    background: rgba(56, 189, 248, 0.12);
    color: #e0f2fe;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-buy.leslibraires:hover {
    background: rgba(56, 189, 248, 0.24);
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.btn-buy.lireka {
    background: rgba(124, 91, 240, 0.14);
    color: #ede9fe;
    border: 1px solid rgba(124, 91, 240, 0.35);
}

.btn-buy.lireka:hover {
    background: rgba(124, 91, 240, 0.28);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Episode Quiz CTA */
.episode-quiz-cta {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.episode-quiz-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-episode-quiz {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(124, 91, 240, 0.12);
    border: 1px solid rgba(124, 91, 240, 0.35);
    color: var(--text-main);
    text-decoration: none;
    padding: 0.55rem 1.1rem;
    border-radius: 2rem;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-episode-quiz:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(124, 91, 240, 0.35);
}

/* Subscribe Button */
.subscribe {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.btn-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 3rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 91, 240, 0.3);
}

.btn-subscribe:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 91, 240, 0.4);
}

/* Novel Progress Card */
.novel-progress-card {
    background: var(--card-bg);
    border: 1px solid rgba(124, 91, 240, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3.5rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.novel-progress-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(124, 91, 240, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.novel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.novel-title-row h3 {
    font-size: 1.6rem;
    margin: 0;
    letter-spacing: -0.01em;
}

.novel-status-pill {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 2rem;
    border: 1px solid rgba(34, 197, 94, 0.25);
    white-space: nowrap;
}

.novel-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 1.8rem 0;
    line-height: 1.5;
    font-style: italic;
}

/* Main progress bar */
.progress-main {
    margin-bottom: 1.8rem;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
}

.progress-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.progress-percent {
    font-size: 1.4rem;
    font-weight: 800;
    color: #a78bfa;
    letter-spacing: -0.02em;
}

.progress-track {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c5bf0, #ff5e62);
    border-radius: 10px;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 15px rgba(124, 91, 240, 0.6);
}

.progress-formula-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Challenge 30 pages box */
.challenge-box {
    background: rgba(124, 91, 240, 0.06);
    border: 1px solid rgba(124, 91, 240, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1.8rem;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.challenge-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.challenge-icon {
    font-size: 1rem;
}

.challenge-status {
    font-size: 0.85rem;
    font-weight: 700;
    color: #38bdf8;
}

.challenge-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin: 0.8rem 0 0.6rem 0;
}

.challenge-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 6px;
    transition: width 0.8s ease;
}

.challenge-quote {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Stats grid */
.novel-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.novel-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-value.date {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
}

/* Responsive */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .episode-card {
        padding: 1.5rem;
    }
    
    .episode-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .books-accordion-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .books-summary-right {
        width: 100%;
        justify-content: space-between;
    }

    .book-reviews-grid {
        grid-template-columns: 1fr;
    }

    .btn-buy {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}
