/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* THEME VARIABLES (Light/Dark Mode Setup) */
:root {
    --font-main: 'Plus Jakarta Sans', sans-serif;
    
    /* Dark Theme Default */
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --glass-bg: rgba(30, 41, 59, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --card-hover: rgba(255, 255, 255, 0.05);
    --shadow: rgba(0, 0, 0, 0.3);
}



::-webkit-scrollbar {
    width: 0%;
}

::-webkit-scrollbar-track {
    background: black;
}

::-webkit-scrollbar-thumb {
    background: gray;
    border-radius: 10px;
}

[data-theme="light"] {
    /* Light Theme Settings */
    --bg-gradient: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(0, 0, 0, 0.05);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-color: #4f46e5;
    --accent-hover: #3730a3;
    --card-hover: rgba(0, 0, 0, 0.02);
    --shadow: rgba(0, 0, 0, 0.05);
}

/* GLOBAL RESETS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.3s ease, color 0.3s ease;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* Dynamic Background Layer (Can change via JS based on Time) */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

/* GLASS EFFECT SPECIFIC CLASS */
.widget, .card, .feature-view-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 var(--shadow);
}

/* DASHBOARD LAYOUT CONTEXT */
.dashboard-container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* HEADER WIDGETS */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.date-time-widget {
    padding: 20px 28px;
}

.date-time-widget h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.date-time-widget .am-pm {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.date-time-widget p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
}

.weather-icon {
    font-size: 1.8rem;
    color: #fbbf24;
}

.weather-info {
    display: flex;
    flex-direction: column;
}

#weather-temp {
    font-size: 1.3rem;
    font-weight: 600;
}

#weather-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.theme-toggle-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    background: var(--accent-color);
    color: white;
}

/* MOTIVATION QUOTE BANNER */
.quote-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    position: relative;
}

.quote-content p {
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 500;
}

.quote-content span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.refresh-quote-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
}

.refresh-quote-btn:hover {
    color: var(--accent-color);
    transform: rotate(45deg);
}

/* FEATURES GRID (The Clickable Cards) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    padding: 24px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: var(--accent-color);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

/* Custom Card Color accents */
.icon-todo { background: #3b82f6; }
.icon-planner { background: #10b981; }
.icon-timer { background: #ef4444; }
.icon-goals { background: #f59e0b; }

.card-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-arrow {
    position: absolute;
    bottom: 24px;
    right: 24px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent-color);
}

/* Daily Goal Progress Bar inside Card */
.progress-container {
    margin-top: 8px;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--glass-border);
    border-radius: 10px;
    margin-top: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 10px;
}

/* FEATURE FULL VIEW LAYER (Traffic Controller Target) */
.feature-view-container {
    width: 100%;
    max-width: 900px;
    padding: 40px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.back-btn {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    color: var(--accent-color);
}

.feature-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* UTILITY CLASSES */
.hidden {
    display: none !important;
}


/* TODO FEATURE STYLES */
.todo-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

/* Mobile responsive check for input wrapper */
@media (max-width: 480px) {
    .todo-input-container {
        flex-direction: column; /* Input aur Button upar-neeche ho jayenge */
        gap: 10px;
    }
    
    #add-todo-btn {
        padding: 14px 20px; /* Mobile par click karne me aasaani hogi */
        justify-content: center; /* Icon aur text center me rahega */
        width: 100%; /* Poori width le lega button */
        height: 40px;
    }
}

#todo-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 14px 20px;
    border-radius: 14px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    width: 100%; /* Ensures input doesn't crush */
}

#todo-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

#add-todo-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 14px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* Text ko break hone se rokega */
}

#add-todo-btn:hover {
    background: var(--accent-hover);
}

.todo-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-left: 4px;
}

.todo-list-wrapper {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Individual Task Item Row */
.todo-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 14px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: fadeIn 0.2s ease;
}

