/* =========================================
   SMART DASHBOARD - MIDNIGHT GLASS THEME
   ========================================= */

:root {
    /* Core Colors */
    --bg-deep: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Accents */
    --primary: #38bdf8;
    /* Sky 400 */
    --secondary: #818cf8;
    /* Indigo 400 */
    --success: #4ade80;
    --danger: #f87171;
    --warning: #fbbf24;
    --purple: #c084fc;
    --neon-blue: #00f2ff;

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    /* Spacing & Radius */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* Font */
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-quote: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-heading);
    background-color: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

/* ================= BACKGROUND ================= */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(192, 132, 252, 0.15), transparent 25%);
    filter: blur(40px);
    animation: pulseBackground 10s ease-in-out infinite alternate;
}

@keyframes pulseBackground {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ================= LAYOUT ================= */
.app-container {
    width: 100%;
    max-width: 94%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

/* ZEN MODE */
body.zen-active .app-header {
    opacity: 1;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.zen-active .app-header .brand,
body.zen-active .app-header .greeting-box,
body.zen-active .app-header .time-box,
body.zen-active .app-header .divider-v {
    opacity: 0.1;
    filter: blur(2px);
    pointer-events: none;
    transition: 0.5s;
}

body.zen-active .quote-banner,
body.zen-active .widget-notes,
body.zen-active .widget-tasks,
body.zen-active .widget-tools,
body.zen-active .main-footer {
    opacity: 0.05;
    filter: blur(5px);
    pointer-events: none;
    transition: all 0.5s ease;
}

body.zen-active .widget-focus,
body.zen-active .widget-sound {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.2);
}

body.zen-active .zen-toggle {
    opacity: 1;
    pointer-events: auto;
    transform: rotate(180deg);
    color: var(--success);
}


/* HEADER */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.5s;
}

.brand {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.brand-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.divider-v {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

.zen-toggle {
    font-size: 1.4rem;
    color: var(--secondary);
    transition: 0.3s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.zen-toggle:hover {
    color: var(--purple);
    transform: rotate(45deg);
}


/* QUOTE BANNER (COMPACT & CLEAN) */
.quote-banner {
    text-align: center;
    padding: 0.5rem 1rem;
    margin-top: -1rem;
    /* Pull tighter */
    margin-bottom: 0.5rem;
    position: relative;
    max-width: 800px;
    /* Restrict width */
    align-self: center;
    /* Center in flex parent */
}

.quote-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.quote-content i {
    display: none;
}

.quote-content p {
    font-family: var(--font-quote);
    font-size: 1.3rem;
    color: #e2e8f0;
    font-weight: 400;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInQuote 1s forwards;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInQuote {
    to {
        opacity: 1;
    }
}


/* Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

/* Widget General */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 i {
    color: var(--primary);
    font-size: 1.2rem;
}


/* 1. FOCUS TIMER (REVERTED TO CLEAN) */
.widget-focus {
    grid-column: span 6;
}

.timer-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.time-adjust {
    display: flex;
    gap: 4px;
}

.adjust-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 28px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.adjust-btn:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
}

.timer-circle-container {
    position: relative;
    width: 220px;
    height: 220px;
}

.progress-ring__circle-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.progress-ring__circle {
    transition: 0.35s stroke-dashoffset;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-linecap: round;
    stroke: #38bdf8;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#timer-display {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    line-height: 1;
    font-family: var(--font-mono);
    color: var(--text-main);
    text-shadow: none;
    letter-spacing: normal;
}

.timer-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    display: block;
    font-weight: 400;
    opacity: 1;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
}

.btn-ghost:hover {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.1);
}


/* 2. NOTES (CREATIVE WRITING PAD STYLE) */
.widget-notes {
    grid-column: span 6;
    background: linear-gradient(to bottom right, rgba(30, 41, 59, 0.6), rgba(30, 41, 59, 0.8));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.note-count {
    font-size: 0.75rem;
    background: var(--secondary);
    padding: 2px 8px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
}

.new-note-area {
    position: relative;
    margin-bottom: 1.5rem;
}

.new-note-area textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 12px 0;
    color: var(--text-main);
    resize: none;
    height: 60px;
    outline: none;
    font-family: var(--font-heading);
    font-size: 1rem;
    transition: 0.3s;
}

.new-note-area textarea:focus {
    border-bottom-color: var(--secondary);
    background: rgba(255, 255, 255, 0.02);
    padding-left: 10px;
}

.new-note-area textarea::placeholder {
    font-style: italic;
    opacity: 0.5;
}

.save-note-btn {
    position: absolute;
    right: 0;
    bottom: 10px;
    background: var(--secondary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: 0.2s;
    transform: scale(0.9);
    opacity: 0;
}

.new-note-area textarea:focus+.save-note-btn,
.new-note-area textarea:not(:placeholder-shown)+.save-note-btn {
    opacity: 1;
    transform: scale(1);
}

.save-note-btn:hover {
    background: var(--purple);
    transform: scale(1.1) !important;
}

.notes-list {
    height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px;
}

.note-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: 0.3s;
    border-left: 3px solid var(--secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.note-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.note-content {
    flex: 1;
    font-size: 0.95rem;
    word-break: break-word;
    line-height: 1.5;
    color: #f1f5f9;
}

.note-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: 0.2s;
    flex-direction: column;
}

.note-item:hover .note-actions {
    opacity: 1;
}

.note-btn {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.note-btn:hover {
    background: white;
    color: var(--bg-deep);
}

.note-btn.delete:hover {
    background: var(--danger);
    color: white;
}




/* 3. PROGRESS & INSIGHTS (NEW - Span 12) */
.widget-progress {
    grid-column: span 12;
    background: linear-gradient(to right, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
}

.progress-main {
    margin-bottom: 2rem;
}

/* STATS ROW */
.stats-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.flame-icon {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.time-icon {
    background: rgba(192, 132, 252, 0.1);
    color: var(--purple);
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.2);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Flame Animation */
.flame-icon i {
    animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.15);
        opacity: 1;
        filter: drop-shadow(0 0 5px orange);
    }
}


.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.progress-percent {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success);
    font-family: var(--font-mono);
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    /* JS will animate this */
    background: linear-gradient(90deg, var(--success), var(--primary));
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.motivation-text {
    margin-top: 12px;
    font-style: italic;
    color: var(--text-main);
    font-size: 1.1rem;
    text-align: center;
    font-family: var(--font-quote);
    opacity: 0.9;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.chart-box h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mock Bar Chart */
.bar-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100px;
    padding: 0 10px;
}

.chart-bar {
    width: 12%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.5s ease;
}

.chart-bar:hover {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.chart-bar span {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Donut Chart */
.donut-chart-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}

.donut-chart {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--danger) 0% 33%,
            var(--secondary) 33% 66%,
            var(--text-muted) 66% 100%);
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Inner hole for donut */
.donut-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: var(--glass-bg);
    /* Match card bg roughly */
    border-radius: 50%;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.high {
    background: var(--danger);
}

.dot.normal {
    background: var(--secondary);
}

.dot.low {
    background: var(--text-muted);
    opacity: 0.5;
}


/* 3. TASKS (Span 8 -> now 4 in order, but name says 3) */
/* Actually in HTML structure it is section 4 now */

.widget-tasks {
    grid-column: span 8;
}

.task-input-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0 16px;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
    gap: 12px;
}

.new-task-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 0;
    color: var(--text-main);
    outline: none;
    margin-left: 0;
}

.add-task-btn {
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.add-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.task-date-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.task-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.5);
    cursor: pointer;
}

.task-date-display {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.priority-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.priority-select option {
    background: var(--bg-deep);
    color: var(--text-main);
}

.task-filters {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.filter-btn.active {
    color: var(--text-main);
    border-color: var(--primary);
}

.task-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.task-text {
    flex: 1;
    margin: 0 12px;
    transition: 0.2s;
    font-size: 0.95rem;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.7;
}

.task-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.task-badge.high {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.task-badge.normal {
    background: var(--secondary);
}

.task-badge.low {
    background: var(--text-muted);
    opacity: 0.5;
}

.task-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.text-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.text-btn:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Subtasks styling */
/* Subtasks styling */
.subtasks-container {
    width: 100%;
    padding-left: 2rem;
    padding-right: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);

    /* Animation Initialization */
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.subtasks-container.open {
    max-height: 500px;
    /* Arbitrary large height */
    opacity: 1;
    margin-top: 8px;
    padding-top: 10px;
    padding-bottom: 0.5rem;
}

.subtask-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.subtask-item.completed span {
    text-decoration: line-through;
    opacity: 0.6;
}

.subtask-input-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.subtask-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    outline: none;
}

.subtask-add-btn {
    background: var(--secondary);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: grid;
    place-items: center;
}

.task-expand-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-right: 8px;
    transition: transform 0.3s;
    font-size: 1rem;
}

.task-item.expanded .task-expand-btn {
    transform: rotate(90deg);
    color: var(--primary);
}

/* 4. SPLIT COLUMN (Span 4) */
.widget-column-split {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Sound (Updated Layout) */
.sound-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 1rem;
}

.sound-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.sound-btn i {
    font-size: 1.2rem;
}

.sound-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sound-btn.active {
    background: var(--secondary);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.4);
}

.stop-all {
    width: 100%;
    margin-top: 5px;
    font-size: 0.85rem;
}

.volume-slider {
    width: 100%;
    accent-color: var(--secondary);
    cursor: pointer;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Tools */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    display: grid;
    place-items: center;
}

.tool-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
}

