/* 
    SECTION 1: CORE LAYOUT & BUTTON BAR
 */

/*  Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');


/* Prevent flash of incorrect content during load */
/*LET JS DECIDE WAT TO SHOW ON UI*/
.container,
#authSection {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.container:not(.hidden),
#authSection:not(.hidden) {
    opacity: 1;
}

/*  Global Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #E5E5E5; /* Restored original text color */
}

/*  Root Theme Variables */
:root {
    --bg-dark: #0D0D0F;
    --bg-card: rgba(25, 25, 30, 0.85);
    --bg-panel: rgba(30, 30, 35, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #FFCA28;
    --primary-light: #FFD740;
    --primary-dark: #FFB300;
    --danger: #B00020;
    --muted: #A0A0A0;
    --accent-gradient: linear-gradient(135deg, #FFCA28, #FFB300);
    --radius: 14px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --transition: 0.3s ease;
}

/*  Body & Overall Layout */
body {
    background: var(--bg-dark);
    color: #E5E5E5;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/*  Main Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 0;
}

/*  Button Bar Styling */

.container > div:first-child {
    margin-top: 0;
    padding-top: 10px;
    text-align: center;
}

/*  Buttons */
.button-container .add-task-btn,
.button-container .desktop-buttons .reset-default-btn,
.button-container .desktop-buttons .report-btn,
.button-container .desktop-buttons .settings-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(15px, 4vw, 17px);
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius);
    border: none;
    background: var(--accent-gradient);
    color: #0E0E10;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 12px rgba(255, 177, 0, 0.25);
    letter-spacing: 0.5px;
    margin: 10px 8px 20px;
    pointer-events: auto;
    z-index: 100;
}

/*  Hover Effects for Buttons */
.button-container .add-task-btn:hover,
.button-container .desktop-buttons .reset-default-btn:hover,
.button-container .desktop-buttons .report-btn:hover,
.button-container .desktop-buttons .settings-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 177, 0, 0.4);
}

/*  Secondary Buttons (Reset, Report, Settings) */
.button-container .desktop-buttons .reset-default-btn,
.button-container .desktop-buttons .report-btn,
.button-container .desktop-buttons .settings-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #E5E5E5;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.button-container .desktop-buttons .reset-default-btn:hover,
.button-container .desktop-buttons .report-btn:hover,
.button-container .desktop-buttons .settings-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* 
    SECTION 2: HEADER & TASK CARDS
*/

/*  Header Styling */
header {
    background: rgba(14, 14, 16, 0.7);
    backdrop-filter: blur(16px);
    padding: 15px 0;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    z-index: 10;
    animation: fadeInHeader 0.6s ease;
}

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

header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 38px);
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

header p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 3vw, 16px);
    color: var(--muted);
    margin-top: 8px;
    font-style: italic;
}

/*  Task Grid Layout */
.schedule {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.8rem;
    margin-bottom: 20px;
    margin-top: 1.5rem;
}

/*  Task Card Base */
.task {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/*  Task Hover Lift */
.task:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
}

/*  Expired Task Look */
.task.task-expired {
    opacity: 0.7;
    background: rgba(25, 25, 30, 0.5);
    border: 1px solid var(--muted);
}

.task.task-expired h2,
.task.task-expired p,
.task.task-expired strong {
    color: var(--muted);
}

/*  Category still visible on expired tasks */
.task.task-expired .category {
    background: var(--accent-gradient);
    opacity: 1;
    color: #0E0E10;
    border: 1px solid var(--primary-light);
}

/*  Task Title */
.task h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(20px, 4vw, 22px);
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/*  Task Description */
.task p {
    font-size: clamp(13px, 3vw, 14px);
    margin-top: 8px;
    color: var(--muted);
}

/*  Strong Text */
.task strong {
    color: #E5E5E5;
    font-weight: 600;
}

/*  Category Tag */
.task .category {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    margin-top: 0.5rem;
    border-radius: 20px;
    background: var(--accent-gradient);
    color: #0E0E10;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: clamp(11px, 2.5vw, 13px);
}

/* 
    SECTION 3: TASK ACTION BUTTONS & MODALS
*/

/*  Task Action Buttons */
.task .task-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.task .edit-btn,
.task .delete-btn,
.task .complete-late-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: clamp(13px, 3vw, 14px);
    font-weight: 600;
    border-radius: 8px;
    background: var(--accent-gradient);
    color: #0E0E10;
    border: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 12px rgba(255, 177, 0, 0.25);
    pointer-events: auto;
}

/*  Delete button - danger red */
.task .delete-btn {
    background: var(--danger);
    color: #E5E5E5;
}
.task .delete-btn:hover { background: #ff4f4f; }

/*  “Mark Late” button - subtle look */
.task .complete-late-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #E5E5E5;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/*  Hover lift for task action buttons */
.task .edit-btn:hover,
.task .delete-btn:hover,
.task .complete-late-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 177, 0, 0.4);
}

/*  Tooltip for “Mark Late” */
.task .complete-late-btn::after {
    content: 'Mark as Completed Late';
    position: absolute;
    bottom: 100%;
    right: 0;
    transform: none;
    background: rgba(20, 20, 20, 0.9);
    color: #E5E5E5;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    max-width: 200px;
    text-align: right;
    overflow-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 10;
}
.task .complete-late-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 
    TASK FORM & MODAL STYLES
 */

/* Base Styles for All Popups */
.task-form,
.modal,
.install-prompt {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    background: var(--bg-panel);
    backdrop-filter: blur(18px);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 600px;
    z-index: 5000;
    transition: opacity var(--transition), transform var(--transition);
}

/*  Active State — makes it appear */
.task-form.active,
.modal.active,
.install-prompt.active {
    display: block;
    animation: fadeInModal 0.35s ease forwards;
}

/*  Modal Titles */
.task-form h3,
.modal h3,
.install-prompt h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    text-align: center;
    margin-bottom: 15px;
    font-size: clamp(22px, 5vw, 24px);
    font-weight: 700;
    text-transform: uppercase;
}