/* Mobile responsive check for individual items */
@media (max-width: 480px) {
    .todo-item {
        padding: 12px 14px; /* Internal spaces breathing space dene ke liye */
    }
    .todo-text {
        font-size: 0.9rem; /* Text size readability badhane ke liye adjust kiya */
    }
}

.todo-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0; /* Flexbox text clipping bug ko solve karta hai */
}

/* Custom Checkbox Design */
.todo-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Checkbox ko squeeze/pichakne se rokega */
}

.todo-item.completed .todo-checkbox {
    background: #10b981;
    border-color: #10b981;
}

.todo-text {
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-word; /* break-all se hatakar word-break lagaya taaki word beech se na toote */
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Important Task Highlighting */
.todo-item.important {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.03);
}

.todo-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0; /* Buttons ko squeeze hone se rokega */
}

.star-btn, .delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
}

.star-btn:hover, .todo-item.important .star-btn {
    color: #f59e0b;
}

.delete-btn:hover {
    color: #ef4444;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}







/* PLANNER FEATURE STYLES */
.planner-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.clear-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 16px;
    border-radius: 12px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.clear-btn:hover {
    background: #ef4444;
    color: white;
}

.planner-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 6px;
}

.planner-slot {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    padding: 20px 16px;
}

.slot-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 90px;
    border-right: 1px solid var(--glass-border);
    padding: 10px 0;
}

.slot-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.95rem;
}

/* Current active hour highlighting */
.planner-slot.current-hour {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.1) inset;
}

.planner-slot.current-hour .slot-time {
    color: var(--accent-color);
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}






/* POMODORO FEATURE STYLES */
.pomodoro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 20px 0;
}

.timer-status {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* Break mode change state */
.timer-status.break-mode {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.timer-display {
    font-size: 5.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums; /* Numbers ko move hone se rokega */
    letter-spacing: -2px;
    text-shadow: 0 4px 20px var(--shadow);
}

.timer-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.start-pause{
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.control-btn {
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    justify-content: center;
}

.start-mode {
    background: var(--accent-color);
    color: white;
    
}

.start-mode:hover { background: var(--accent-hover); }

.pause-mode {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.pause-mode:hover { background: rgba(255, 255, 255, 0.15); }

.reset-mode {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.reset-mode:hover {
    background: #ef4444;
    color: white;
}



/* DAILY GOALS FEATURE STYLES */
.goals-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#goal-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 14px 20px;
    border-radius: 14px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
}

#goal-input:focus {
    border-color: #f59e0b;
    background: rgba(255, 255, 255, 0.08);
}

#add-goal-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 14px;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}



#add-goal-btn:hover { background: #d97706; }


@media (max-width: 480px) {
    .goals-input-container {
        display: flex;
        flex-direction: column; /* Input aur Button upar-neeche ho jayenge */
        gap: 10px;
    }
    
    #add-goal-btn {
        
        padding: 14px 20px; /* Mobile par click karne me aasaani hogi */
        justify-content: center; /* Icon aur text center me rahega */
        width: 100%; /* Poori width le lega button */
        height: 40px;
    }
}

.goals-progress-status {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 20px;
}

#goals-progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.main-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
}

.main-progress-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.goals-list-wrapper {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.goal-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 14px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fadeIn 0.2s ease;
}

.goal-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.goal-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #f59e0b;
    border-radius: 50%; /* Circle look for goals */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.goal-item.completed .goal-checkbox {
    background: #f59e0b;
}

.goal-text {
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-word;

}

@media (max-width: 480px) {
    .goal-item {
        padding: 12px 14px; /* Internal spaces breathing space dene ke liye */
    }
    .goal-text {
        font-size: 0.9rem; /* Text size readability badhane ke liye adjust kiya */
        max-width: 165px;
    }
}



.goal-item.completed .goal-text {
    text-decoration: line-through;
    color: var(--text-muted);
}


/* RESPONSIVE DESIGN */
@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    .header-right {
        justify-content: space-between;
    }
    .quote-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .refresh-quote-btn {
        position: absolute;
        top: 16px;
        right: 16px;
    }
}