/* --- General & Theme Variables --- */
:root {
    --bg-color-light: #f4f7f9;
    --text-color-light: #333;
    --card-bg-light: #ffffff;
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --border-color-light: #e0e0e0;
    --bg-color-dark: #121212;
    --text-color-dark: #e0e0e0;
    --card-bg-dark: #1e1e1e;
    --border-color-dark: #333;
}
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}
body.light-mode { background-color: var(--bg-color-light); color: var(--text-color-light); }
body.dark-mode { background-color: var(--bg-color-dark); color: var(--text-color-dark); }
.app-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
    animation: fadeInSlideUp 0.8s ease-out forwards;
}
@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
body.light-mode .app-container { background-color: var(--card-bg-light); }
body.dark-mode .app-container { background-color: var(--card-bg-dark); border: 1px solid var(--border-color-dark); }

/* --- NEW: Dashboard, Streak, and Daily Task Styles --- */
#dashboard-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 25px;
}
body.dark-mode #dashboard-container { border-color: var(--border-color-dark); }
#streak-container {
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ffefba, #ffffff);
    border-radius: 10px;
    border: 1px solid #ffeeba;
}
body.dark-mode #streak-container {
    background: linear-gradient(135deg, #4a3c00, #2b2b2b);
    border-color: #6d5b00;
}
.streak-emoji { font-size: 2.5rem; }
#streak-count { font-size: 2.5rem; font-weight: 700; display: block; line-height: 1; }
.streak-label { font-size: 0.9rem; font-weight: 600; color: #6c757d; }
body.dark-mode .streak-label { color: #aaa; }
#daily-task-container {
    flex-grow: 1;
    padding: 15px 20px;
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 10px;
}
body.dark-mode #daily-task-container { background-color: rgba(0, 123, 255, 0.1); }
#daily-task-container h3 { margin-top: 0; color: var(--primary-color); }
#get-task-btn {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
#get-task-btn:hover { background-color: var(--primary-hover); }
#get-task-btn:disabled { background-color: #a0a0a0; cursor: not-allowed; }

h1 { text-align: center; font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; }
p { text-align: center; color: #888; margin-bottom: 30px; }
body.dark-mode p { color: #aaa; }
.input-group { display: flex; gap: 10px; margin-bottom: 20px; }
#topic-input { flex-grow: 1; padding: 15px; border-radius: 8px; font-size: 1rem; font-family: 'Poppins', sans-serif; transition: all 0.3s; border: 1px solid var(--border-color-light); }
body.dark-mode #topic-input { background-color: #2c2c2c; color: var(--text-color-dark); border-color: var(--border-color-dark); }
#topic-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); }
#generate-btn { padding: 15px 25px; border-radius: 8px; border: none; background-color: var(--primary-color); color: white; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.3s, transform 0.1s; }
#generate-btn:hover { background-color: var(--primary-hover); }
#generate-btn:active { transform: scale(0.98); }
#generate-btn:disabled { background-color: #a0a0a0; cursor: not-allowed; }
.options-group { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 30px; }
.radio-buttons { display: flex; gap: 10px; }
.radio-buttons input[type="radio"] { display: none; }
.radio-buttons label { padding: 8px 16px; border-radius: 20px; cursor: pointer; transition: all 0.3s ease; border: 1px solid var(--border-color-light); }
body.dark-mode .radio-buttons label { border-color: var(--border-color-dark); }
.radio-buttons input[type="radio"]:checked + label { background-color: var(--primary-color); color: white; border-color: var(--primary-color); transform: scale(1.1); }
.hidden { display: none !important; }
#quote-container { padding: 15px; margin: -10px 0 25px 0; border-left: 5px solid var(--primary-color); background-color: rgba(0, 123, 255, 0.05); border-radius: 0 8px 8px 0; transition: all 0.5s ease-in-out; }
body.dark-mode #quote-container { background-color: rgba(0, 123, 255, 0.1); }
#quote-text { font-style: italic; font-size: 0.95rem; color: #555; margin: 0; }
body.dark-mode #quote-text { color: #bbb; }
#loading-spinner { text-align: center; padding: 40px 0; }
.loading-text { margin-top: 20px; font-weight: 600; }
.loader { width: 50px; aspect-ratio: 1; border-radius: 50%; border: 8px solid; border-color: #000 #0000; animation: l1 1s infinite; margin: 0 auto; }
@keyframes l1 { to { transform: rotate(.5turn) } }
#roadmap-output h2 { text-align: center; margin-bottom: 30px; }
.timeline { position: relative; margin: 20px 0; padding-left: 40px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 4px; background: #e0e0e0; border-radius: 2px; }
body.dark-mode .timeline::before { background-color: var(--border-color-dark); }
.timeline-item { margin-bottom: 30px; position: relative; opacity: 0; animation: fadeInSlideLeft 0.6s forwards ease-out; }
@keyframes fadeInSlideLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.timeline-item::before { content: ''; position: absolute; left: -38px; top: 15px; width: 20px; height: 20px; border-radius: 50%; background: var(--card-bg-light); border: 4px solid var(--primary-color); z-index: 1; }
body.dark-mode .timeline-item::before { background: var(--card-bg-dark); }
.timeline-content { padding: 20px; border-radius: 8px; border: 1px solid var(--border-color-light); transition: all 0.3s ease; position: relative; }
.timeline-content:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); }
body.dark-mode .timeline-content { border-color: var(--border-color-dark); background: #252525; }
body.dark-mode .timeline-content:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
.timeline-content h3 { margin-top: 0; margin-right: 120px; font-weight: 600; color: var(--primary-color); }
.timeline-content ul { list-style-position: inside; padding-left: 10px; }
.completion-check { position: absolute; top: 20px; right: 20px; display: flex; align-items: center; }
.completion-check label { font-size: 0.9em; font-weight: 600; color: #6c757d; cursor: pointer; transition: color 0.3s; }
.completion-check input { width: 1.3em; height: 1.3em; margin-right: 8px; cursor: pointer; }
.completion-check input:checked + label { color: var(--primary-color); }
.timeline-item.completed .timeline-content { opacity: 0.6; background-color: #f8f9fa; }
.timeline-item.completed .timeline-content h3 { text-decoration: line-through; }
body.dark-mode .timeline-item.completed .timeline-content { background-color: #2a2a2a; }
#action-buttons { text-align: center; margin-top: 30px; display: flex; justify-content: center; gap: 15px; }
#print-btn, #clear-btn { padding: 12px 25px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s; }
#print-btn { border: 1px solid var(--primary-color); background-color: transparent; color: var(--primary-color); }
#print-btn:hover { background-color: var(--primary-color); color: white; }
#clear-btn { border: 1px solid #dc3545; background-color: transparent; color: #dc3545; }
#clear-btn:hover { background-color: #dc3545; color: white; }
.theme-switch-wrapper { display: flex; align-items: center; position: fixed; top: 20px; right: 20px; z-index: 100; }
.theme-switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.theme-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: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(26px); }
.slider .fa-sun { color: #f39c12; }
.slider .fa-moon { color: #f1c40f; }
@media (max-width: 600px) {
    .app-container { padding: 20px; margin: 20px 10px; }
    #dashboard-container { flex-direction: column; align-items: stretch; }
    h1 { font-size: 2rem; }
    .input-group { flex-direction: column; }
    .options-group { flex-direction: column; }
    .timeline { padding-left: 30px; }
    .timeline-item::before { left: -28px; top: 20px; }
    .timeline-content h3 { margin-right: 0; margin-bottom: 15px; }
    .completion-check { position: static; justify-content: flex-end; margin-top: 15px; }
}