/* Episode Root Container - Playful, Colorful, Pastel Theme */
.episode-root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #fff5f7 0%, #fffef5 100%);
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(255, 182, 193, 0.3);
    max-width: 60vw;
    margin: 0 auto;
}

/* Navigation */
.episode-root .episode-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 3px dashed #ffd4e5;
    flex-wrap: wrap;
}

.episode-root .nav-button {
    background: linear-gradient(135deg, #a8e6cf 0%, #c4f1e8 100%);
    color: #2d5d4a;
    border: none;
    padding: 14px 26px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 230, 207, 0.3);
}

.episode-root .nav-button.active {
    background: #555;
    color: white;
}

.episode-root .nav-button.active:hover {
    background: #555;
    color: white;
}

.episode-root .nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(168, 230, 207, 0.5);
    background: linear-gradient(135deg, #c4f1e8 0%, #a8e6cf 100%);
}

/* Episode Details View */
.episode-root .episode-view {
    padding: 20px 0;
}

.episode-root .episode-header {
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fff6d5 100%);
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(255, 234, 167, 0.4);
}

.episode-root .episode-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5em;
    font-weight: 800;
    color: #8b5a00;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
}

.episode-root .episode-meta {
    display: flex;
    gap: 15px;
    font-size: 1em;
    flex-wrap: wrap;
}

