/* --- PLAYER PAGE SPECIFIC STYLES --- */

/* Base Styles */
:root {
    --primary-color: #ad5207;
    --primary-variant: #e88e07;
    --surface: #faeadd;
    --on-surface: #374151;
    --on-primary: #ffffff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0d1c1;
}

.container > .section-title {
    border-bottom: none;
}

/* Hero Section & Player */
.hero-section-player {
    padding: 20px 0 40px 0;
    margin-bottom: 50px;
    border-top: 1px solid #e0d1c1;
    border-bottom: 1px solid #e0d1c1;
    background-image: linear-gradient(145deg, rgba(173, 82, 7, 0.1), rgba(255, 240, 225, 0) 70%);
}

.surah-header {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

h1.surah-english-name {
    font-size: 2.5rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
}

p.surah-english-translation {
    font-size: 1.1rem;
    color: #4B5563;
    margin: 5px 0 0 0;
    font-weight: 500;
}

.surah-arabic-name-header {
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    margin: 5px 0;
    color: var(--on-surface);
}

.surah-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
    gap: 10px;
}

.meta-item {
    font-size: 0.9rem;
    color: #4B5563;
}

.meta-divider {
    color: #c7b8a8;
}

.audio-player-container.minimalist-player {
    padding: 15px 0;
    margin-bottom: 25px;
}

.progress-control {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.progress-control .time {
    color: #4B5563;
    font-size: 0.9rem;
    min-width: 45px;
    text-align: center;
}

.waveform {
    flex-grow: 1;
    height: 50px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.waveform-bars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.waveform-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    opacity: 0.7;
    z-index: 2;
}

.waveform-bar {
    display: block;
    width: 3px;
    margin-right: 2px;
    flex-shrink: 0;
    border-radius: 2px;
    background-color: #d3c4b5;
    transition: background-color 0.3s;
}

.main-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 15px 0;
}

.control-btn {
    background: none;
    border: none;
    color: var(--on-surface);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
}

.control-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.control-btn.active {
    color: var(--primary-color);
}

.main-controls .play-btn {
    font-size: 1.8rem;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--on-primary);
}

.main-controls .play-btn:hover {
    background-color: var(--primary-variant);
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 40%;
    margin: 0 auto;
}

.volume-control i {
    color: #4B5563;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #d3c4b5;
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--on-surface);
    border-radius: 50%;
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--on-surface);
    border-radius: 50%;
    border: none;
}

.extra-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    border: 1px solid #d3c4b5;
    color: var(--on-surface);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #ad5207;
}

.action-btn i {
    font-size: 1rem;
}

/* Surah List Section */
#surah-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.surah-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--surface);
    border: 1px solid #e0d1c1;
    border-radius: 10px;
    padding: 12px;
    text-decoration: none;
    color: var(--on-surface);
    transition: background-color 0.3s, transform 0.2s;
}

.surah-item:hover {
    background-color: #f5e2d0;
    transform: translateY(-5px);
}

.surah-number-container {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 8px;
}

.surah-number-text {
    transform: rotate(-45deg);
    color: #4B5563;
    font-size: 0.9rem;
    font-weight: 500;
}

.surah-details-container {
    flex-grow: 1;
}

.surah-details-container p {
    margin: 0;
}

.surah-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--on-surface);
}

.surah-translation {
    font-size: 0.8rem;
    color: #4B5563;
}

.surah-arabic-name {
    font-size: 1.5rem;
    font-family: 'Amiri', serif;
    color: var(--primary-color);
    margin: 0;
}

.show-more-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    margin-top: 10px;
}

.show-more-btn {
    padding: 12px 30px;
    font-size: 1rem;
    color: var(--on-surface);
    background-color: #e0d1c1;
    border: 1px solid #d3c4b5;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.show-more-btn:hover {
    background-color: #d3c4b5;
    border-color: #c7b8a8;
}

/* Dynamic Content Sections */
#additional-content-container {
    margin-top: 50px;
}

.info-section {
    padding: 25px 0;
    margin-bottom: 25px;
}

.info-content {
    color: #4B5563;
    line-height: 1.8;
}

.info-content p {
    margin-bottom: 10px;
}

.info-content strong {
    color: #1F2937;
}

/* About Reciter Section */
.reciter-section-container {
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden;
}