/* Close Button (only install prompt uses it but style unified) */
.install-prompt .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #E5E5E5;
    font-size: 18px;
    cursor: pointer;
    transition: color var(--transition);
}

.install-prompt .close-btn:hover {
    color: var(--primary-light);
}

/*  Labels & Inputs */
.task-form label,
.modal label {
    display: block;
    color: #E5E5E5;
    margin-bottom: 6px;
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.task-form input,
.task-form textarea,
.task-form select,
.modal input,
.modal textarea,
.modal select {
    width: 100%;
    margin: 6px 0 12px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.05); /* Restored original background */
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #E5E5E5; /* Restored original text color */
    font-size: clamp(14px, 4vw, 16px);
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition), box-shadow var(--transition);
}

/*  Input focus-- glow */
.task-form input:focus,
.task-form textarea:focus,
.task-form select:focus,
.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(255, 177, 0, 0.4);
    outline: none;
}

/*  Category and Priority Dropdowns */
.task-form select,
.modal select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23E5E5E5' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); /* Restored original arrow color */
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

/*  Dropdown Options */
.task-form select option,
.modal select option {
    color: #E5E5E5;
    background: var(--bg-dark);
    font-family: 'Inter', sans-serif;
}

/*  Custom Category Input */
.task-form input#custom-category,
.modal input#edit-custom-category {
    display: none;
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
}

/*  Show Custom Input when visible */
.task-form input#custom-category.visible,
.modal input#edit-custom-category.visible {
    display: block;
}

/*  Emoji Input Wrapper */
.emoji-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 600px;
    position: relative;
    margin: 0 auto;
}

.emoji-input-wrapper input,
.emoji-input-wrapper textarea {
    flex: 1;
    font-family: 'Inter', sans-serif;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #E5E5E5;
    font-size: clamp(14px, 4vw, 16px);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.emoji-input-wrapper input:focus,
.emoji-input-wrapper textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(255, 177, 0, 0.4);
    outline: none;
}

/*  Emoji Button */
.emoji-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.emoji-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 177, 0, 0.4);
}

/*  Emoji Picker */
emoji-picker {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5100;
    background: var(--bg-panel);
    backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 300px;
    margin-top: 4px;
    overflow: hidden;
}

emoji-picker.active {
    display: block;
}

/* Buttons Row in Modals */
.task-form .form-buttons,
.modal .modal-buttons,
.install-prompt .install-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/*  Primary Buttons */
.task-form button,
.modal button,
.install-prompt button {
    flex: 1;
    min-width: 90px;
    max-width: 130px;
    padding: 0.8rem;
    background: var(--accent-gradient);
    color: #0E0E10;
    border: none;
    border-radius: 8px;
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 12px rgba(255, 177, 0, 0.25);
    pointer-events: auto;
    font-family: 'Inter', sans-serif;
}

/*  Secondary Buttons */
.task-form .cancel-btn,
.task-form .clear-btn,
.modal .modal-cancel-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #E5E5E5;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    font-family: 'Inter', sans-serif;
}

/*  Hover Effects */
.task-form button:hover,
.modal button:hover,
.install-prompt button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 177, 0, 0.4);
}

/*  Disabled State */
.modal button:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/*  Error Messages in Modal */
.modal-error,
.permission-error {
    color: var(--danger);
    font-size: clamp(12px, 3vw, 14px);
    text-align: center;
    margin-bottom: 10px;
    display: none;
    font-family: 'Inter', sans-serif;
}

/* 
    MODAL FADE-IN ANIMATION
 */
@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ================================
   🎉 SECTION 4: PROGRESS BAR, STATS PANEL & CELEBRATION
================================ */

/* ✅ Progress Bar Container */
.progress-container {
    width: 90%;
    max-width: 600px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    margin: 2rem auto;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

/*  Progress Fill */
.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 50px;
    transition: width 0.5s ease;
    position: relative;
}

/*  Glossy Shine Animation */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/*  Progress Text */
#progressText {
    text-align: center;
    margin: 10px 0;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(14px, 3vw, 16px);
}

/*  Stats Panel Container */
.stats-panel {
    display: none;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    border: 1px solid var(--glass-border);
}

/*  Show Stats Panel */
.stats-panel.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

/*  Stats Title */
.stats-panel h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
    font-size: clamp(24px, 5vw, 26px);
    font-weight: 900;
    text-transform: uppercase;
}

/*  Stats Sections */
.stats-section {
    margin-bottom: 25px;
    animation: fadeInStats 0.5s ease;
}
@keyframes fadeInStats {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-section h4 {
    color: var(--primary);
    font-size: clamp(18px, 4vw, 20px);
    font-weight: 700;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 6px;
}
.stats-section p {
    font-size: clamp(13px, 3vw, 15px);
    color: #E5E5E5;
    margin-bottom: 10px;
}
.stats-section ul {
    list-style: none;
    padding-left: 15px;
}
.stats-section ul li {
    font-size: clamp(13px, 3vw, 15px);
    color: #E5E5E5;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}
.stats-section ul li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-size: 20px;
}

/*  Divider */
hr.stats-divider {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 20px 0;
}

/*  Chart Styling */
#statsChart {
    max-width: 100%;
    max-height: 350px;
    margin: 20px auto;
    animation: slideInChart 0.7s ease;
}
@keyframes slideInChart {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
#chartError {
    display: none;
    color: var(--danger);
    font-size: clamp(13px, 3vw, 15px);
    text-align: center;
    margin: 10px 0;
}

