/* Developed by Cherif Tas */
body {
    font-family: 'Amiri', serif;
    margin: 0;
    padding: 15px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.3s ease;
    line-height: 1.6;
}

.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.25;
    filter: blur(2px);
}

body.light-theme {
    background: linear-gradient(135deg, #1a3c34cc, #2e5e54cc);
    color: #ffffff;
}

body.dark-theme {
    background: linear-gradient(135deg, #1c2526cc, #2f3b3ccc);
    color: #e0e0e0;
}

/* Welcome Overlay */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.welcome-message {
    background: rgba(255, 255, 255, 0.97);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: bounceIn 0.8s ease;
    width: 90%;
    max-width: 450px;
    border: 1px solid #ffd700;
}

.welcome-message h2 {
    color: #1a3c34;
    font-size: 30px;
    margin: 0 0 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.welcome-message p {
    color: #2e5e54;
    font-size: 17px;
    margin: 0 0 20px;
}

.daily-tip {
    font-style: italic;
    color: #4682b4;
    font-size: 15px;
    background: rgba(240, 248, 255, 0.7);
    padding: 5px 10px;
    border-radius: 8px;
}

.welcome-btn {
    padding: 12px 20px;
    background-color: #ffd700;
    color: #1a3c34;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
    font-weight: 700;
}

.welcome-btn:hover {
    background-color: #e6c200;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(230, 194, 0, 0.4);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.header h2 {
    color: #ffd700;
    font-size: 32px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    margin: 0 0 10px;
}

.theme-btn {
    padding: 10px 20px;
    background-color: #555;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 15px;
    margin: 5px;
}

.theme-btn:hover {
    background-color: #777;
    transform: scale(1.05);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 15px;
}

/* Input Card */
.input-card {
    background: rgba(255, 255, 255, 0.97);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 25px;
}

.input-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a3c34;
    font-size: 16px;
}

input[type="number"], select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    background: #f9f9f9;
    color: #2e5e54;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="number"]:focus, select:focus {
    border-color: #1a3c34;
    outline: none;
    box-shadow: 0 0 8px rgba(26, 60, 52, 0.5);
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.calculate-btn, .reset-btn, .print-btn, .modal-btn, .close-btn, .save-note-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    min-width: 120px;
    font-weight: 700;
}

.calculate-btn {
    background-color: #1a3c34;
    color: #ffd700;
}

.calculate-btn:hover {
    background-color: #15332d;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(21, 51, 45, 0.4);
}

.reset-btn {
    background-color: #b22222;
    color: #ffffff;
}

.reset-btn:hover {
    background-color: #8b1a1a;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 26, 26, 0.4);
}

.print-btn {
    background-color: #4682b4;
    color: #ffffff;
    display: none;
}

.print-btn:hover {
    background-color: #3a6d9b;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(58, 109, 155, 0.4);
}

.close-btn {
    background-color: #ff4040;
    color: #ffffff;
}

.close-btn:hover {
    background-color: #cc3333;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(204, 51, 51, 0.4);
}

.save-note-btn {
    background-color: #32cd32;
    color: #ffffff;
}

.save-note-btn:hover {
    background-color: #28a428;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(40, 164, 40, 0.4);
}

/* Error */
.error {
    color: #ff4040;
    text-align: center;
    margin: 15px 0;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
    border-radius: 10px;
    display: none;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(255, 64, 64, 0.2);
}

/* Result Card */
.result-card {
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.97);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: none;
    animation: fadeIn 0.5s ease;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.result-header {
    font-size: 22px;
    font-weight: 700;
    color: #1a3c34;
    margin-bottom: 15px;
    border-bottom: 3px solid #ffd700;
    padding-bottom: 8px;
}

#daily-plan, #summary-text {
    color: #2e5e54;
    font-size: 17px;
    margin: 15px 0;
    line-height: 1.5;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a3c34, #2e5e54);
    width: 0;
    transition: width 1s ease-in-out;
    border-radius: 12px;
}

.daily-details {
    margin-top: 20px;
    padding: 15px;
    background: rgba(245, 245, 220, 0.95);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.details-title {
    font-size: 20px;
    color: #2e5e54;
    margin: 0 0 15px;
}

.daily-details ul {
    list-style-type: none;
    padding: 0;
}

.daily-details li {
    margin-bottom: 12px;
    font-size: 15px;
    color: #333;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.daily-details li:hover {
    transform: translateX(-8px);
    background-color: rgba(255, 255, 255, 1);
}

.daily-details li.completed {
    background-color: #d4edda;
    color: #155724;
    animation: completeBounce 0.5s ease;
}

.daily-details li::before {
    content: "🕌";
    font-size: 18px;
}

/* Quran Viewer */
.quran-viewer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    z-index: 1500;
    display: none;
    animation: fadeIn 0.5s ease;
    overflow-y: auto;
    border: 4px solid #ffd700;
}

.quran-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #1a3c34;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.quran-header h3 {
    margin: 0;
    color: #1a3c34;
    font-size: 24px;
    font-weight: 700;
}

