@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

.page-title {
    font-family: 'Playfair Display';
    font-weight: 700;
    margin-bottom: 50px;
}




.poem-container {
    padding: 0;
    margin-top: 30px;
    list-style-type: none; /* Arabic-style numbers */
    list-style-position: inside; /* Ensures numbers are inside */
    direction: rtl; /* Right-to-left direction */
}

.poem-verse {
    position: relative;
    padding: 15px 0;
    border-bottom: 1px solid #ccc;
    text-align: right; /* centre Arabic + English */
    display: list-item;
    
   
}   




.copy-wrapper {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.copy-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--secondary-color);
    padding: 5px;
    margin-left: 10px;
}

.copy-btn:hover {
    color: var(--accent-color);
}

.copy-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.copy-option {
    padding: 8px 12px;
    cursor: pointer;
    color: var(--secondary-color);
}

.copy-option:hover {
    background-color: var(--primary-color);
}

.copy-toast {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 1rem;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.copy-toast.show {
    display: flex;
    opacity: 1;
}



/* Move the verse number to the right of the text */
.poem-verse::marker {
    font-weight: bold;
    color: black;
    font-size: 1.2rem;
    direction: rtl;
    
    unicode-bidi: embed;
    
    
}

/* Ensure Arabic text is right-aligned */
.arabic-text {
    font-family: Calibri;
    font-size: 1.8rem;
    direction: rtl;
    text-align: center;
    color: var(--text-color);
    display: block;
}

.eng-translation {
    font-size: 1.2rem;
    font-family: Calibri;
    color: var(--secondary-color);
    margin-top: 10px;
    text-align: center;
    direction: ltr;
    font-family: Calibri;
    max-width: 600px; /* control the maximum width */
    margin: 20px auto 0 auto; /* center it nicely */
     /* optional: center the text if you want */
    
}



main {
    margin-top: 200px;
}

.bismillah {
    font-family: Amiri;
    font-size: 1.3rem;
}




.poem-title {
    
    font-size: 2rem; /* Adjust size */
    text-align: center;
    color: var(--text-color); /* Main text color */
    background: linear-gradient(to right, #f1ebe1, var(--primary-color)); /* Subtle gradient background */
    padding: 30px 30px;
    display: inline-block;
    border: 2px solid var(--secondary-color); /* Accent-colored border */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    margin-bottom: 50px;
}

/* Hover effect */
.poem-title:hover {
    background: var(--accent-color); /* Change background on hover */
    color: white;
    border-color: var(--secondary-color); /* Darker border on hover */
    transform: scale(1.05); /* Slight zoom effect */
}

/* Add decorative lines around the title */


.poem-title::before {
    left: -40px;
    transition: left 0.3s ease-in-out;
}

.poem-title::after {
    right: -40px;
    transition: right 0.3s ease-in-out;
}

/* Hover effect for decorative lines */
.poem-title:hover::before {
    left: 10px;
}

.poem-title:hover::after {
    right: 10px;
}

.thuluth-title {

    font-family: Thuluth;
    font-size: 3rem;
}

#decreaseFont, #increaseFont, #resetFont {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin: 5px;
    transition: background 0.3s ease, transform 0.2s ease-in-out;
}

/* Hover Effects */
#decreaseFont:hover, #increaseFont:hover, #resetFont:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* Font Size Display */
#fontSizeDisplay {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 10px;
}

.word {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
    white-space: nowrap;
}

/* Default hover if no class applied (fallback) */
.word:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* If audio file found */
.audio-found:hover {
    background-color: var(--blue-color);
    color: var(--primary-color);
}

/* If audio file missing */
.audio-missing:hover {
    background-color: var(--red-color); /* Bootstrap's 'danger' red (#dc3545) fits your palette */
    color: var(--primary-color);
}


.tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 8px 12px; /* slightly larger */
    border-radius: 8px; /* more rounded */
    font-size: 15px; /* slightly bigger text */
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: Calibri;
    user-select: none;
    direction: ltr;
}


.word:hover .tooltip {
    opacity: 1;
    visibility: visible;
    
}

#verseDropdown {
    width: 100%;
    padding: 8px 12px;
    border-radius: 5px;
    border: none;
    background: var(--secondary-color);
    color: var(--primary-color);
    margin-top: 10px;
    cursor: pointer;
    font-size: 1rem;
}

#verseDropdown option {
    color: (--primary-color); /* dropdown text */
}

.highlight-verse {
    background-color: var(--highlight-color);
    color: white;
    transition: background 0.5s, color 0.5s;
}



/* === Verse Play Button === */
.play-btn {
    margin-top: 12px;
    background-color: transparent;
    color: var(--secondary-color);
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.play-btn:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* === Fixed Audio Player Bar === */
#audioPlayerBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    padding: 15px 20px;
    color: var(--primary-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    font-family: Calibri;
}



#audioPlayer {
    display: none; /* hide native controls */
}

#audioPlayerBar {
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}


#audioPlayerBar.show {
    visibility: visible;
    opacity: 1;
    height: auto;
    padding: 15px 20px; /* apply only when shown */
}


.audio-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.audio-controls label {
    font-size: 1rem;
    color: var(--primary-color);
}

.audio-controls select {
    padding: 6px 10px;
    border-radius: 5px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--accent-color);
    font-size: 1rem;
    cursor: pointer;
}

.audio-controls button {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 6px 12px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.audio-controls button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

#progressContainer {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

#progressBar {
    height: 100%;
    width: 0%;
    background-color: var(--accent-color);
    transition: width 0.1s linear;
}



/* Responsive Design */
@media (max-width: 768px) {
    .sidebar-section h3 {
        font-size: 1rem;
    }

    #decreaseFont, #increaseFont, #resetFont {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    #fontSizeDisplay {
        font-size: 1rem;
    }
}

/* Responsive Design for Poem Pages */
@media only screen and (max-width: 768px) {
    /* Adjust poem title size */
    .poem-title {
        font-size: 3rem; /* Reduce title size */
        padding: 10px 20px;
        font-family: Thuluth;
    }

    /* Adjust Arabic text size */
    .arabic-text {
        font-size: 1.5rem; /* Reduce font size for better readability */
    }

    /* Adjust English translation size */
    .eng-translation {
        font-size: 1rem;
        margin-top: 8px;
    }

    /* Adjust poem container */
    .poem-container {
        margin-top: 10px; /* Reduce margin */
        padding: 0 10px; /* Add slight padding to avoid edge touching */
    }

    /* Adjust individual verse spacing */
    .poem-verse {
        padding: 8px 0;
        font-size: 1.2rem; /* Adjust font size */
    }

    /* Adjust Bismillah font */
    .bismillah {
        font-size: 1.1rem;
    }

    /* Ensure main content starts after navbar */
    main {
        margin-top: 150px; /* Reduce margin for smaller screens */
    }
}