/*  Congrats Message - Smooth Snake Light + Rave Jitter */
#congratsMessage {
    position: fixed;          /* 👈 FIXED instead of absolute */
    top: 50%;                 /* Center vertically */
    left: 50%;                /* Center horizontally */
    transform: translate(-50%, -50%); /* Perfect center */
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 900;
    color: #FFB100;
    pointer-events: none;
    z-index: 10000;
    display: none;
    max-width: 90%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;

    /* 🎇 Multiple animations: smoother snake + jitter */
    animation: snakeLight 1.8s ease-in-out infinite, textJitter 0.12s ease-in-out infinite;
}

/*  Snake-like light (smooth but fast) */
@keyframes snakeLight {
    0% { 
        background: linear-gradient(90deg, transparent 0%, #FFEA8A 10%, #FFB100 20%, transparent 30%);
        background-size: 200% 100%;
        -webkit-background-clip: text;
        color: transparent;
        background-position: 0% 0;
    }
    50% { 
        background-position: 100% 0; 
    }
    100% { 
        background-position: 200% 0;
    }
}

/*  Softer but quicker jitter for rave vibe */
@keyframes textJitter {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(0.5px, -0.5px); }
    40%  { transform: translate(-0.5px, 0.5px); }
    60%  { transform: translate(0.5px, 0.5px); }
    80%  { transform: translate(-0.5px, -0.5px); }
    100% { transform: translate(0, 0); }
}

/*  Confetti Canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
}

/* 
    SECTION 5: CHECKBOXES & FOOTER
 */

/*  Notification Toggle in Settings Modal */
input[type="checkbox"].notification-toggle {
    appearance: none;
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    margin: 6px 0 12px;
    transition: background var(--transition);
}

input[type="checkbox"].notification-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #E5E5E5;
    border-radius: 50%;
    transition: transform var(--transition);
}

input[type="checkbox"].notification-toggle:checked {
    background: var(--primary);
}

input[type="checkbox"].notification-toggle:checked::before {
    transform: translateX(20px);
}

input[type="checkbox"].notification-toggle:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    opacity: 0.5;
}

/*  Task Checkboxes */
input[type="checkbox"]:not(.notification-toggle) {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
}

input[type="checkbox"]:not(.notification-toggle):hover {
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 177, 0, 0.4);
    transition: transform var(--transition), box-shadow var(--transition);
}

input[type="checkbox"]:not(.notification-toggle):disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

input[type="checkbox"]:not(.notification-toggle):checked + label {
    text-decoration: line-through;
    color: var(--muted);
}

/* Footer - PWA style */
.help-footer {
    background: rgba(14, 14, 16, 0.8);  /* glass effect */
    backdrop-filter: blur(16px);
    padding: 1.5rem 0;                  /* reduce padding so it hugs bottom */
    margin: 0;
    position: relative;                 /* can stay relative if page content pushes it */
    width: 100%;
    bottom: 0;
    left: 0;
}

.help-footer .footer-text {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: clamp(13px, 3vw, 14px);
    line-height: 1.6;
    color: var(--muted); /* muted grey for non-link text */
}

.help-footer .footer-text a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

.help-footer .footer-text a:hover {
    color: var(--primary-light);
}

/* Grey out non-link parts */
.help-footer .footer-text span.greyed {
    color: var(--muted);
}

.hidden {
  display: none;
}

.day-block {
  margin-bottom: 10px; /* Space between each block */
}

.summary-line {
  cursor: pointer;
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 4px;
}

.summary-line.missed {
  color: #FF3B30; /* 🔴 Red for Missed */
}

.summary-line.late {
  color: #FFA500; /* 🟠 Orange for Late */
}

.summary-line:hover {
  text-decoration: underline;
}

/*  Consistent bullet alignment */
#weeklyDetails ul {
    /* or square */
  list-style-position: outside;
  margin-left: 20px;
  padding-left: 0;
}

#weeklyDetails li {
  margin: 2px 0;
  line-height: 1.4em;
}

/*  Headers for today’s full lists */
.today-header {
  font-weight: 700;
  margin-top: 12px;
  margin-bottom: 4px;
}

.missed-header {
  color: #FF3B30; /* red for missed */
}

.late-header {
  color: #FFA500; /* orange for late */
}

/*  Expandable summaries for older days */
.summary-line {
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 2px;
}

.missed-summary {
  color: #FF3B30; /* red summary for missed */
}

.late-summary {
  color: #FFA500; /* orange summary for late */
}

/* ✅ Hidden list when collapsed */
.hidden {
  display: none;
}

/* 
    RESPONSIVE DESIGN
 */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 20px 0 1.5rem; /* Added 20px top padding for space from roof to first button */
    }

    /*  Button Bar Styling for Mobile */
    .container > div:first-child {
        margin-top: 0;
        padding-top: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px; /* Space between buttons */
    }

    /*  Space from last button to header */
    .container > div:first-child + * {
        margin-top: 20px; /* Matches top padding, space from last button to header */
    }

    .add-task-btn,
    .reset-default-btn,
    .report-btn,
    .settings-btn {
        padding: 0.7rem 1.2rem;
        font-size: clamp(13px, 3.5vw, 15px);
        margin: 0;
        min-width: 200px;
        width: 90%;
        box-sizing: border-box;
    }

    .task-form,
    .modal,
    .install-prompt {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
    }

    .task-form input,
    .task-form textarea,
    .task-form select,
    .modal input,
    .modal textarea,
    .modal select {
        padding: 0.7rem;
        font-size: clamp(13px, 3.5vw, 15px);
    }

    .task-form .form-buttons,
    .modal .modal-buttons,
    .install-prompt .install-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .task-form button,
    .modal button,
    .install-prompt button {
        max-width: 100%;
        padding: 0.7rem;
        font-size: clamp(12px, 3vw, 14px);
    }

    .task .complete-late-btn::after {
        font-size: 11px;
        padding: 5px 8px;
        max-width: 160px;
    }

    /* 
    RESPONSIVE DESIGN
 */
