@theme {
    --color-dreamy-bg: #020617;
}

body {
    background-color: #020617;
    color: #f3f4f6;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.glass-panel {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-input {
    background-color: transparent;
    color: white;
}

.glass-input:focus {
    outline: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.duration-600 {
    animation-duration: 600ms;
}

.duration-800 {
    animation-duration: 800ms;
}

.custom-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
    display: none;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

.btn-shine>* {
    position: relative;
    z-index: 10;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.border-beam {
    position: relative;
}

.border-beam::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--angle) at 50% 50%, transparent 0%, rgba(255, 255, 255, 0.8) 10%, transparent 20%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
    animation: beam-spin 4s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.border-beam:focus-within::after {
    opacity: 1;
}

@keyframes beam-spin {
    to {
        --angle: 360deg;
    }
}

.flash-beam {
    position: relative;
}

.flash-beam::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--angle) at 50% 50%, transparent 0%, rgba(255, 255, 255, 1) 10%, transparent 20%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
    animation: beam-spin 1s linear 1;
}

.form-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 80% 80%;
}

.form-checkbox:checked,
.form-checkbox:indeterminate {
    background-color: #a855f7;
    border-color: #a855f7;
}

.form-checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'/%3e%3c/svg%3e");
}

.form-checkbox:indeterminate {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='5' y1='12' x2='19' y2='12'/%3e%3c/svg%3e");
}

.tag-pill {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.tag-pill:hover {
    background-color: rgba(168, 85, 247, 0.2);
    color: #e9d5ff;
    border-color: rgba(168, 85, 247, 0.3);
}

.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.70rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-future {
    background-color: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    border-color: rgba(255, 255, 255, 0.1);
}

.badge-soon {
    background-color: rgba(234, 179, 8, 0.1);
    color: #fcd34d;
    border-color: rgba(234, 179, 8, 0.2);
}

.badge-overdue {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}

.zen-mode header,
.zen-mode #list-container,
.zen-mode #notes-toolbar,
.zen-mode #search-container,
.zen-mode #about-btn {
    display: none !important;
}

.zen-mode main {
    max-width: 900px;
    margin: 0 auto;
    height: 100vh;
    padding-top: 4rem;
}

.zen-mode #note-form {
    width: 100%;
    height: 100%;
}

.zen-mode #form-content,
.zen-mode #form-preview {
    height: 70vh;
    font-size: 1.25rem;
}

@keyframes progress-loading {
    to {
        stroke-dashoffset: 0;
    }
}

.animate-progress {
    animation: progress-loading 1.2s ease-in-out forwards;
}

/* Pomodoro Timer Styles */
#pomodoro-timer.active {
    display: flex;
}

#timer-display {
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.timer-running #timer-display {
    color: #e9d5ff;
}

.timer-paused #timer-display {
    color: #9ca3af;
}

/* Zen Mode adjustments for Timer */
.zen-mode #pomodoro-timer {
    display: flex !important;
}

/* Mobile Responsiveness for Timer */
/* Mobile Responsiveness for Timer */
/* Mobile Responsiveness for Timer */
@media (max-width: 768px) {
    #pomodoro-timer {
        width: auto;
        max-width: 95%;
        top: 1rem;
    }
    
    #pomodoro-timer .glass-panel {
        padding: 0.5rem 0.75rem; 
        gap: 0.5rem;
        flex-wrap: nowrap; /* Force single row */
        justify-content: center;
    }

    #timer-display {
        font-size: 1.25rem; /* Compact font */
        width: auto;
        text-align: left;
        order: 0;
    }

    /* Hide decorative dividers */
    #pomodoro-timer .bg-white\/10 {
        display: none;
    }

    #pomodoro-timer button svg {
        width: 1rem;
        height: 1rem;
    }
    
    #pomodoro-timer button {
        padding: 0.25rem;
    }

    /* Compact Mode Buttons */
    #mode-work-btn, #mode-break-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
}

/* AI Assistant Styles */
/* AI Assistant Styles */
#ai-modal.active {
    display: flex !important;
}

#ai-modal.active > div:last-child {
    transform: translateY(0);
    opacity: 1;
}

#ai-modal > div:last-child {
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Premium Glassmorphism for Modal */
#ai-modal .glass-panel-ai {
    background: rgba(15, 23, 42, 0.6); /* Slightly dark base */
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Chat Bubbles */
.ai-message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.8) 0%, rgba(124, 58, 237, 0.8) 100%);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
    padding: 0.875rem 1.125rem;
    max-width: 80%;
    font-size: 0.9375rem;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ai-message-bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
    padding: 0.875rem 1.125rem;
    max-width: 85%;
    font-size: 0.9375rem;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Input Area Refinement */
#ai-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

#ai-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.2),
        0 0 0 2px rgba(168, 85, 247, 0.1);
}

/* Typing Indicator */
.typing-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #d8b4fe; /* lighter purple */
    animation: typing 1.4s infinite ease-in-out both;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* When Zen Mode is active (Desktop Only), move AI button down */
@media (min-width: 1024px) {
    .zen-mode #ai-btn {
        bottom: 1.5rem !important; /* bottom-6 = 1.5rem */
        display: flex !important;
    }
}

/* Hide AI on Mobile/Tablet (Desktop Only Feature) */
@media (max-width: 1024px) {
    #ai-btn, #enable-ai-btn {
        display: none !important;
    }
}

/* AI State Management (Prevents FOUC) */
/* Default State: Enable Button Visible, Bot Hidden */
#ai-btn { display: none; }
#enable-ai-btn { display: flex; }

/* Active State: Enable Button Hidden, Bot Visible */
body.ai-active #enable-ai-btn { display: none !important; }
body.ai-active #ai-btn { display: flex !important; }