.quran-content {
    font-size: 24px;
    line-height: 2.5;
    color: #1a3c34;
    direction: rtl;
    text-align: center;
    background: rgba(245, 245, 220, 0.6);
    padding: 20px;
    border-radius: 12px;
}

.quran-content .surah-title {
    font-size: 26px;
    color: #ffd700;
    background: #1a3c34;
    padding: 10px 15px;
    margin: 20px 0;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.quran-content p {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.quran-content p:hover {
    transform: scale(1.03);
}

.quran-content .verse-number {
    font-size: 18px;
    color: #4682b4;
    margin-right: 10px;
    font-weight: 700;
}

.notes-section {
    margin-top: 25px;
    padding: 20px;
    background: rgba(240, 248, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.notes-section label {
    font-size: 18px;
    color: #2e5e54;
    margin-bottom: 10px;
    display: block;
}

#daily-note {
    width: 100%;
    height: 120px;
    margin-top: 10px;
    padding: 12px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    font-size: 16px;
    resize: vertical;
    background: #f9f9f9;
    color: #2e5e54;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#daily-note:focus {
    border-color: #1a3c34;
    box-shadow: 0 0 8px rgba(26, 60, 52, 0.5);
}

/* Summary */
.summary {
    margin-top: 20px;
    padding: 15px;
    background: rgba(240, 248, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.summary-title, #completed-juz {
    font-size: 20px;
    color: #2e5e54;
    margin: 0 0 15px;
}

#completed-count {
    color: #1a3c34;
    font-weight: 700;
    font-size: 22px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.97);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    animation: bounceIn 0.8s ease;
    width: 90%;
    max-width: 450px;
    border: 2px solid #ffd700;
}

.modal-content h2 {
    color: #1a3c34;
    font-size: 26px;
    margin: 0 0 15px;
}

.modal-content p {
    color: #2e5e54;
    font-size: 16px;
    margin: 0 0 20px;
}

.modal-btn {
    background-color: #ffd700;
    color: #1a3c34;
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
}

.modal-btn:hover {
    background-color: #e6c200;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(230, 194, 0, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    color: #e0e0e0;
    font-size: 14px;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Editor Section */
.editor-section {
    background: rgba(255, 255, 255, 0.97);
    padding: 25px;
    border-radius: 20px;
    margin: 25px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.editor-section:hover {
    transform: translateY(-5px);
}

.editor-section h3 {
    color: #1a3c34;
    font-size: 22px;
    margin-bottom: 20px;
}

.editor-section textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    background: #f9f9f9;
    color: #2e5e54;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.editor-section textarea:focus {
    border-color: #1a3c34;
    box-shadow: 0 0 8px rgba(26, 60, 52, 0.5);
}

.editor-section button {
    background-color: #4682b4;
    color: #ffffff;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.editor-section button:hover {
    background-color: #3a6d9b;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(58, 109, 155, 0.4);
}

.editor-section .response {
    color: #1a3c34;
    font-size: 15px;
    margin-top: 15px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes completeBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    .header h2 {
        font-size: 28px;
    }
    .welcome-message, .input-card, .result-card, .modal-content, .quran-viewer, .editor-section {
        padding: 20px;
        max-width: 100%;
    }
    .welcome-message h2, .modal-content h2 {
        font-size: 24px;
    }
    .welcome-message p, .modal-content p {
        font-size: 15px;
    }
    .welcome-btn, .calculate-btn, .reset-btn, .print-btn, .modal-btn, .close-btn, .save-note-btn, .editor-section button {
        font-size: 14px;
        padding: 10px 15px;
    }
    .result-header, .details-title, .summary-title, #completed-juz {
        font-size: 18px;
    }
    .daily-details li {
        font-size: 14px;
        padding: 8px;
    }
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    .calculate-btn, .reset-btn, .print-btn, .close-btn, .save-note-btn {
        min-width: 100%;
    }
    .quran-content {
        font-size: 20px;
        line-height: 2.2;
    }
    .quran-content .surah-title {
        font-size: 22px;
    }
    .quran-content p {
        margin: 15px 0;
        padding: 10px;
    }
    .quran-content .verse-number {
        font-size: 16px;
    }
    #daily-note, .editor-section textarea {
        height: 100px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }
    .header h2 {
        font-size: 24px;
    }
    .welcome-message h2, .modal-content h2 {
        font-size: 20px;
    }
    .welcome-message p, .modal-content p {
        font-size: 14px;
    }
    .daily-tip {
        font-size: 13px;
    }
    .result-header, .details-title, .summary-title, #completed-juz {
        font-size: 16px;
    }
    .daily-details li {
        font-size: 13px;
    }
    .quran-content {
        font-size: 18px;
        line-height: 2;
    }
    .quran-content .surah-title {
        font-size: 20px;
    }
    .footer {
        font-size: 12px;
    }
}

@media print {
    body {
        background: none;
    }
    .bg-video, .welcome-overlay, .modal, .footer, .quran-viewer, .header, .input-card, .editor-section {
        display: none;
    }
    body * {
        visibility: hidden;
    }
    .result-card, .result-card * {
        visibility: visible;
    }
    .result-card {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        box-shadow: none;
        background: #fff;
        padding: 15px;
    }
    .print-btn {
        display: none;
    }
}