/* Bahá'í Foundational Texts 365 - Styles */

:root {
    --primary-color: #1a5f7a;
    --primary-light: #2d8bb5;
    --primary-dark: #0d3d4f;
    --accent-color: #c9a227;
    --accent-light: #e6c35c;
    --background: #f5f5f0;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --bahaullah: #8b4513;
    --bab: #2e7d32;
    --abdulbaha: #1565c0;
    --shoghieffendi: #6a1b9a;
    --uhj: #c62828;
    --garden-green: #2d5a27;
    --rose-pink: #d4a5a5;
    --sky-blue: #87ceeb;
}

/* Nine-pointed star cursor */
* {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 100 100'%3E%3Cpolygon fill='%23c9a227' points='50,0 58,35 95,35 65,57 76,95 50,72 24,95 35,57 5,35 42,35'/%3E%3C/svg%3E") 12 12, auto;
}

a, button, .btn, .day-card, .book-card, .filter-btn {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 100 100'%3E%3Cpolygon fill='%231a5f7a' points='50,0 58,35 95,35 65,57 76,95 50,72 24,95 35,57 5,35 42,35'/%3E%3C/svg%3E") 14 14, pointer;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    /* Beautiful garden gradient background */
    background:
        linear-gradient(180deg,
            rgba(135, 206, 235, 0.3) 0%,
            rgba(144, 238, 144, 0.2) 30%,
            rgba(34, 139, 34, 0.15) 60%,
            rgba(45, 90, 39, 0.2) 100%
        ),
        linear-gradient(135deg,
            #e8f5e9 0%,
            #f1f8e9 25%,
            #fff8e1 50%,
            #fce4ec 75%,
            #e8f5e9 100%
        );
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Floating flower petals animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 182, 193, 0.3) 0%, transparent 8%),
        radial-gradient(circle at 90% 80%, rgba(255, 218, 185, 0.3) 0%, transparent 6%),
        radial-gradient(circle at 30% 70%, rgba(221, 160, 221, 0.2) 0%, transparent 10%),
        radial-gradient(circle at 70% 30%, rgba(255, 250, 205, 0.3) 0%, transparent 7%),
        radial-gradient(circle at 50% 50%, rgba(176, 224, 230, 0.2) 0%, transparent 12%);
    z-index: 0;
    animation: floatPetals 20s ease-in-out infinite;
}

@keyframes floatPetals {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    50% { transform: translateY(-20px) rotate(5deg); opacity: 1; }
}

/* Nightingale container */
.nightingales {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.nightingale {
    position: absolute;
    font-size: 2rem;
    opacity: 0.7;
    animation: flyAcross linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.nightingale:nth-child(1) {
    top: 15%;
    animation-duration: 25s;
    animation-delay: 0s;
    font-size: 1.8rem;
}

.nightingale:nth-child(2) {
    top: 35%;
    animation-duration: 30s;
    animation-delay: 5s;
    font-size: 2.2rem;
}

.nightingale:nth-child(3) {
    top: 55%;
    animation-duration: 22s;
    animation-delay: 10s;
    font-size: 1.5rem;
}

.nightingale:nth-child(4) {
    top: 75%;
    animation-duration: 28s;
    animation-delay: 15s;
    font-size: 2rem;
}

.nightingale:nth-child(5) {
    top: 25%;
    animation-duration: 35s;
    animation-delay: 8s;
    font-size: 1.6rem;
}

@keyframes flyAcross {
    0% {
        left: -10%;
        transform: translateY(0) scaleX(1);
    }
    25% {
        transform: translateY(-30px) scaleX(1);
    }
    50% {
        transform: translateY(20px) scaleX(1);
    }
    75% {
        transform: translateY(-15px) scaleX(1);
    }
    100% {
        left: 110%;
        transform: translateY(0) scaleX(1);
    }
}

/* Ensure content is above background effects */
header, main, footer {
    position: relative;
    z-index: 2;
}

header {
    background: linear-gradient(135deg,
        rgba(26, 95, 122, 0.95),
        rgba(13, 61, 79, 0.95)
    );
    color: white;
    text-align: center;
    padding: 2.5rem 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-bottom: 3px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '✵';
    position: absolute;
    font-size: 15rem;
    opacity: 0.05;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-style: italic;
}

header .header-decoration {
    margin-top: 1rem;
    font-size: 1.5rem;
    letter-spacing: 1rem;
    opacity: 0.6;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    font-weight: normal;
}

/* Progress Section */
.progress-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1rem;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-bar-container {
    background: var(--border-color);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Today's Reading */
.today-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-left: 5px solid var(--accent-color);
    border: 1px solid rgba(255,255,255,0.5);
    border-left: 5px solid var(--accent-color);
}

.today-card .day-number {
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.today-card .book-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.today-card .author {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}

.today-card .reading-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.today-card .detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.today-card .detail-label {
    font-weight: bold;
    color: var(--text-light);
}

.today-card .actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-small:hover {
    background: var(--primary-light);
}

/* Navigation */
.nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.5);
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: var(--primary-light);
}

.nav-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.day-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-selector input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn[data-filter="bahaullah"].active { background: var(--bahaullah); border-color: var(--bahaullah); }
.filter-btn[data-filter="bab"].active { background: var(--bab); border-color: var(--bab); }
.filter-btn[data-filter="abdulbaha"].active { background: var(--abdulbaha); border-color: var(--abdulbaha); }
.filter-btn[data-filter="shoghieffendi"].active { background: var(--shoghieffendi); border-color: var(--shoghieffendi); }
.filter-btn[data-filter="uhj"].active { background: var(--uhj); border-color: var(--uhj); }

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.day-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-left: 4px solid var(--border-color);
    border: 1px solid rgba(255,255,255,0.5);
    border-left: 4px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.day-card.completed {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff0, var(--card-bg));
}