@media (max-width: 768px) {
    .emoji-btn {
        display: none; /* Hide only the emoji button on mobile */
    }
}

    .schedule {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .task {
        padding: 1.2rem;
    }

    .task h2 {
        font-size: clamp(18px, 4vw, 20px);
    }

    .task p {
        font-size: clamp(12px, 3vw, 13px);
    }

    .task .category {
        font-size: clamp(10px, 2.5vw, 12px);
    }

    .task .edit-btn,
    .task .delete-btn,
    .task .complete-late-btn {
        padding: 0.5rem 0.8rem;
        font-size: clamp(12px, 3vw, 13px);
    }

    .progress-container,
    .stats-panel {
        width: 95%;
    }

    .progress-container {
        height: 18px;
    }

    #progressText,
    .stats-section p,
    .stats-section ul li {
        font-size: clamp(12px, 3vw, 14px);
    }

    #statsChart {
        max-height: 250px;
    }
}

@media (max-width: 400px) {
    header {
        padding: 1rem 0;
    }

    header h1 {
        font-size: clamp(24px, 6vw, 32px);
    }

    header p {
        font-size: clamp(12px, 3.5vw, 14px);
    }

    .task-form h3,
    .modal h3,
    .install-prompt h3 {
        font-size: clamp(20px, 5vw, 22px);
    }

    .stats-panel h3 {
        font-size: clamp(20px, 5vw, 22px);
    }
}

/* ====
    MOBILE DROPDOWN STYLES
===== */

/* Button Container */
.button-container {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

/* Desktop Buttons - Visible by default */
.desktop-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Mobile Dropdown - Hidden by default */
.mobile-dropdown {
    display: none;
    position: relative;
}

.more-options-btn {
    padding: 0.7rem 1.2rem;
    font-size: clamp(13px, 3.5vw, 15px);
    margin: 0;
    width: 90%;
    min-width: 200px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.08);
    color: #E5E5E5;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.more-options-btn:hover,
.more-options-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.more-options-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 250px;
    background: var(--bg-panel);
    backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 5px;
    z-index: 2000; /* High z-index to stay above header */
    list-style: none;
    padding: 0;
    overflow: visible;
}

.dropdown-content button {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: clamp(13px, 3vw, 14px);
    border: none;
    background: none;
    color: #E5E5E5;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition);
}

.dropdown-content button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-dropdown.active .dropdown-content {
    display: block;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .desktop-buttons {
        display: none;
    }

    .mobile-dropdown {
        display: block;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    /* MAIN ACTION BUTTON */
    .button-container .add-task-btn {
        padding: 0.7rem 1.2rem;
        font-size: clamp(13px, 3.5vw, 15px);
        margin: 0;
        width: 90%;
        max-width: 300px;
        box-sizing: border-box;
        border: none;
        border-radius: var(--radius);
        cursor: pointer;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, filter 0.3s ease;
        font-family: 'Inter', sans-serif;
        background: var(--accent-gradient);
        color: #0E0E10;
        box-shadow: 0 4px 12px rgba(255, 177, 0, 0.3);
        text-align: center;
        position: relative;
        overflow: hidden;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    .button-container .add-task-btn:hover,
    .button-container .add-task-btn:focus {
        transform: translateY(-3px) rotateX(5deg);
        box-shadow: 0 6px 20px rgba(255, 177, 0, 0.5);
        filter: brightness(1.1) drop-shadow(0 0 12px rgba(255, 202, 40, 0.6));
        animation: pulseGlow 1.5s infinite alternate;
    }

    .button-container .add-task-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(255, 202, 40, 0.7);
    }

    .button-container .add-task-btn:active {
        transform: translateY(0) scale(0.98) rotateX(0deg);
        box-shadow: 0 2px 8px rgba(255, 177, 0, 0.3);
    }

    /* Multi-Wave Ripple Effect */
    .add-task-btn::before,
    .add-task-btn::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        opacity: 0;
        pointer-events: none;
    }

    .add-task-btn::before {
        width: 5px;
        height: 5px;
        transition: transform 0.5s ease-out, opacity 0.7s ease-out;
    }

    .add-task-btn::after {
        width: 10px;
        height: 10px;
        transition: transform 0.7s ease-out, opacity 0.9s ease-out;
    }

    .add-task-btn:active::before {
        transform: scale(20);
        opacity: 0.6;
    }

    .add-task-btn:active::after {
        transform: scale(30);
        opacity: 0.4;
    }

    /* Sparkle Effect */
    .add-task-btn:hover::after {
        content: '✨';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        font-size: 16px;
        color: #FFD740;
        animation: sparkle 1s infinite alternate;
    }

    /* SECONDARY DROPDOWN BUTTON */
    .more-options-btn {
        padding: 0.7rem 1.2rem;
        font-size: clamp(13px, 3.5vw, 15px);
        margin: 0;
        width: 90%;
        max-width: 300px;
        box-sizing: border-box;
        border: none;
        border-radius: var(--radius);
        cursor: pointer;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, filter 0.3s ease, background 0.3s ease;
        font-family: 'Inter', sans-serif;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.22));
        color: #E5E5E5;
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.12);
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .more-options-btn:hover,
    .more-options-btn:focus {
        transform: translateY(-3px) rotateX(5deg);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
        filter: brightness(1.1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
        animation: pulseGlow 1.5s infinite alternate;
    }

    .more-options-btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
    }

    .more-options-btn:active {
        transform: translateY(0) scale(0.98) rotateX(0deg);
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }

    /* Multi-Wave Ripple Effect */
    .more-options-btn::before,
    .more-options-btn::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.4);
        opacity: 0;
        pointer-events: none;
    }

    .more-options-btn::before {
        width: 5px;
        height: 5px;
        transition: transform 0.5s ease-out, opacity 0.7s ease-out;
    }

    .more-options-btn::after {
        width: 10px;
        height: 10px;
        transition: transform 0.7s ease-out, opacity 0.9s ease-out;
    }

    .more-options-btn:active::before {
        transform: scale(20);
        opacity: 0.6;
    }

    .more-options-btn:active::after {
        transform: scale(30);
        opacity: 0.4;
    }

    .more-options-btn:hover::after {
        content: '✨';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        font-size: 16px;
        color: #E5E5E5;
        animation: sparkle 1s infinite alternate;
    }

    /* DROPDOWN MENU */
    .dropdown-content {
        width: auto;
        min-width: 220px;
        max-width: 300px;
        background: rgba(30, 30, 35, 0.65);
        backdrop-filter: blur(18px) saturate(160%);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        margin-top: 5px;
        padding: 0.5rem;
        display: none;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2000;
        max-height: 200px;
        overflow-y: auto;
        animation: cascadeReveal 0.3s ease-out;
    }

    .mobile-dropdown.active .dropdown-content {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }

    /* DROPDOWN ITEMS */
    .dropdown-content button {
        padding: 0.6rem 1rem;
        font-size: clamp(13px, 3vw, 14px);
        border: none;
        background: rgba(255, 255, 255, 0.06);
        color: #E5E5E5;
        text-align: center;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
        width: auto;
        min-width: 180px;
        align-self: center;
        position: relative;
        overflow: hidden;
    }

    .dropdown-content button:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px) rotateZ(2deg);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        filter: brightness(1.1);
    }

    .dropdown-content button:active {
        transform: translateY(0) scale(0.98) rotateZ(0deg);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    /* Subtle divider with gradient */
    .dropdown-content button + button {
        border-top: 1px solid transparent;
        background: linear-gradient(to top, rgba(255, 255, 255, 0.08), transparent);
        margin-top: 0.2rem;
    }

    /* ACCESSIBILITY FOCUS */
    .dropdown-content button:focus {
        outline: 2px solid rgba(255, 200, 50, 0.9);
        outline-offset: 2px;
        box-shadow: 0 0 5px rgba(255, 200, 50, 0.6);
        filter: brightness(1.2);
    }

    /* Preview on Hover */
    .dropdown-content button:hover::after {
        content: attr(data-preview) ' →';
        position: absolute;
        right: 10px;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .dropdown-content button:hover::after {
        opacity: 1;
    }
}

/* Animations */
@keyframes pulseGlow {
    from {
        filter: brightness(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }
    to {
        filter: brightness(1.2) drop-shadow(0 0 16px rgba(255, 255, 255, 0.6));
    }
}

@keyframes sparkle {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }
    to {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

@keyframes cascadeReveal {
    from {
        opacity: 0;
        transform: translate(-50%, -10px) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) rotateX(0deg);
    }
}








/*--------------
Banner Styles ON 1ST custom TASK 
-----------------*/

#customTaskBanner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #141414;
    color: #E5E5E5;
    padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 20px);
    border-radius: 8px;
    margin: 16px auto;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 3.5vw, 16px);
    line-height: 1.5;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