.episode-root .episode-number {
    background: linear-gradient(135deg, #fab1a0 0%, #ffeaa7 100%);
    color: #d63031;
    padding: 8px 18px;
    font-weight: 700;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(250, 177, 160, 0.4);
}

.episode-root .episode-date {
    padding: 8px 18px;
    background: linear-gradient(135deg, #e0c3fc 0%, #f3e7f9 100%);
    border-radius: 20px;
    color: #6c5ce7;
    font-weight: 500;
}

.episode-root .episode-content {
    display: grid;
    gap: 25px;
}

.episode-root .episode-description {
    background: linear-gradient(135deg, #dfe6e9 0%, #f0f3f5 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(176, 190, 197, 0.2);
}

.episode-root .episode-description h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #2d3436;
    font-weight: 700;
}

.episode-root .episode-description p {
    line-height: 1.8;
    margin: 0;
    color: #4a4a4a;
}

.episode-root .episode-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.episode-root .info-section {
    background: linear-gradient(135deg, #ffeaa7 0%, #fff6d5 100%);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(255, 234, 167, 0.3);
    transition: transform 0.3s ease;
}

.episode-root .info-section:hover {
    transform: translateY(-5px);
}

.episode-root .info-section h3 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b5a00;
}

.episode-root .info-section p {
    margin: 0;
    font-size: 1.2em;
    color: #d35400;
    font-weight: 600;
}

/* Cast & Crew View */
.episode-root .cast-view {
    padding: 20px 0;
}

.episode-root .cast-view h1 {
    margin: 0 0 30px 0;
    font-size: 2.5em;
    font-weight: 800;
    padding: 25px;
    background: linear-gradient(135deg, #ffafbd 0%, #ffc3a0 100%);
    border-radius: 25px;
    color: #c44569;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(255, 175, 189, 0.4);
}

.episode-root .cast-section,
.episode-root .crew-section {
    margin-bottom: 35px;
}

.episode-root .cast-section h2,
.episode-root .crew-section h2 {
    margin: 0 0 20px 0;
    font-size: 1.6em;
    font-weight: 700;
    color: #5f27cd;
    padding-left: 10px;
}

.episode-root .cast-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.episode-root .cast-member {
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(168, 230, 207, 0.3);
    transition: transform 0.3s ease;
}

.episode-root .cast-member:hover {
    transform: translateY(-5px) rotate(1deg);
}

.episode-root .cast-member-name {
    font-weight: 700;
    font-size: 1.15em;
    margin-bottom: 8px;
    color: #2d5d4a;
}

.episode-root .cast-member-character {
    font-style: italic;
    margin-bottom: 12px;
    color: #45896e;
    font-size: 0.95em;
}

.episode-root .cast-member-role {
    font-size: 0.85em;
    background: linear-gradient(135deg, #fab1a0 0%, #ffeaa7 100%);
    color: #d63031;
    padding: 6px 14px;
    display: inline-block;
    border-radius: 15px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(250, 177, 160, 0.3);
}

.episode-root .crew-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.episode-root .crew-group {
    background: linear-gradient(135deg, #e0c3fc 0%, #f3e7f9 100%);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(224, 195, 252, 0.3);
}

.episode-root .crew-group h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #6c5ce7;
    padding-bottom: 10px;
    border-bottom: 3px solid #a29bfe;
}

.episode-root .crew-group ul {
    margin: 0;
    padding: 0 0 0 20px;
}

.episode-root .crew-group li {
    margin: 8px 0;
    line-height: 1.6;
    color: #4a4a4a;
}

/* Season View */
.episode-root .season-view {
    padding: 20px 0;
}

.episode-root .season-view h1 {
    margin: 0 0 30px 0;
    font-size: 2.5em;
    font-weight: 800;
    padding: 25px;
    background: linear-gradient(135deg, #ffeaa7 0%, #ffd79d 100%);
    border-radius: 25px;
    color: #8b5a00;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
    box-shadow: 0 5px 20px rgba(255, 234, 167, 0.4);
}

.episode-root .season-content {
    display: grid;
    gap: 25px;
}

.episode-root .season-info {
    background: linear-gradient(135deg, #dfe6e9 0%, #f0f3f5 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(176, 190, 197, 0.2);
}

.episode-root .info-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #c8d6e5;
}

.episode-root .info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.episode-root .info-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85em;
    color: #636e72;
    letter-spacing: 1px;
}

.episode-root .info-value {
    font-size: 1.15em;
    color: #2d3436;
    font-weight: 600;
}

.episode-root .season-description {
    background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(168, 230, 207, 0.3);
}

.episode-root .season-description h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #2d5d4a;
    font-weight: 700;
}

.episode-root .season-description p {
    line-height: 1.8;
    margin: 0;
    color: #4a4a4a;
}

/* Modal Dialog */
.episode-root .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(111, 78, 124, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.episode-root .modal {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(111, 78, 124, 0.4);
}

.episode-root .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #ffafbd 0%, #ffc3a0 100%);
    color: #c44569;
    border-radius: 30px 30px 0 0;
}

.episode-root .modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
}

.episode-root .modal-close {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    color: #c44569;
    font-size: 1.8em;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.episode-root .modal-close:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(90deg);
}

.episode-root .modal-body {
    padding: 30px;
    line-height: 1.8;
    color: #4a4a4a;
}

.episode-root .modal-body p {
    margin: 0;
}

.episode-root .modal-footer {
    padding: 20px 30px;
    text-align: right;
    background: linear-gradient(135deg, #f0f3f5 0%, #ffffff 100%);
    border-radius: 0 0 30px 30px;
}

.episode-root .modal-button {
    background: linear-gradient(135deg, #a8e6cf 0%, #c4f1e8 100%);
    color: #2d5d4a;
    border: none;
    padding: 12px 28px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 230, 207, 0.3);
}

.episode-root .modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 230, 207, 0.5);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .episode-root {
        max-width: 75vw;
    }
}

@media (max-width: 768px) {
    .episode-root {
        max-width: 95vw;
        padding: 25px;
        border-radius: 20px;
    }

    .episode-root .episode-nav {
        flex-direction: column;
    }

    .episode-root .nav-button {
        width: 100%;
    }

    .episode-root .episode-meta {
        flex-direction: column;
        gap: 10px;
    }

    .episode-root .episode-header h1,
    .episode-root .cast-view h1,
    .episode-root .season-view h1 {
        font-size: 1.8em;
    }

    .episode-root .cast-list,
    .episode-root .crew-info,
    .episode-root .episode-info {
        grid-template-columns: 1fr;
    }

    .episode-root .modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }

    .episode-root .modal-header {
        border-radius: 20px 20px 0 0;
    }

    .episode-root .modal-footer {
        border-radius: 0 0 20px 20px;
    }
}