.about-reciter {
    padding: 30px 25px;
    text-align: center;
    background-image: radial-gradient(circle at top, rgba(173, 82, 7, 0.15), transparent 70%), 
                      linear-gradient(145deg, #faeadd, #fff0e1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reciter-image-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e0d1c1;
    margin-bottom: 15px;
}

.about-reciter h3 {
    margin: 0 0 4px 0;
    font-size: 1.8rem;
    color: var(--on-surface);
}

.reciter-style-info {
    font-size: 1rem;
    color: #4B5563;
    margin: 0 0 12px 0;
    font-style: italic;
}

.reciter-bio-info {
    width: 100%;
    color: #4B5563;
    line-height: 1.7;
    margin: 0;
}

/* FAQ Section */
.faq-accordion .faq-item {
    margin-bottom: 10px;
    border-bottom: 1px solid #e0d1c1;
}
.faq-accordion .faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 15px 5px;
    font-size: 1.1rem;
    color: var(--on-surface);
    cursor: pointer;
    position: relative;
    font-weight: 500;
}
.faq-question::after {
    content: '+';
    position: absolute;
    right: 10px;
    font-size: 1.5rem;
    transition: transform 0.3s;
}
.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.faq-answer p {
    padding: 0 5px 15px;
    color: #4B5563;
    line-height: 1.7;
    margin: 0;
}

/* Quiz Section */
.quiz-header {
    text-align: right;
    color: #4B5563;
    margin-bottom: 15px;
}

.quiz-question p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.quiz-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quiz-options li {
    margin-bottom: 10px;
}

.quiz-options label {
    display: block;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quiz-options label:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.quiz-options input[type="radio"] {
    margin-right: 10px;
}

.quiz-navigation {
    margin-top: 20px;
}

#quiz-result {
    margin-top: 15px;
    font-weight: bold;
}

/* Dropdown Styles */
.action-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.action-btn-wrapper i.fa-microphone-alt {
    position: absolute;
    left: 20px;
    pointer-events: none;
    font-size: 1rem;
    color: var(--on-primary);
    z-index: 1;
}

.action-btn-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--on-primary);
    opacity: 0.8;
    font-size: 0.9rem;
    z-index: 2;
    transition: color 0.3s;
}

#reciter-select.action-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-left: 45px;
    background-color: var(--primary-color);
    color: var(--on-primary);
    border-color: var(--primary-color);
    font-weight: 500;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
    animation: none;
}

#reciter-select.action-btn:hover {
    background-color: var(--primary-variant);
    border-color: var(--primary-variant);
}

#reciter-select option {
    background-color: #faeadd;
    color: var(--on-surface);
    padding: 10px;
    border-bottom: 1px solid #e0d1c1;
}

/* Sticky Player Styles */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface);
    border-top: 1px solid #e0d1c1;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.sticky-player.visible {
    transform: translateY(0);
}

.sticky-player-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 55px;
}

.sticky-player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sticky-player-info .surah-number-text {
    color: var(--on-surface);
    font-size: 1rem;
    font-weight: bold;
}

.sticky-player-info p {
    margin: 0;
    font-size: 1rem;
    color: var(--on-surface);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 20vw;
}

.sticky-player-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sticky-player-controls .control-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
}

.sticky-player-controls .play-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    background-color: var(--primary-color);
    color: var(--on-primary);
}

.sticky-player-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #e0d1c1;
}

.sticky-player-progress {
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.1s linear;
}

/* --- BREADCRUMBS --- */
.breadcrumbs {
    padding-bottom: 10px;
    font-size: 0.9rem;
    color: #4B5563;
    text-align: left;
}

.breadcrumbs a {
    color: #ad5207;
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    font-weight: 500;
    color: #374151;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }

    h1.surah-english-name {
        font-size: 2rem;
    }
    
    .surah-arabic-name-header {
        font-size: 1.8rem;
    }

    .main-controls {
        gap: 10px;
    }

    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .main-controls .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .volume-control {
        width: 60%;
    }
    
    .extra-actions {
        gap: 10px;
    }

    .reciter-image-large {
        width: 100px;
        height: 100px;
    }

    .about-reciter h3 {
        font-size: 1.5rem;
    }
    
    .reciter-bio-info {
        font-size: 0.9rem;
    }

    #surah-list-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section-player {
        padding: 20px 0;
        margin-bottom: 30px;
    }

    h1.surah-english-name {
        font-size: 1.8rem;
    }
    
    .surah-arabic-name-header {
        font-size: 1.6rem;
    }

    .surah-meta {
        font-size: 0.8rem;
    }

    .progress-control {
        gap: 10px;
    }
    
    .progress-control .time {
        font-size: 0.8rem;
        min-width: 40px;
    }

    .waveform-bar {
        width: 2px;
        margin-right: 1px;
    }

    #download-btn, #read-now-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .info-content {
        font-size: 0.9rem;
    }
    .faq-question {
        font-size: 1rem;
        padding: 12px 5px;
    }

    .quiz-question p {
        font-size: 1rem;
    }

    .sticky-player-info p {
        font-size: 0.9rem;
        max-width: 30vw;
    }

    .sticky-player-info {
        gap: 10px;
    }

    .sticky-player-controls {
        gap: 0;
    }
}