#customTaskBanner.active {
    opacity: 1;
    transform: translateY(0);
}

#customTaskBanner.hidden {
    display: none;
}

#customTaskBanner p {
    margin: 0;
    flex: 1;
}

#dismissBannerBtn {
    background: #FFB100;
    color: #141414;
    border: none;
    padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 16px);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#dismissBannerBtn:hover {
    background: #FFC107;
    transform: scale(1.05);
}

#dismissBannerBtn:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    #customTaskBanner {
        flex-direction: column;
        text-align: center;
        padding: 12px 16px;
        margin: 12px 8px;
    }

    #dismissBannerBtn {
        margin-top: 12px;
        width: 100%;
        max-width: 200px;
    }
}
/* ------------------
END OF BANNER STYLES
 ------------------------*/











/* === Auth Section === */


#authSection {
  display: flex !important;  /* Force flex layout */
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
}

/* Hide/show with JS-friendly classes */
#authSection.hidden { display: none !important; } 
.app-content.hidden { display: none !important; }




#authSection {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark), #1a1a2e);
    padding: 1rem;
    overflow: hidden;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    padding: 2.25rem;
    width: 100%;
    max-width: 460px;
    text-align: center;
    animation: slideUp 0.7s cubic-bezier(0.33, 1, 0.68, 1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 177, 0, 0.08), transparent);
    animation: shimmer 5s infinite;
}

.auth-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 5.2vw, 34px);
    color: #fff;
    margin-bottom: 1.25rem;
    letter-spacing: 0.2px;
}

.auth-card p {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 1.75rem;
    font-style: italic;
    line-height: 1.6;
    opacity: 0.9;
}

/* === Auth Form === */
#authForm {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

#authForm label {
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.3s ease;
}

#authForm input {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    padding: 0.9rem 1.2rem;
    font-size: 15px;
    color: #fff;
    transition: all 0.3s ease-in-out;
}

#authForm input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 6px rgba(255, 177, 0, 0.3);
}

/* === Auth Buttons === */
#authBtn,
#guestBtn {
    font-weight: 600;
    font-size: 15px;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#authBtn {
    background: var(--primary);
    color: #0E0E10;
}

#authBtn:hover {
    background: #ffca28;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 177, 0, 0.3);
}

#guestBtn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

#guestBtn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* === Auth Links === */
#authToggle,
#forgotPassword {
    font-size: 14px;
    color: var(--muted);
    margin-top: 0.75rem;
}

#authToggle a,
#forgotPassword a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

#authToggle a:hover,
#forgotPassword a:hover {
    color: #ffca28;
    text-decoration: underline;
}


































/* === My Account Dropdown === */

