
/* Existing styles... */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #F0F4F8; 
    color: #343A40; 
    margin: 0; 
    padding: 20px; 
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.app-title {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #007BFF;
    margin-bottom: 0;
    margin-top: 0;
}

.subtitle {
    color: #6C757D;
    margin-top: -5px;
}

/* Header Actions Section - Now includes streak counter and toggle switch */
.header-actions {
    display: flex;
    justify-content: space-between; /* Space between streak and toggle */
    align-items: center;
    max-width: 800px;
    margin: -10px auto 20px auto;
    padding: 0 10px;
}

.streak-counter {
    font-size: 1.1em;
    font-weight: bold;
    color: #FF9800; /* Amber color for visibility */
    flex-grow: 1; /* Allow it to take available space */
    text-align: center; /* Center its own content */
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #4CAF50; /* Green when active */
}
input:checked + .slider:before {
    transform: translateX(22px);
}

.votd-section {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto 30px auto;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.votd-section h3 {
    margin-top: 0;
    color: #007BFF;
}

.votd-text {
    font-size: 1.1em;
    font-style: italic;
    line-height: 1.6;
}

.votd-reference {
    font-weight: bold;
    margin-top: 15px;
}

h2 {
    text-align: center;
    color: #007BFF;
}

.testament-section {
    margin-bottom: 40px;
}

.testament-progress {
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #343A40;
    margin-top: -10px;
    margin-bottom: 20px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.book-card {
    background-color: #FFFFFF;
    border: 1px solid #DEE2E6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.book-card.completed {
    border-color: #FFD700;
    border-width: 2px;
}

.book-card.completed::after {
    content: '✔';
    position: absolute;
    top: 5px;
    right: 8px;
    color: #28A745;
    font-size: 1.2em;
    font-weight: bold;
}

.book-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #343A40;
}

.progress-bar-container {
    background-color: #DEE2E6;
    border-radius: 4px;
    height: 8px;
    width: 100%;
}

.progress-bar {
    background-color: #007BFF;
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(52, 58, 64, 0.6);
}

.modal-content {
    background-color: #F0F4F8;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #DEE2E6;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: #343A40;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.chapter-box {
    background-color: #6C757D;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    color: #FFFFFF;
    border: none;
}

.chapter-box.read {
    background-color: #28A745;
    color: #FFFFFF;
}

.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 2;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s, visibility 0.5s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.actions-section {
    text-align: center;
    margin: 50px 0 30px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-button, .reset-button {
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-button {
    background-color: #007BFF;
}

.action-button:hover {
    background-color: #0056b3;
}

.reset-button {
    background-color: #DC3545;
}

.reset-button:hover {
    background-color: #C82333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-number, .stat-fraction {
    font-size: 2em;
    font-weight: bold;
    color: #007BFF;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9em;
    color: #6C757D;
    margin-top: 5px;
}

/* Milestone Modal Styles */
.milestone-content {
    max-width: 450px;
    text-align: center;
}
.milestone-body {
    padding: 20px;
}
.milestone-badge {
    font-size: 5em;
    line-height: 1;
    margin-bottom: 10px;
    animation: bounce-in 0.6s ease-out;
}
.milestone-title {
    font-size: 2em;
    color: #FFD700;
    margin-bottom: 10px;
}
.milestone-text {
    font-size: 1.2em;
    color: #343A40;
}

@keyframes bounce-in {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- NIGHT MODE STYLES --- */
body.night-mode {
    background-color: #121212;
    color: #E0E0E0;
}
.night-mode .app-title h1, .night-mode h2, .night-mode .stat-number, .night-mode .stat-fraction {
    color: #7B96B5; /* A softer blue for dark mode */
}
.night-mode .subtitle, .night-mode .stat-label, .night-mode .milestone-text {
    color: #888;
}
.night-mode .votd-section, .night-mode .book-card, .night-mode .stat-card, .night-mode .modal-content {
    background-color: #1E1E1E;
    border-color: #333;
}
.night-mode .book-name, .night-mode .testament-progress {
    color: #E0E0E0;
}
.night-mode .progress-bar-container {
    background-color: #444;
}
.night-mode .progress-bar {
    background-color: #3A72B5; /* Darker primary blue */
}
.night-mode .chapter-box {
    background-color: #424242;
    color: #E0E0E0;
}
.night-mode .chapter-box.read {
    background-color: #2E7D32; /* A darker green */
}
.night-mode .book-card.completed {
    border-color: #B8860B; /* Darker gold */
}
.night-mode .book-card.completed::after {
    color: #66BB6A; /* Lighter green for checkmark */
}
.night-mode .action-button, .night-mode .reset-button {
    color: #E0E0E0;
}
.night-mode .action-button { background-color: #3A72B5; }
.night-mode .reset-button { background-color: #B71C1C; }
.night-mode .streak-counter { color: #FFB74D; }
.night-mode .modal { background-color: rgba(0, 0, 0, 0.7); }
.night-mode .milestone-title {
    color: #FFC107; /* Lighter gold for dark mode */
}
