/* --- Nitropod General Container --- */
.nitropod-container {
    background-color: #FFFFFF;
    font-family: sans-serif;
    color: #1F2937;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.06);
}

/* =================== هدر ساده شده نهایی =================== */
.nitropod-header {
    display: flex;
    justify-content: space-between; /* Pushes items to opposite ends */
    align-items: center;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 16px;
    margin-bottom: 24px;
    gap: 20px; /* Space between button and brand */
}

.nitropod-brand {
    font-size: 24px;
    font-weight: bold;
    color: #1F2937;
    margin: 0;
    white-space: nowrap;
}

.nitropod-header-buttons {
    /* This container now holds only one button */
}

/* Style for the remaining button */
.nitropod-header-buttons .nitropod-button {
    display: inline-block;
    background-color: #1A73E8 !important; /* CTA Color */
    color: #FFFFFF !important; /* White text */
    border: none !important;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px; /* <-- سايز متن اینجا کوچک‌تر شد */
    font-weight: 500;
    text-decoration: none !important; 
    text-align: center;
    line-height: 1.5;
    transition: background-color 0.3s;
}

/* CTA Hover effect */
.nitropod-header-buttons .nitropod-button:hover {
    background-color: #10B981 !important; /* CTA Hover Color */
}

/* --- Mobile Responsiveness for Header --- */
@media (max-width: 782px) {
    .nitropod-header {
        flex-direction: column-reverse; /* Stack brand below the button */
        align-items: stretch; /* Make items take full width */
    }

    .nitropod-brand {
        text-align: center; /* Center the brand text on mobile */
        margin-top: 15px;
    }

    .nitropod-header-buttons {
       display: flex;
       flex-direction: column; /* Ensure button container is ready for stacking */
       align-items: stretch;
    }
}
/* =================================================== */


/* --- Channel Selector --- */
.nitropod-channel-selector {
    background-color: #F9FAFB;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.nitropod-channel-selector label {
    display: block;
    margin-bottom: 8px;
    color: #4B5563;
    font-weight: 500;
}
.nitropod-channel-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    background-color: #FFFFFF;
    color: #1F2937;
    font-size: 16px;
}
.nitropod-channel-selector select:focus {
    outline: none;
    border-color: #1A73E8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* --- Episode List & Accordion --- */
.nitropod-episode-list {
    margin-top: 20px;
}
.nitropod-accordion {
    border-bottom: 1px solid #E5E7EB;
}
.nitropod-accordion:last-child {
    border-bottom: none;
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    cursor: pointer;
}
.episode-details {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    min-width: 0;
}
.title-date {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.episode-title {
    font-weight: 600;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.episode-date {
    font-size: 13px;
    color: #4B5563;
    margin-top: 4px;
}
.episode-cover-art {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

/* --- Play Button --- */
.play-button, #player-play-pause-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    background-color: #F9FAFB;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color 0.2s, border-color 0.2s;
    flex-shrink: 0;
    position: relative;
}
.play-button:hover, #player-play-pause-btn:hover {
    border-color: #1A73E8;
}
.play-button.loading, .play-button.playing {
    background-image: none !important;
}
.play-button, #player-play-pause-btn.play {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%231F2937" viewBox="0 0 16 16"><path d="M11.596 8.697l-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/></svg>');
}
.play-button.playing, #player-play-pause-btn.pause {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%231F2937" viewBox="0 0 16 16"><path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5A1.5 1.5 0 0 1 5.5 3.5zm4 0A1.5 1.5 0 0 1 11 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"/></svg>');
}
.play-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #9CA3AF;
    border-top-color: #1A73E8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* --- Sticky Player --- */
.nitropod-sticky-player {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background-color: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    padding: 10px 20px;
    z-index: 1000;
    transition: bottom 0.4s ease-in-out;
}
.nitropod-sticky-player.visible {
    bottom: 0;
}
.player-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.player-content .episode-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 1;
    min-width: 0;
}
#player-cover {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
}
#player-title {
    font-weight: 500;
    color: #1F2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: 1;
    justify-content: center;
}
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}
.progress-container span {
    font-size: 13px;
    color: #4B5563;
    font-family: monospace;
}
#player-progress-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #E5E7EB;
    outline: none;
    border-radius: 3px;
    cursor: pointer;
}
#player-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #1A73E8;
    border-radius: 50%;
    cursor: pointer;
}
#player-progress-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #1A73E8;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

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