.tool-output {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    animation: slideDown 0.3s ease;
}

.tool-output.hidden {
    display: none;
}

.output-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.close-output {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* FOOTER */
.main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 1rem 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.footer-left p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    text-decoration: none;
}

.social-links a:hover {
    color: white;
    transform: translateY(-4px);
    background: var(--primary);
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
}

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .app-container {
        max-width: 96%;
        padding: 1.5rem;
    }

    .widget-tasks {
        grid-column: span 12;
    }

    .widget-column-split {
        grid-column: span 12;
        flex-direction: row;
    }

    .widget-sound,
    .widget-tools {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
        text-align: center;
    }

    .brand {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .widget-focus,
    .widget-notes,
    .widget-tasks,
    .widget-column-split {
        grid-column: span 12;
    }

    .widget-column-split {
        flex-direction: column;
    }

    .app-container {
        padding: 1rem;
        gap: 1.5rem;
    }

    .quote-banner {
        margin-top: 0;
    }

    .quote-content p {
        font-size: 1.1rem;
    }

    .main-footer {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-center {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Mobile Tasks Input Fix - Smart Grid */
    .task-input-row {
        flex-direction: column;
        padding: 1.2rem;
        gap: 1rem;
        background: rgba(0, 0, 0, 0.3);
    }

    .new-task-input {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 0;
        order: 1;
    }

    .task-date-input {
        width: 100%;
        order: 2;
    }

    .priority-select {
        width: 100%;
        order: 3;
    }

    .add-task-btn {
        width: 100%;
        height: 48px;
        order: 4;
        border-radius: var(--radius-md);
    }

    /* Timer responsiveness */
    .timer-circle-container {
        width: 180px;
        height: 180px;
    }

    .progress-ring {
        width: 180px;
        height: 180px;
    }

    .progress-ring__circle,
    .progress-ring__circle-bg {
        r: 75;
        cx: 90;
        cy: 90;
    }

    #timer-display {
        font-size: 2.5rem;
    }

    /* Insights Page adjustments */
    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .donut-chart-container {
        flex-direction: column;
        gap: 1rem;
    }

    /* Legal Pages */
    .legal-container {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --radius-lg: 16px;
        --radius-md: 12px;
    }

    .app-header {
        padding: 1rem;
    }

    .brand-info h1 {
        font-size: 1.25rem;
    }

    .header-right {
        gap: 0.8rem;
    }

    .greeting-box,
    .divider-v {
        display: none;
    }

    .time-box {
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-ghost {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .timer-circle-container {
        width: 160px;
        height: 160px;
    }

    .progress-ring {
        width: 160px;
        height: 160px;
    }

    .progress-ring__circle,
    .progress-ring__circle-bg {
        r: 65;
        cx: 80;
        cy: 80;
    }

    #timer-display {
        font-size: 2rem;
    }

    .social-links {
        gap: 0.8rem;
    }

    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.checkbox-custom i {
    opacity: 0;
    transform: scale(0.5);
    transition: 0.2s;
    font-size: 12px;
    color: var(--bg-deep);
}

.task-item.completed .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.task-item.completed .checkbox-custom i {
    opacity: 1;
    transform: scale(1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-left p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-center {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-center a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

.footer-center a:hover {
    color: var(--primary);
}

.divider-dot {
    color: rgba(255, 255, 255, 0.1);
}

.footer-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.btn-feedback:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: 0.2s;
}

.social-links a:hover {
    color: var(--text-main);
    transform: translateY(-2px);
}