/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    /* Removed padding-bottom as footer is now part of the document flow */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* Ensures main content takes available space, pushing footer down */
}


/* Timer Box Styling */
.timer-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease-in-out;
}
.timer-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Canvas Positioning */
#particle-canvas, #notes-particle-canvas {
    position: fixed; /* Use fixed to ensure it covers the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Fiery Glow Animation & Glassmorphism Effect - RESTORED */
@keyframes fiery-glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 140, 0, 0.5), 0 0 10px rgba(255, 140, 0, 0.5), 0 0 15px rgba(255, 69, 0, 0.5), inset 0 0 5px rgba(255, 100, 0, 0.5);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 140, 0, 1), 0 0 20px rgba(255, 140, 0, 1), 0 0 30px rgba(255, 69, 0, 1), inset 0 0 10px rgba(255, 100, 0, 0.8);
    }
}
.fiery-glass-effect {
    background: rgba(255, 120, 0, 0.25); /* Fiery orange tint */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fiery-glow 2.5s ease-in-out infinite alternate;
    transition: background 0.3s;
}
.fiery-glass-effect:hover {
     background: rgba(255, 120, 0, 0.4);
}

/* --- Note Page Add Button Override --- */
#note-form button[type="submit"].fiery-glass-effect {
    background-image: linear-gradient(to right, #f97316, #ea580c);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: none; /* Important: remove the glow animation */
    backdrop-filter: none; /* Important: remove the glass effect */
    -webkit-backdrop-filter: none;
}
#note-form button[type="submit"].fiery-glass-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #f97316, #ea580c); /* Keep background on hover */
}


/* Floating Elements */
.floating-bubble {
    position: absolute;
}

/* --- Integrated Quote Section Styling --- */
#quote-note {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem; /* 16px */
    padding: 1.5rem; /* 24px */
    margin-top: 3rem; /* 48px */
    width: 100%;
    max-width: 48rem; /* max-w-3xl */
    text-align: center;
    transition: all 0.3s ease;
}

#quote-text {
    font-size: 1.125rem; /* text-lg */
    line-height: 1.75rem;
    color:  #f97316; /* Vibrant Cyan-300 for better visibility */
    margin-bottom: 0.75rem; /* 12px */
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); /* Add shadow for readability */
}

#quote-author {
    font-size: 0.875rem; /* text-sm */
    color: #a5f3fc; /* Lighter Cyan-200 */
    text-align: right;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); /* Add shadow for readability */
}
#quote-author::before {
    content: "— ";
}


/* Sticky Note Style */
.note {
    box-shadow: 5px 5px 7px rgba(33,33,33,.7);
    transition: transform .15s linear, border .15s linear, box-shadow .15s linear;
}
.note:hover {
    transform: scale(1.05);
    box-shadow: 10px 10px 15px rgba(33,33,33,.7);
}

/* Custom Scrollbar for Notes and Textarea */
.note-text::-webkit-scrollbar,
textarea::-webkit-scrollbar,
#quote-text::-webkit-scrollbar {
    width: 8px;
}
.note-text::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track,
#quote-text::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
.note-text::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb,
#quote-text::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
}
.note-text::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover,
#quote-text::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.6);
}

/* Sand Progress Canvas */
#sand-progress-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Checklist Item Style */
.checklist-item label {
    transition: color 0.2s;
}

/* --- Recent Notes on Countdown Page --- */
.recent-note-preview-wrapper {
    display: block;
}

/* --- Auth UI Improvements --- */
.btn-auth-primary {
    background-image: linear-gradient(to right, #8b5cf6, #6366f1);
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.btn-auth-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-auth-secondary {
    background-image: linear-gradient(to right, #f97316, #ea580c); /* orange-500 to orange-600 */
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-auth-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.btn-auth-secondary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.user-email-display {
    color: #fb923c; /* orange-400 */
    font-weight: 500;
}

.auth-loader {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #fb923c; /* orange-400 */
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* --- Auth Modal --- */
#auth-modal.hidden, #reset-password-modal.hidden {
    display: none;
}
.auth-modal-content {
    background-color: #1f2937; /* gray-800 */
    border: 1px solid #4b5563; /* gray-600 */
}
.auth-input {
    background-color: #374151; /* gray-700 */
    color: white;
    border-color: transparent;
    transition: border-color 0.3s ease;
}
.auth-input:focus {
    outline: none;
    border-color: #8b5cf6; /* purple-500 */
}
#auth-close-btn, #reset-close-btn {
    font-size: 2rem;
    line-height: 1;
}
.forgot-password-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* --- Note Action Buttons --- */
.note-action-btn {
    padding: 4px;
    border-radius: 9999px; /* circular */
    background: rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s;
}
.note-action-btn:hover {
    background: rgba(0,0,0,0.2);
    color: #dc2626; /* red-600 for delete/pin */
}

/* --- Footer Fix for Scrolling Page --- */
body > footer {
    width: 100%;
    padding: 1.5rem 0;
    background-color: #111827; /* bg-gray-900 solid */
    text-align: center;
    color: #9ca3af; /* text-gray-400 */
    font-size: 0.875rem; /* text-sm */
}


/* --- Mobile Responsiveness --- */
@media (max-width: 640px) {
    /* Header */
    header {
        padding: 1rem;
    }

    /* Countdown Page Adjustments */
    #main-heading {
        font-size: 2.5rem; /* Smaller main title */
    }
    #sub-heading {
        font-size: 1rem; /* Smaller sub-title */
        margin-bottom: 2rem;
    }
    .max-w-4xl.mx-auto.mb-8.w-full {
        margin-bottom: 1rem; /* Reduce space taken by progress bar */
    }
    .timer-box {
        padding: 1rem; /* Increased padding for timer boxes */
    }
    .timer-unit {
        font-size: 3.5rem; /* Made timer numbers even bigger on mobile */
    }
    #countdown {
        gap: 0.75rem; /* Reduce gap between timer boxes */
    }

    /* Floating elements size adjustments */
    .floating-bubble {
        width: 56px; /* 14 * 4 */
        height: 56px;
        font-size: 1.5rem;
    }

    /* Integrated Quote Note (Mobile) */
    #quote-note {
        padding: 1rem;
        margin-top: 2rem;
    }
    #quote-text {
        font-size: 1rem;
    }

    /* Notes Page Adjustments */
    #notes-screen h2 {
        font-size: 1.5rem; /* Smaller title on notes page */
    }
    #notes-container {
        gap: 0.75rem; /* Reduce gap between notes */
    }
    .note {
        padding: 0.75rem;
        font-size: 0.8rem; /* Smaller font size inside notes */
    }
    .note-text {
        font-size: 0.8rem;
    }
    .checklist-item {
        gap: 0.25rem;
    }

    /* Recent Notes on Countdown Page */
    #recent-notes-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* Ensure 2 columns on small screens */
        gap: 0.75rem;
    }
}