/* My Account Button in Settings Modal */
#myAccountBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Slightly reduced icon-text spacing for compactness */
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 179, 0, 0.1)); /* Softer gold gradient */
    border: 1px solid transparent; /* Base for border-image */
    border-image: linear-gradient(135deg, #FFD700, #FFAA00) 1; /* Metallic gradient edge */
    color: #FFD700; /* Gold text */
    padding: 0.7rem 1.4rem; /* More button-like proportions */
    border-radius: 8px; /* Rounded corners for a modern button look */
    font-family: 'Inter', sans-serif; /* Premium typography */
    font-weight: 600; /* Less bold for button-like feel */
    font-size: 14px; /* Smaller, more button-appropriate size */
    letter-spacing: 0.5px; /* Subtle spacing */
    cursor: pointer;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* Snappier transitions */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), /* Lighter shadow for depth */
                0 0 6px rgba(255, 215, 0, 0.15); /* Subtle gold glow */
    margin: 12px 0; /* Balanced spacing in modal */
    width: 100%; /* Full-width for consistency */
    max-width: 200px; /* Slightly smaller for button aesthetic */
}

/* Person SVG Icon */
#myAccountBtn::before {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="%23FFD700"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>'); /* Slightly smaller gold-filled icon */
    display: inline-block;
    width: 16px;
    height: 16px;
    transform-origin: center;
    transition: transform 0.2s ease;
}

/* Hover state */
#myAccountBtn:hover {
    background: linear-gradient(135deg, #FFD700, #FFAA00); /* Vibrant gold gradient */
    color: #1A1A1E; /* Dark text for contrast */
    transform: translateY(-1px); /* Subtle lift */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), /* Moderate depth */
                0 0 8px rgba(255, 215, 0, 0.25); /* Soft glow */
}

#myAccountBtn:hover::before {
    transform: scale(1.05); /* Subtle icon pop */
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="%231A1A1E"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>'); /* Dark icon for contrast */
}

/* Active state (Tap feedback) */
#myAccountBtn:active {
    transform: translateY(0) scale(0.99); /* Minimal press effect */
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1); /* Reduced shadow */
}

/* Focus state for accessibility */
#myAccountBtn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3); /* Thinner gold focus ring */
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    #myAccountBtn {
        padding: 0.6rem 1.2rem; /* More compact */
        font-size: 13px; /* Readable */
        max-width: 180px; /* Smaller for mobile */
        margin: 10px 0; /* Adjusted spacing */
    }

    #myAccountBtn::before {
        content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="%23FFD700"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
        width: 14px;
        height: 14px;
    }
}

/* Extra Small Screens */
@media (max-width: 400px) {
    #myAccountBtn {
        padding: 0.5rem 1rem; /* Ultra compact */
        font-size: 12px; /* Compact text */
        max-width: 160px; /* Minimal size */
        margin: 8px 0; /* Minimal spacing */
    }

    #myAccountBtn::before {
        content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="%23FFD700"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
        width: 12px;
        height: 12px;
    }
}
/* === My Account Dropdown === */
#myAccount {
    position: fixed;
    top: 80px; /* Optimal spacing from top for desktop */
    right: 20px; /* Consistent edge spacing */
    background: #1A1A1E; /* Fully opaque, premium dark shade */
    border: 1px solid rgba(255, 255, 255, 0.12); /* Subtle border for definition */
    border-radius: var(--radius); /* Consistent with app's radius */
    padding: 1.75rem; /* Spacious padding for elegance */
    min-width: 280px; /* Wider for a refined layout */
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); /* Deeper shadow for depth */
    z-index: 1000; /* Ensures prominence over other elements */
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth, subtle animation */
    display: none; /* Hidden by default, toggled by JS */
}

/* Hidden state */
#myAccount.hidden {
    display: none !important;
}

/* Dropdown content styling */
#myAccount p {
    font-size: 15px; /* Balanced for readability */
    margin-bottom: 1rem; /* Structured spacing */
    color: var(--muted); /* Muted tone for secondary info */
    line-height: 1.6; /* Comfortable line height */
    font-weight: 400; /* Light weight for clarity */
    letter-spacing: 0.2px; /* Subtle letter spacing for polish */
}

/* Account type and registration status */
#myAccount .account-type,
#myAccount .registration-status {
    font-size: 16px; /* Prominent size for key info */
    font-weight: 600; /* Bold for emphasis */
    color: #E5E5E5; /* High-contrast text */
    margin-bottom: 0.75rem; /* Consistent spacing */
    letter-spacing: 0.3px; /* Enhanced readability */
}

/* Highlight account type with primary color */
#myAccount .account-type span {
    color: var(--primary); /* Vibrant primary color for emphasis */
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); /* Gradient for flair */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent; /* Gradient text effect */
}

/* Separator line for visual hierarchy */
#myAccount hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15); /* Subtle separator */
    margin: 1.25rem 0; /* Balanced spacing */
}

/* Logout button styling */
#logoutBtn {
    background: var(--danger); /* Bold danger color */
    color: #fff; /* High-contrast text */
    width: 100%; /* Full-width for prominence */
    padding: 0.95rem; /* Comfortable padding */
    border: none;
    border-radius: calc(var(--radius) - 4px); /* Slightly smaller radius */
    font-size: 15px; /* Readable size */
    font-weight: 600; /* Bold for confidence */
    cursor: pointer;
    transition: all var(--transition); /* Smooth transitions for all properties */
    margin-top: 0.75rem; /* Balanced spacing */
    position: relative;
    overflow: hidden; /* For hover effect */
}

/* Hover effect with subtle scaling */
#logoutBtn:hover {
    background: linear-gradient(135deg, #B00020, #8B0000); /* Refined gradient */
    transform: scale(1.02); /* Subtle scaling for feedback */
    box-shadow: 0 6px 16px rgba(176, 0, 32, 0.5); /* Dynamic shadow */
}

/* Active state for tactile feedback */
#logoutBtn:active {
    transform: scale(0.98); /* Slight shrink on click */
    box-shadow: 0 4px 12px rgba(176, 0, 32, 0.3); /* Reduced shadow */
}

