:root {
    --primary-color: #6a1b9a;
    /* Purple for Lent */
    --primary-light: #9c4dcc;
    --primary-dark: #38006b;
    --secondary-color: #ffd700;
    /* Gold */
    --text-color: #333;
    --bg-color: #f4f4f9;
    --sidebar-bg: #fff;
    --card-bg: #fff;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: #f8f9fa;
    /* Lighter, cleaner background */
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.sidebar-logo {
    width: 80px;
    height: auto;
    border-radius: 50%;
    /* Optional: makes it circular if square */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: white;
    /* Ensure transparency looks good */
    padding: 5px;
}

.sidebar-header h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-header h1 span {
    font-size: 0.6em;
    font-weight: 300;
    letter-spacing: 2px;
}

.day-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.day-item {
    padding: 1rem 2rem;
    cursor: pointer;
    transition: background-color 0.2s, padding-left 0.2s;
    border-left: 4px solid transparent;
}

.day-item:hover {
    background-color: rgba(106, 27, 154, 0.05);
    padding-left: 2.5rem;
}

.day-item.active {
    background-color: rgba(106, 27, 154, 0.1);
    border-left-color: var(--primary-color);
    font-weight: 600;
    color: var(--primary-dark);
}

.day-item .day-number {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.day-item.active .day-number {
    color: var(--primary-color);
}

.day-item .day-title-preview {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #fff;
    /* Clean white background */
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 4rem;
    padding-bottom: 120px;
    /* Space for audio player */
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.content-header {
    text-align: center;
    margin-bottom: 2rem;
}

.date {
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.scripture-box {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.verse {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.reflection-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.reflection-body p {
    margin-bottom: 1.5rem;
}

.author-section {
    margin-top: 3rem;
    text-align: right;
    font-style: italic;
    color: #777;
    border-top: 1px solid #ddd;
    padding-top: 1rem;
}

/* Audio Player */
.audio-player-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 1rem 2rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
}

.audio-info {
    flex: 1;
    margin-right: 2rem;
}

.now-playing-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

.track-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

audio {
    width: 100%;
    max-width: 500px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Mobile Elements default hidden */
.mobile-nav-toggle,
.sidebar-overlay {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        overflow: auto;
        /* Allow native scrolling on mobile */
        height: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        /* Allow container to grow */
        overflow: visible;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        z-index: 2000;
        /* Sidebar on top of everything */
        transition: left 0.3s ease;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
    }

    .sidebar.active {
        left: 0;
    }

    .day-list {
        padding-bottom: 150px;
        /* Large padding to ensure last item is visible */
    }

    /* Center the header content */
    .sidebar-header {
        padding-top: 3rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .sidebar-header h1 {
        font-size: 1.5rem;
    }

    .main-content {
        height: auto;
        /* Let content dictate height */
        overflow: visible;
    }

    .content-wrapper {
        padding: 2rem 1.5rem;
        padding-top: 5rem;
        /* Increase bottom padding to ensure content clears the fixed player */
        padding-bottom: 200px;
        overflow: visible;
        height: auto;
    }

    .title {
        font-size: 1.8rem;
    }

    /* Fixed Audio Player for Mobile */
    .audio-player-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        background-color: white;
        /* Ensure background is opaque */
        border-top: 1px solid #ddd;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        /* High z-index to stay on top */
    }

    .audio-info {
        margin-right: 0;
        margin-bottom: 0.8rem;
        text-align: center;
    }

    .track-title {
        white-space: normal;
        /* Allow title to wrap on small screens if needed */
    }

    audio {
        max-width: 100%;
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        /* Fix toggle to top left */
        top: 20px;
        left: 20px;
        z-index: 1002;
        background: white;
        padding: 10px;
        border-radius: 50%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        color: var(--primary-color);
    }
}

/* Bible Verse Styling */
.verse {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
    cursor: pointer;
    /* Make it look clickable */
    transition: color 0.2s;
    display: inline-block;
    width: 100%;
}

.verse:hover {
    color: var(--primary-color);
}

.verse-ref {
    font-weight: 600;
}

.toggle-icon {
    font-size: 0.8em;
    margin-left: 5px;
    color: var(--secondary-color);
}

.verse-content-box {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ddd;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    text-align: left;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
    display: none;
    /* Initially hidden */
}

.verse-num {
    font-weight: bold;
    color: var(--primary-light);
    font-size: 0.8em;
    vertical-align: super;
    margin-right: 2px;
}