.day-card .day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.day-card .day-num {
    font-weight: bold;
    color: var(--primary-color);
}

.day-card .check-mark {
    color: var(--success-color);
    font-size: 1.2rem;
}

.day-card .book-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.day-card .pages {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Author Colors for Day Cards */
.day-card[data-author="bahaullah"] { border-left-color: var(--bahaullah); }
.day-card[data-author="bab"] { border-left-color: var(--bab); }
.day-card[data-author="abdulbaha"] { border-left-color: var(--abdulbaha); }
.day-card[data-author="shoghieffendi"] { border-left-color: var(--shoghieffendi); }
.day-card[data-author="uhj"] { border-left-color: var(--uhj); }

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.book-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.book-card .book-author {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    color: white;
}

.book-card[data-author="bahaullah"] .book-author { background: var(--bahaullah); }
.book-card[data-author="bab"] .book-author { background: var(--bab); }
.book-card[data-author="abdulbaha"] .book-author { background: var(--abdulbaha); }
.book-card[data-author="shoghieffendi"] .book-author { background: var(--shoghieffendi); }
.book-card[data-author="uhj"] .book-author { background: var(--uhj); }

.book-card .book-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.book-card .book-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.book-card .book-progress {
    background: var(--border-color);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.book-card .book-progress-bar {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
}

.book-card .book-progress-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

.book-card .book-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
}

.book-card .book-link:hover {
    text-decoration: underline;
}

/* Reader Section */
.reader-section {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    margin-bottom: 2rem;
}

.reader-section.hidden {
    display: none;
}

.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    flex-wrap: wrap;
    gap: 1rem;
}

.reader-title h2 {
    color: white;
    border: none;
    margin: 0;
    padding: 0;
    font-size: 1.3rem;
}

.reader-title p {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.reader-controls {
    display: flex;
    gap: 0.5rem;
}

.reader-controls .btn-outline {
    color: white;
    border-color: white;
}

.reader-controls .btn-outline:hover {
    background: rgba(255,255,255,0.2);
}

.reader-content {
    padding: 2rem;
    background: var(--background);
}

.reader-panel {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.5);
}

.reader-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.reader-panel h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.reader-author {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.reader-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
}

.reader-detail {
    text-align: center;
}

.reader-detail .detail-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reader-detail .detail-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-large {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.reader-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.reader-tips {
    text-align: left;
    background: var(--background);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.reader-tips p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.reader-tips ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-light);
}

.reader-tips li {
    margin-bottom: 0.25rem;
}

/* Settings Section */
.settings-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
}

.setting-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-row label {
    font-weight: 500;
    color: var(--text-color);
}

.setting-row input[type="date"] {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.setting-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

/* Export Section */
.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.export-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
}

.export-card h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.export-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.export-buttons .btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

footer a {
    color: var(--accent-light);
}

footer p {
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .nav-controls {
        flex-direction: column;
    }

    .stat-value {
        font-size: 2rem;
    }

    .today-card .book-title {
        font-size: 1.4rem;
    }

    .schedule-grid,
    .books-grid {
        grid-template-columns: 1fr;
    }

    .export-grid {
        grid-template-columns: 1fr;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-row input[type="date"],
    .setting-row .btn {
        width: 100%;
    }

    .export-buttons {
        flex-direction: column;
    }

    .export-buttons .btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    header, footer, .nav-controls, .filter-buttons, .actions {
        display: none;
    }

    .day-card, .book-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