/* Animation for dropdown appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px); /* Slightly larger initial offset */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    #myAccount {
        min-width: 240px; /* Compact but usable width */
        right: 12px; /* Tighter edge spacing */
        top: 60px; /* Adjusted for mobile header */
        padding: 1.25rem; /* Slightly reduced padding */
        border-radius: calc(var(--radius) - 2px); /* Slightly smaller radius */
    }

    #myAccount p,
    #myAccount .account-type,
    #myAccount .registration-status {
        font-size: 14px; /* Smaller text for mobile */
        margin-bottom: 0.75rem; /* Tighter spacing */
    }

    #logoutBtn {
        padding: 0.8rem; /* Slightly smaller padding */
        font-size: 14px; /* Adjusted for mobile */
    }
}

/* Extra small screens (e.g., very small phones) */
@media (max-width: 400px) {
    #myAccount {
        min-width: 200px; /* Minimum width for usability */
        right: 8px;
        top: 50px;
        padding: 1rem;
    }
}



/* === Animations === */
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === Accessibility === */
#authForm input:focus-visible,
#authBtn:focus-visible,
#guestBtn:focus-visible,
#myAccountBtn:focus-visible,
#logoutBtn:focus-visible
 {
    outline: 2px solid #ffca28;
    outline-offset: 2px;
}

/* === Responsive === */
@media (max-width: 600px) {
    #authSection {
        padding: 0.5rem;
    }

    .auth-card {
        padding: 1.75rem;
        width: calc(100% - 1rem);
        max-width: none;
        margin: 0.5rem;
    }

    #authBtn,
    #guestBtn
     {
        font-size: 14px;
        padding: 0.75rem;
    }

    .auth-card h2 {
        font-size: clamp(24px, 5vw, 30px);
    }

    #authForm input {
        font-size: 14px;
        padding: 0.8rem 1rem;
    }

    #myAccount {
        min-width: 100%;
        right: 0;
        left: 0;
        margin: 0.5rem 0;
    }

    #myAccountBtn,
    #logoutBtn {
        font-size: 14px;
        padding: 0.75rem;
    }
}






/* === Logout Confirmation Modal BOTH AUTH-USER & GUEST === */
#logoutConfirmModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Darker overlay for premium focus */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Above all content */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out; /* Fast, smooth fade */
}

#logoutConfirmModal.active {
    opacity: 1;
    pointer-events: all;
}

/* Modal Content */
.logout-modal-content {
    position: relative;
    background: #1A1A1E; /* Opaque, premium dark background */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle, elegant border */
    border-radius: var(--radius); /* Consistent app radius */
    padding: 2.25rem; /* Generous padding for luxury */
    max-width: 400px; /* Compact yet balanced */
    width: 85%; /* Responsive width */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3); /* Layered shadow for depth */
    transform: translateY(20px); /* Initial offset for animation */
    transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.3s ease-out;
}

#logoutConfirmModal.active .logout-modal-content {
    transform: translateY(0); /* Slide into place */
    opacity: 1;
}

/* Hidden States */
#authUserLogout.hidden,
#guestLogoutPrompt.hidden {
    display: none !important;
}

/* Visible States */
#authUserLogout,
#guestLogoutPrompt {
    display: block;
}

/* Modal Header */
.logout-modal-content h3 {
    font-size: 22px; /* Bold, prominent header */
    font-weight: 700; /* Strong emphasis */
    color: #E5E5E5; /* High-contrast text */
    margin-bottom: 1.25rem; /* Spacious separation */
    font-family: 'Inter', sans-serif; /* Consistent typography */
    letter-spacing: 0.4px; /* Refined spacing */
    text-align: center; /* Centered for impact */
}

/* Paragraph Styling */
.logout-modal-content p {
    font-size: 14px; /* Clean, readable */
    color: var(--muted); /* Muted for secondary info */
    line-height: 1.7; /* Comfortable reading */
    margin-bottom: 1.25rem; /* Balanced spacing */
    text-align: center; /* Centered for consistency */
}

/* Warning Emoji for Authenticated Users */
#authUserLogout p::before {
    content: "⚠️";
    color: var(--primary); /* Highlight with primary color */
    margin-right: 10px; /* Subtle spacing */
    font-size: 18px; /* Slightly larger for emphasis */
}

/* List Styling */
.logout-modal-content ul {
    list-style: none; /* Minimalist look */
    margin: 1rem 0 1.75rem; /* Generous spacing */
    padding-left: 1.25rem; /* Indent for alignment */
    text-align: left; /* Left-aligned for clarity */
}

/* List Items */
.logout-modal-content ul li {
    font-size: 13px; /* Compact for hierarchy */
    color: #E5E5E5; /* Bright, readable text */
    line-height: 1.7; /* Spacious line height */
    margin-bottom: 0.6rem; /* Tight but balanced */
    position: relative;
}

/* Custom Bullet */
.logout-modal-content ul li::before {
    content: "◆"; /* Diamond bullet for premium feel */
    color: var(--primary); /* Primary color for elegance */
    position: absolute;
    left: -1.25rem; /* Precise alignment */
    font-size: 12px; /* Subtle bullet size */
}

/* Modal Actions Container (Authenticated Users) */
.modal-actions {
    display: flex;
    gap: 1.25rem; /* Refined spacing */
    justify-content: center; /* Centered for balanced UX */
}

/* Danger Button (Log Out Anyway) */
#confirmLogoutBtn.danger-btn {
    background: var(--danger); /* Bold danger color */
    color: #fff; /* High-contrast */
    padding: 0.9rem 1.75rem; /* Comfortable size */
    border: none;
    border-radius: calc(var(--radius) - 4px); /* Consistent radius */
    font-size: 14px; /* Clear and readable */
    font-weight: 600; /* Confident weight */
    cursor: pointer;
    transition: all var(--transition); /* Smooth transitions */
    box-shadow: 0 4px 12px rgba(176, 0, 32, 0.3); /* Subtle shadow */
}

/* Hover effect for danger button */
#confirmLogoutBtn.danger-btn:hover {
    background: #8B0000; /* Darker red for focus */
    transform: translateY(-3px); /* Raised effect */
    box-shadow: 0 8px 20px rgba(176, 0, 32, 0.5); /* Stronger shadow */
}

/* Active state for danger button */
#confirmLogoutBtn.danger-btn:active {
    transform: translateY(0); /* Reset position */
    box-shadow: 0 4px 12px rgba(176, 0, 32, 0.2); /* Reduced shadow */
}

/* Cancel Button */
#cancelLogoutBtn.cancel-btn {
    background: transparent; /* Minimalist, premium look */
    color: #E5E5E5; /* High-contrast */
    padding: 0.9rem 1.75rem; /* Matches danger button */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border */
    border-radius: calc(var(--radius) - 4px); /* Consistent radius */
    font-size: 14px; /* Readable */
    font-weight: 500; /* Lighter for hierarchy */
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Hover effect for cancel button */
#cancelLogoutBtn.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15); /* Slight highlight */
    transform: translateY(-3px); /* Raised effect */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); /* Stronger shadow */
}

/* Active state for cancel button */
#cancelLogoutBtn.cancel-btn:active {
    transform: translateY(0); /* Reset position */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Reduced shadow */
}

/* Guest Logout Prompt Specific Styling */
#guestLogoutPrompt.guest-logout-message {
    text-align: center; /* Welcoming, centered layout */
}

/* Sign Up Button */
#goToSignupBtn.auth-btn {
    background: var(--primary); /* Solid primary color for simplicity */
    color: #1A1A1E; /* Dark text for contrast */
    padding: 0.9rem; /* Consistent padding */
    border: none;
    border-radius: calc(var(--radius) - 4px); /* Consistent radius */
    font-size: 15px; /* Slightly larger for prominence */
    font-weight: 700; /* Bolder for emphasis */
    cursor: pointer;
    width: 100%; /* Full-width for impact */
    margin: 1.25rem 0 1rem; /* Balanced spacing */
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(255, 202, 40, 0.3); /* Subtle shadow */
}

/* Hover effect for sign-up button */
#goToSignupBtn.auth-btn:hover {
    transform: translateY(-3px); /* Raised effect, standard UX */
    box-shadow: 0 8px 20px rgba(255, 202, 40, 0.5); /* Bolder shadow */
    background: var(--primary-light); /* Lighter shade for focus */
}

/* Active state for sign-up button */
#goToSignupBtn.auth-btn:active {
    transform: translateY(0); /* Reset position */
    box-shadow: 0 4px 12px rgba(255, 202, 40, 0.2); /* Reduced shadow */
}

/* Sign In Link */
#goToLoginLink {
    color: var(--primary); /* Primary color for consistency */
    text-decoration: none;
    font-weight: 600; /* Slightly bolder for clarity */
    font-size: 14px; /* Readable */
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

/* Hover effect for sign-in link */
#goToLoginLink:hover {
    color: var(--primary-light); /* Brighter on hover */
    text-decoration: underline; /* Standard underline for links */
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .logout-modal-content {
        max-width: 90%; /* Flexible width */
        padding: 1.5rem; /* Compact padding */
        border-radius: calc(var(--radius) - 3px); /* Slightly smaller radius */
    }

    .logout-modal-content h3 {
        font-size: 18px; /* Smaller header */
    }

    .logout-modal-content p,
    .logout-modal-content ul li {
        font-size: 13px; /* Compact text */
    }

    .modal-actions {
        flex-direction: column; /* Stack buttons */
        gap: 0.75rem; /* Tight spacing */
    }

    #confirmLogoutBtn.danger-btn,
    #cancelLogoutBtn.cancel-btn,
    #goToSignupBtn.auth-btn {
        padding: 0.8rem; /* Smaller padding */
        font-size: 13px; /* Smaller text */
        width: 100%; /* Full-width */
    }

    #goToLoginLink {
        font-size: 13px; /* Smaller link */
    }
}

/* Extra Small Screens */
@media (max-width: 400px) {
    .logout-modal-content {
        padding: 1.25rem; /* Minimal padding */
        max-width: 95%; /* Tighter fit */
    }

    .logout-modal-content h3 {
        font-size: 16px; /* Minimal header */
    }

    .logout-modal-content p,
    .logout-modal-content ul li {
        font-size: 12px; /* Minimal text */
    }

    #goToLoginLink {
        font-size: 12px; /* Minimal link size */
    }
}











/* === EYE TOGGLE ON AUTH FORM  === */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-input-container input[type="password"],
.password-input-container input[type="text"] {
    padding-right: 40px; /* Make space for the toggle button */
    width: 100%;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0;
    outline: none;
}

.password-toggle .material-icons {
    font-size: 20px;
}

.password-toggle:hover {
    color: #333;
}




/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--surface-hover);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.2);
}

.back-to-top-icon {
    font-size: 1.2rem;
}

.back-to-top-text {
    display: none;
    transition: opacity var(--transition);
}

.back-to-top:hover .back-to-top-text {
    display: inline;
    opacity: 1;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem;
    }
}



/* Loading Overlay - Fully Opaque Dark Theme */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark); /* Fully opaque dark background */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #1A1A1E; /* Dark border */
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 15px rgba(255, 202, 40, 0.2);
}

@keyframes spin {
    0% { 
        transform: rotate(0deg); 
        border-top-color: var(--primary);
    }
    50% {
        border-top-color: var(--primary-light);
    }
    100% { 
        transform: rotate(360deg);
        border-top-color: var(--primary);
    }
}







/* Mobile - remove bottom gap only */
@media screen and (max-width: 768px) {
    footer.help-footer {
        margin: 0 !important;
        padding-bottom: 0 !important;
    }
    
    footer.help-footer .container {
        margin: 0 !important;
        padding: 10px !important;
    }
    
    footer.help-footer p.footer-text {
        margin: 0 !important;
    }
    
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    html {
        margin: 0 !important;
        padding: 0 !important;
        height: 100% !important;
    }
}