/* ==========================================================
           SYSTEM DEFAULT THEME & STRICT CSS RESETS
           ========================================================== */
        :root {
            --bg-body: #f8fafc;
            --bg-surface: #ffffff;
            --bg-card: #ffffff;
            --border-color: rgba(0, 0, 0, 0.08);
            --border-hover: rgba(139, 92, 246, 0.3);
            --text-main: #0f172a;
            --text-muted: #64748b;
            
            --primary: #6366f1; 
            --primary-soft: #e0e7ff;
            --primary-grad: linear-gradient(135deg, #6366f1, #8b5cf6);
            --secondary: #3B82F6; 
            --accent: #F43F5E; 
            --success: #10B981; 
            --warning: #F59E0B;
            
            --nav-bg: rgba(255, 255, 255, 0.95);
            --sc-hover: #f1f5f9;
            
            --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
            --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }

        @media (prefers-color-scheme: dark) {
            :root {
                --bg-body: #050507;
                --bg-surface: #0e0e12;
                --bg-card: #14141a;
                --border-color: rgba(255, 255, 255, 0.08);
                --border-hover: rgba(255, 255, 255, 0.15);
                --text-main: #ffffff;
                --text-muted: #9ca3af;
                
                --primary: #8B5CF6; 
                --primary-soft: rgba(139, 92, 246, 0.15);
                --primary-grad: linear-gradient(135deg, #8B5CF6, #3B82F6);
                
                --nav-bg: rgba(5, 5, 7, 0.95);
                --sc-hover: rgba(255, 255, 255, 0.05);
                
                --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
                --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
                --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
            }
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        html, body { 
            width: 100%; 
            max-width: 100vw; 
            overflow-x: hidden !important; 
            scroll-behavior: smooth; 
        }

        body {
            font-family: 'Outfit', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-main);
            display: flex; flex-direction: column; min-height: 100vh;
            transition: background-color 0.3s ease, color 0.3s ease;
            background-image: linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
            background-size: 50px 50px;
        }

        /* --- GLOBAL ANIMATIONS --- */
        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        @keyframes floatEffect {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }

        #linkedin-loader-wrapper {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            background: var(--bg-body); z-index: 999999;
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            transition: opacity 0.6s ease, visibility 0.6s ease;
        }
        .ripple-container { position: relative; width: 100px; height: 100px; display: flex; justify-content: center; align-items: center; margin-bottom: 30px; }
        .ripple-logo { width: 60px; height: 60px; border-radius: 12px; object-fit: contain; position: relative; z-index: 10; background: var(--bg-surface); padding: 5px; box-shadow: var(--shadow-md); }
        .ripple-ring { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; animation: ripple-effect 2s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
        .ripple-ring:nth-child(2) { animation-delay: 0.6s; }
        .ripple-ring:nth-child(3) { animation-delay: 1.2s; }
        .loader-text { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--text-main); letter-spacing: 2px; animation: pulse-text 1.5s ease-in-out infinite; }
        @keyframes ripple-effect { 0% { transform: scale(1); opacity: 0.8; border-width: 3px; } 100% { transform: scale(2.5); opacity: 0; border-width: 0px; } }
        @keyframes pulse-text { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

        .container { max-width: 1400px; width: 100%; margin: 0 auto; padding: 0 20px; flex-grow: 1; box-sizing: border-box; }

        /* --- MASTER NAVBAR --- */
        .nav-wrapper { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 15px 0; transition: 0.3s; }
        .navbar { background: var(--nav-bg); backdrop-filter: blur(15px); border: 1px solid var(--border-color); border-radius: 100px; padding: 0.6rem 1.5rem; display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; box-shadow: var(--shadow-sm); }
        .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-main); }
        .logo-img { height: 38px; width: auto; border-radius: 8px; object-fit: contain; }
        .logo span { font-family: 'Space Grotesk'; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.5px; white-space: nowrap; }
        .nav-links { display: flex; gap: 1.8rem; list-style: none; align-items: center; }
        .nav-link { color: var(--text-muted); text-decoration: none; font-weight: 600; transition: 0.3s; font-size: 0.95rem; }
        .nav-link:hover, .nav-link.active { color: var(--primary); }
        .nav-actions { display: flex; align-items: center; gap: 15px; }
        .menu-toggle { display: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; }

        .nav-item-dropdown { position: relative; }
        .nav-dropdown-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px; min-width: 180px; display: flex; flex-direction: column; gap: 5px; opacity: 0; visibility: hidden; transition: 0.3s; box-shadow: var(--shadow-lg); z-index: 1002; backdrop-filter: blur(16px);}
        @media(min-width: 769px) { .nav-item-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); } }
        .nav-dropdown-menu a { display: block; padding: 10px 15px; color: var(--text-muted); text-decoration: none; font-size: 0.95rem; border-radius: 8px; transition: 0.3s; font-weight: 500;}
        .nav-dropdown-menu a:hover { color: var(--primary); background: var(--sc-hover); }

        .user-profile { display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
        .user-avatar { width: 42px; height: 42px; background: var(--primary-grad); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; font-family: 'Space Grotesk'; overflow: hidden; border: 2px solid transparent; transition: 0.3s; }
        .user-profile:hover .user-avatar { border-color: var(--primary); transform: scale(1.05); }
        .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
        
        .user-dropdown { position: absolute; top: 130%; right: 0; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; width: 240px; padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow-lg); z-index: 1001; }
        .user-profile:hover .user-dropdown, .user-profile.active-dropdown .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
        
        .dropdown-item { padding: 12px 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 5px; }
        .dropdown-item .label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 1px;}
        .dropdown-item strong { display: block; font-size: 1rem; color: var(--text-main); font-family: 'Space Grotesk'; }
        
        .dropdown-action-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--text-main); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: 0.2s; cursor: pointer; font-family: 'Outfit'; }
        .dropdown-action-item:hover { background: var(--sc-hover); color: var(--primary); }
        .dropdown-action-item i { font-size: 1.1rem; color: var(--text-muted); width: 20px; text-align: center; transition: 0.2s; }
        .dropdown-action-item:hover i { color: var(--primary); }
        
        .logout-btn { color: var(--accent); margin-top: 5px; border-top: 1px solid var(--border-color); border-radius: 0 0 16px 16px;}
        .logout-btn i { color: var(--accent); }
        .logout-btn:hover { background: rgba(244, 63, 94, 0.05); color: var(--accent); }
        .logout-btn:hover i { color: var(--accent); }

        .page-content { padding-top: 110px; padding-bottom: 60px; width: 100%; }
        .grid-layout { display: grid; grid-template-columns: minmax(320px, 1.5fr) minmax(280px, 1.2fr) minmax(240px, 1fr); gap: 20px; width: 100%; box-sizing: border-box; }
        
        .bento-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 25px; display: flex; flex-direction: column; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: var(--shadow-sm); width: 100%; box-sizing: border-box; overflow: hidden; position: relative; }
        .bento-card:hover { border-color: rgba(139, 92, 246, 0.4); box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.15); transform: translateY(-3px); }
        .bento-card::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); transform: skewX(-20deg); transition: 0.5s; pointer-events: none; }
        .bento-card:hover::after { left: 150%; }
        .card-header { font-family: 'Space Grotesk'; font-size: 1.2rem; font-weight: 700; color: var(--text-main); margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; z-index: 1; }

        /* --- 1. FOCUS SESSION BOX --- */
        .focus-section { grid-column: 1 / 2; grid-row: 1 / 3; align-items: center; text-align: center; background: linear-gradient(135deg, var(--bg-surface), var(--bg-card)); }
        
        .timer-toggle { display: flex; width: 100%; max-width: 300px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 50px; padding: 5px; margin-bottom: 30px; box-sizing: border-box;}
        .timer-toggle button { flex: 1; padding: 10px 0; border-radius: 50px; border: none; background: transparent; color: var(--text-muted); font-family: 'Outfit'; font-weight: 600; cursor: pointer; transition: 0.3s; font-size: 0.95rem; }
        .timer-toggle button.active { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }

        .svg-timer-container { position: relative; width: 100%; max-width: 280px; aspect-ratio: 1/1; margin: 0 auto 30px; display: flex; justify-content: center; align-items: center; }
        .svg-timer-container svg { width: 100%; height: 100%; transform: rotate(-90deg); position: absolute; top: 0; left: 0; }
        
        /* 🟢 NEW BACKGROUND TRACK FOR TIMERS */
        .timer-bg { fill: none; stroke: var(--primary-soft); stroke-width: 8; }
        
        .timer-prog { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 880; stroke-dashoffset: 880; transition: stroke-dashoffset 0.2s linear; }
        
        .timer-text-overlay { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; z-index: 10; pointer-events: none;}
        
        .time-display { font-family: 'Space Grotesk'; font-size: clamp(1.2rem, 4vw, 4.2rem); font-weight: 700; color: var(--text-main); line-height: 1; margin-bottom: 5px; white-space: nowrap; width: 100%; text-align: center; letter-spacing: -1px;}
        .time-label { font-size: clamp(0.75rem, 2vw, 1rem); color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }

        .pomodoro-inputs { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-bottom: 25px; width: 100%; }
        .time-setter { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg-surface); padding: 10px 20px; border-radius: 50px; border: 1px solid var(--border-color); flex-wrap: wrap;}
        .time-setter input { background: transparent; border: none; color: var(--text-main); font-family: 'Space Grotesk'; font-size: 1.5rem; font-weight: 700; width: 60px; text-align: center; outline: none; }
        .time-setter input:focus { border-bottom: 2px solid var(--primary); }

        .controls-row { display: flex; gap: 20px; justify-content: center; width: 100%; margin-top: 10px; }
        .btn-play { background: linear-gradient(45deg, #FF6B6B, #8B5CF6, #3B82F6, #10B981, #F59E0B); background-size: 300% 300%; animation: gradientShift 6s ease infinite; color: white; border: none; width: 75px; height: 75px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; transition: 0.3s; box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4); display: flex; justify-content: center; align-items: center;}
        .btn-play:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 15px 30px rgba(139, 92, 246, 0.6); }
        
        .btn-stop { background: var(--bg-surface); color: var(--accent); border: 1px solid var(--border-color); width: 70px; height: 70px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center;}
        .btn-stop:hover { border-color: var(--accent); background: rgba(244, 63, 94, 0.1); }

        /* --- 2. TODO BOX --- */
        .todo-section { grid-column: 2 / 3; grid-row: 1 / 3; }
        .task-input-box { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; margin-bottom: 15px; width: 100%; box-sizing: border-box; }
        .task-input-box input[type="text"] { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border-color); color: var(--text-main); font-family: 'Outfit'; padding: 10px 0; outline: none; margin-bottom: 15px; font-size: 1rem; transition: 0.3s; box-sizing: border-box;}
        .task-input-box input[type="text"]:focus { border-color: var(--primary); }
        
        .task-row-2 { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; align-items: center; }
        .task-row-2 select, .task-row-2 input[type="date"] { flex: 1; background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main); padding: 10px; border-radius: 8px; font-family: 'Outfit'; font-size: 0.9rem; outline: none; cursor: pointer; box-sizing: border-box; min-width: 110px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; transition: 0.3s; }
        .task-row-2 select:hover, .task-row-2 input[type="date"]:hover { border-color: rgba(139, 92, 246, 0.5); }
        .btn-add-task { flex-shrink: 0; background: linear-gradient(45deg, #8B5CF6, #3B82F6, #10B981); background-size: 200% 200%; animation: gradientShift 5s ease infinite; color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.3s; font-family: 'Outfit'; box-sizing: border-box; white-space: nowrap; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);}
        .btn-add-task:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5); }
        
        /* TASK FILTERS UI */
        .task-filters { display: flex; gap: 8px; margin-bottom: 15px; overflow-x: auto; padding-bottom: 5px; }
        .task-filters::-webkit-scrollbar { height: 0px; }
        .filter-btn { background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-muted); padding: 6px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: 0.2s; white-space: nowrap; font-family: 'Outfit';}
        .filter-btn:hover { border-color: var(--primary-soft); color: var(--primary); }
        .filter-btn.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
        
        .task-list { overflow-y: auto; max-height: 400px; padding-right: 5px; display: flex; flex-direction: column; gap: 10px; width: 100%; -ms-overflow-style: none; scrollbar-width: none;}
        .task-list::-webkit-scrollbar { display: none; }
        
        .task-item { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; transition: 0.2s; display: flex; flex-direction: column; gap: 10px;}
        .task-item.active-focus { border-color: var(--primary); background: var(--primary-soft); }
        .task-item.dragging { opacity: 0.5; transform: scale(0.98); box-shadow: var(--shadow-md); z-index: 100; border-color: var(--primary); }
        .task-item.drag-over { border-top: 3px solid var(--primary); border-top-left-radius: 0; border-top-right-radius: 0; }
        .task-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px;}
        .t-subj { font-size: 0.75rem; background: var(--sc-hover); color: var(--primary); border: 1px solid var(--border-color); padding: 4px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; }
        .t-date { font-size: 0.8rem; color: var(--warning); display: flex; align-items: center; gap: 5px; font-weight: 500;}
        .t-title { font-size: 1.05rem; color: var(--text-main); font-weight: 500; word-break: break-word;}
        .task-actions { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-color); padding-top: 12px; flex-wrap: wrap; gap: 10px;}
        .t-time-logged { font-size: 0.85rem; color: var(--text-muted); font-weight: 500;}
        
        .custom-checkbox { position: relative; overflow: hidden; }
        .custom-checkbox::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: var(--primary); border-radius: 8px; transform: translate(-50%, -50%); transition: width 0.3s ease, height 0.3s ease; z-index: 0; }
        .custom-checkbox i { opacity: 0.6; font-size: 1.1rem; color: var(--text-muted); transition: 0.2s; z-index: 1; position: relative; }
        .custom-checkbox.checked::before { width: 100%; height: 100%; }
        .custom-checkbox.checked i { opacity: 1; color: white; transform: scale(1.1); }
        
        .btn-link-timer { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; transition: 0.2s; font-family: 'Outfit'; font-weight: 600;}
        .btn-link-timer:hover { background: var(--primary); color: white; border-color: var(--primary);}
        .task-item.completed { opacity: 0.6; }
        .task-item.completed .t-title { text-decoration: line-through; color: var(--text-muted); }
        .action-icon-btns { display: flex; gap: 8px; align-items: center;}
        
        /* STAR, TRASH, AND ICON BTNS */
        .btn-icon-only, .btn-star-task, .btn-del-task, .custom-checkbox {
            width: 34px; height: 34px; border-radius: 8px; border: none; font-size: 1.1rem; cursor: pointer; transition: 0.2s;
            display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.03); color: var(--text-muted);
        }
        .btn-icon-only:hover, .btn-star-task:hover, .btn-del-task:hover { transform: scale(1.05); background: rgba(0,0,0,0.06); }
        .btn-icon-only[title="Add to My Day"] { color: #f59e0b; }
        .btn-icon-only[title="Unlink from Timer"] { color: white; background: var(--secondary); }
        .btn-icon-only[title="Unlink from Timer"]:hover { background: var(--secondary); opacity: 0.9; }
        
        .btn-star-task:hover, .btn-star-task.active { color: #F59E0B; background: rgba(245, 158, 11, 0.1); }
        .btn-del-task:hover { color: var(--accent); background: rgba(239, 68, 68, 0.1); }

        /* --- 3. DAILY GOAL --- */
        .goal-section { grid-column: 3 / 4; grid-row: 1 / 2; text-align: center; }
        .goal-svg-wrap { position: relative; width: 100%; max-width: 160px; aspect-ratio: 1/1; margin: 0 auto 20px; display: flex; justify-content: center; align-items: center; }
        .goal-svg-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg) scaleX(-1); position: absolute; top:0; left:0;} 
        
        /* 🟢 FAINT BACKGROUND TRACK FOR DAILY GOAL */
        .goal-svg-wrap .timer-bg { stroke: rgba(16, 185, 129, 0.15) !important; stroke-width: 12 !important; }
        
        .goal-prog { fill: none; stroke: var(--success); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 440; stroke-dashoffset: 0; transition: stroke-dashoffset 0.5s linear; }
        
        .goal-text { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; width: 100%;}
        .g-big { font-family: 'Space Grotesk'; font-size: 2rem; font-weight: 700; color: var(--text-main); line-height: 1; }
        .g-small { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; font-weight: 600;}
        .goal-setter { display: flex; justify-content: center; gap: 10px; width: 100%;}
        .goal-setter input { background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-main); width: 60px; text-align: center; padding: 10px; border-radius: 8px; font-family: 'Outfit'; outline: none; font-weight: 600;}

        /* --- 4. GAMIFICATION REWARDS --- */
        .game-section { grid-column: 3 / 4; grid-row: 2 / 3; background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent); border-color: rgba(245, 158, 11, 0.2); justify-content: center;}
        .streak-badge { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Space Grotesk'; font-size: 1.1rem; font-weight: 700; color: var(--text-main); background: var(--bg-surface); padding: 8px 15px; border-radius: 50px; border: 1px solid var(--border-color); width: fit-content; margin: 0 auto 15px;}
        .streak-badge i { color: var(--text-muted); transition: 0.3s; }
        .streak-badge.active i { color: var(--warning); filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8)); }
        
        .lifetime-label { font-size: 0.75rem; color: var(--text-muted); text-align: center; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 5px; }
        .rank-icon { font-size: 3.5rem; text-align: center; margin-bottom: 10px; filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.3)); }
        .rank-title { text-align: center; font-family: 'Space Grotesk'; font-size: 1.6rem; font-weight: 700; color: var(--warning); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px;}
        .pts-display { text-align: center; font-size: 1rem; color: var(--text-muted); margin-bottom: 20px; font-weight: 500;}
        
        /* --- WEEKLY MARATHON ROAD UI --- */
        .weekly-road-container { padding: 25px 0 15px; border-top: 1px dashed var(--border-color); margin-top: 25px; position: relative; }
        .road-track { position: relative; width: calc(100% - 20px); margin: 0 10px 20px 10px; height: 16px; background: var(--sc-hover); border-radius: 10px; border: 1px inset var(--border-color); box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); }
        .road-fill { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, #8B5CF6, #F59E0B); border-radius: 10px; transition: width 1s ease; width: 0%; box-shadow: 0 0 10px rgba(139, 92, 246, 0.4); }
        
        .road-avatar { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--bg-surface); background: var(--primary); z-index: 10; transition: left 1s ease; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.3); left: 0%; }
        .road-avatar img { width: 100%; height: 100%; object-fit: cover; }
        .road-avatar i { font-size: 1.2rem; color: white; }
        
        .road-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 50%; z-index: 5; }
        .road-marker.reached { border-color: #F59E0B; background: #F59E0B; box-shadow: 0 0 8px #F59E0B;}
        .road-marker-label { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
        
        .road-marker.trophy { top: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; background: linear-gradient(135deg, #FBBF24, #F59E0B); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 1.3rem; border: 3px solid var(--bg-card); z-index: 8; box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
        .road-marker.trophy.reached { animation: pulse 1.5s infinite; }

        /* --- 5. ANALYTICS --- */
        .analytics-section { grid-column: 1 / 3; grid-row: 3 / 4; }
        .chart-wrap { width: 100%; max-width: 100%; height: 250px; position: relative; overflow: hidden; }
        
        /* --- 6. LEADERBOARD --- */
        .leaderboard-section { grid-column: 3 / 4; grid-row: 3 / 4; }
        .lb-list { display: flex; flex-direction: column; gap: 10px; max-height: 250px; overflow-y: auto; padding-right: 5px; }
        .lb-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-surface); padding: 12px 15px; border-radius: 12px; border: 1px solid var(--border-color); }
        .lb-rank { font-family: 'Space Grotesk'; font-weight: 700; font-size: 1.2rem; color: var(--text-muted); width: 30px; }
        .lb-item:nth-child(1) .lb-rank { color: #FBBF24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
        .lb-item:nth-child(2) .lb-rank { color: #9CA3AF; }
        .lb-item:nth-child(3) .lb-rank { color: #D97706; }
        .lb-name { flex: 1; font-weight: 600; font-size: 0.95rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 10px;}
        .lb-time { font-size: 0.85rem; color: var(--primary); font-weight: 700; background: var(--primary-soft); border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 6px; }

        /* --- 7. PREMIUM STUDY ROOM BANNER --- */
        .study-room-banner {
            grid-column: 1 / -1;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05)), var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.3);
            padding: 40px 50px;
            position: relative;
            overflow: hidden;
            box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.15);
            border-radius: 20px;
        }
        .study-room-banner::before {
            content: ''; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px; background: rgba(99, 102, 241, 0.2); filter: blur(80px); border-radius: 50%; z-index: 0; pointer-events: none;
        }
        .banner-text-content { position: relative; z-index: 1; max-width: 65%; }
        .banner-text-content h2 { font-family: 'Space Grotesk'; font-size: 2.5rem; color: var(--text-main); margin-bottom: 12px; display: flex; align-items: center; gap: 15px; font-weight: 800;}
        
        .live-badge { background: rgba(244, 63, 94, 0.1); color: var(--accent); font-size: 0.8rem; padding: 4px 12px; border-radius: 50px; font-family: 'Outfit'; letter-spacing: 2px; font-weight: 800; border: 1px solid rgba(244, 63, 94, 0.3); display: flex; align-items: center; gap: 6px;}
        .live-badge i { font-size: 0.6rem; animation: blink 1s infinite alternate; }
        @keyframes blink { 0% { opacity: 1; } 100% { opacity: 0.3; } }
        
        .banner-text-content p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; margin-bottom: 25px; font-weight: 500;}
        .btn-solid-banner { background: linear-gradient(45deg, #8B5CF6, #F43F5E, #F59E0B); background-size: 200% 200%; animation: gradientShift 4s ease infinite; color: white; border: none; padding: 14px 30px; border-radius: 50px; font-family: 'Outfit'; font-weight: 600; font-size: 1.05rem; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 8px 20px rgba(244, 63, 94, 0.3); }
        .btn-solid-banner:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(244, 63, 94, 0.5); }

        .banner-visual { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 150px; height: 150px; }
        .glass-icon-circle { width: 120px; height: 120px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 3rem; color: var(--primary); box-shadow: 0 15px 35px rgba(0,0,0,0.1); z-index: 2;}
        @media (prefers-color-scheme: dark) { .glass-icon-circle { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); } }
        
        .glass-icon-circle.small { position: absolute; bottom: -10px; right: -10px; width: 50px; height: 50px; font-size: 1.5rem; background: var(--accent); color: white; border: none; z-index: 3;}
        .pulse { animation: soft-pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1); }
        @keyframes soft-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

        /* --- MODALS & SETTINGS GRID --- */
        .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 9999; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; padding: 20px; box-sizing: border-box;}
        .modal.active { opacity: 1; pointer-events: auto; }
        .modal-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; width: 100%; max-width: 450px; padding: 30px; transform: scale(0.95); transition: 0.3s; position: relative; box-shadow: var(--shadow-lg); box-sizing: border-box;}
        .modal.active .modal-box { transform: scale(1); }
        .modal-box h2 { font-family: 'Space Grotesk'; font-size: 1.6rem; margin-bottom: 20px; color: var(--text-main); font-weight: 700;}
        .btn-close { position: absolute; top: 15px; right: 15px; background: transparent; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; padding: 5px; transition: 0.2s;}
        
        .btn-solid { background: linear-gradient(45deg, #8B5CF6, #3B82F6, #10B981); background-size: 200% 200%; animation: gradientShift 4s ease infinite; color: white; border: none; width: 100%; padding: 14px; border-radius: 12px; font-family: 'Outfit'; font-weight: 600; font-size: 1rem; cursor: pointer; margin-top: 20px; box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3); transition: 0.3s; }
        .btn-solid:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(139, 92, 246, 0.5); }
        .btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); padding: 14px; border-radius: 12px; font-family: 'Outfit'; font-weight: 600; font-size: 1rem; cursor: pointer; margin-top: 10px; width: 100%; transition: 0.3s; }
        .btn-outline:hover { background: var(--sc-hover); border-color: var(--primary); color: var(--primary); }
        .btn-danger { background: var(--accent); color: white; border: none; width: 100%; padding: 14px; border-radius: 12px; font-family: 'Outfit'; font-weight: 600; font-size: 1rem; cursor: pointer; margin-top: 10px; }

        .modal-settings-box { max-width: 850px; padding: 30px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(25px); border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); border-radius: 24px; max-height: 90vh; overflow-y: auto; } 
        @media (prefers-color-scheme: dark) { .modal-settings-box { background: rgba(20, 20, 26, 0.95); border: 1px solid rgba(255, 255, 255, 0.05); } }
        
        .settings-grid-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        
        .settings-group { margin-bottom: 25px; }
        .settings-group-title { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; margin-bottom: 12px; margin-left: 5px; }
        .settings-list { background: var(--bg-surface); border-radius: 20px; border: 1px solid var(--border-color); overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); }
        
        .setting-list-item { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; gap: 15px; }
        .setting-list-item:last-child { border-bottom: none; }
        
        .setting-info { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 200px; }
        .setting-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--bg-body); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
        
        .setting-controls { display: flex; align-items: center; gap: 12px; }
        
        .setting-label { font-size: 1.05rem; color: var(--text-main); font-weight: 600; }
        .setting-sub { font-size: 0.85rem; color: var(--text-muted); display: block; margin-top: 4px; }
        
        .time-input-group { display: flex; align-items: center; background: var(--bg-body); border-radius: 10px; padding: 4px; border: 1px solid var(--border-color); }
        .time-input-group input { width: 45px; text-align: center; background: transparent; border: none; color: var(--text-main); font-weight: 600; font-family: 'Space Grotesk'; font-size: 1rem; outline: none; }
        .time-input-group span { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; margin-right: 8px; }
        .time-input-group.single span { margin-right: 4px; }
        
        .btn-save-sm { background: rgba(99, 102, 241, 0.1); color: var(--primary); border: none; padding: 8px 16px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: 0.2s; font-family: 'Outfit'; }
        .btn-save-sm:hover { background: var(--primary); color: white; }
        
        .setting-input-modern { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-main); border-radius: 10px; padding: 8px 12px; font-family: 'Outfit'; font-weight: 500; outline: none; max-width: 150px; appearance: auto; }
        
        .toggle-switch { position: relative; width: 44px; height: 24px; }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-color); transition: .4s; border-radius: 24px; }
        .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .slider { background-color: var(--success); }
        input:checked + .slider:before { transform: translateX(20px); }

        /* --- FOOTER --- */
        footer { background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 100%), var(--bg-surface); border-top: 1px solid var(--border-color); padding: 80px 0 30px; margin-top: 80px; width: 100%; box-sizing: border-box;}
        .footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 50px; max-width: 1200px; margin: 0 auto; padding: 0 30px;}
        .footer-brand { display: flex; flex-direction: column; gap: 15px; }
        .footer-brand .logo-img { height: 45px; width: auto; border-radius: 8px; } 
        .footer-brand p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin-top: 10px; max-width: 90%; }
        .f-links h4, .footer-brand h4 { margin-bottom: 25px; font-family: 'Space Grotesk'; font-size: 1.2rem; color: var(--text-main); font-weight: 700; position: relative; display: inline-block;}
        .f-links h4::after, .footer-brand h4::after { content: ''; position: absolute; left: 0; bottom: -8px; width: 20px; height: 3px; background: var(--primary); border-radius: 3px; }
        .footer-brand h4::after { display: none; }
        .f-links a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 15px; transition: 0.3s; font-size: 0.95rem; font-weight: 500;}
        .f-links a:hover { color: var(--primary); transform: translateX(5px); }
        .copyright { text-align: center; border-top: 1px solid var(--border-color); padding-top: 30px; color: var(--text-muted); font-size: 0.9rem; }

        /* ==========================================================
           📱 100% BULLETPROOF MOBILE RESPONSIVENESS
           ========================================================== */
        @media (max-width: 1200px) {
            .grid-layout { grid-template-columns: 1fr 1fr; }
            .focus-section { grid-column: 1 / 3; grid-row: 1 / 2; }
            .todo-section { grid-column: 1 / 2; grid-row: 2 / 4; }
            .goal-section { grid-column: 2 / 3; grid-row: 2 / 3; }
            .game-section { grid-column: 2 / 3; grid-row: 3 / 4; }
            .analytics-section { grid-column: 1 / 2; grid-row: 4 / 5; }
            .leaderboard-section { grid-column: 2 / 3; grid-row: 4 / 5; }
        }

        @media (max-width: 900px) {
            .footer-content { grid-template-columns: 1fr 1fr; }

        }

        @media (max-width: 768px) {
            .nav-wrapper { padding: 10px 15px; }
            .navbar { padding: 0.8rem 1.2rem; border-radius: 16px; width: 100%; box-sizing: border-box; }
            
            .logo { gap: 8px; }
            .logo-img { height: 32px; }
            .logo span { font-size: 1.05rem; letter-spacing: -0.3px; }

            .nav-links { 
                display: none; position: absolute; top: 100%; left: 0; width: 100%; 
                background: var(--bg-surface) !important; 
                flex-direction: column; padding: 20px; 
                border-radius: 16px; border: 1px solid var(--border-color); 
                box-shadow: 0 20px 40px rgba(0,0,0,0.5) !important; 
                z-index: 999999 !important; 
                box-sizing: border-box; margin-top: 10px;
                max-height: 85vh; overflow-y: auto; backdrop-filter: none !important;
            }
            .nav-links.active { display: flex; align-items: stretch; }
            .nav-link { display: block; padding: 12px 15px; border-radius: 8px; width: 100%; }
            .menu-toggle { display: block; }
            
            .nav-item-dropdown { width: 100%; }
            .nav-dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none !important; box-shadow: none; border: none; padding: 5px 0 5px 20px; background: transparent; display: none; width: 100%; margin-top: 0; }
            .nav-dropdown-menu.active-drop { display: flex !important; flex-direction: column; }
            .nav-item-dropdown:hover .nav-dropdown-menu { display: none; }
            
            .nav-actions { gap: 10px; } 

            .user-avatar { width: 34px; height: 34px; font-size: 1rem; }
            .user-dropdown { right: -5px; width: 230px;} 

            .page-content { padding-top: 120px !important; padding-bottom: 40px; }
            .container { padding: 0 15px; width: 100%; overflow: hidden;} 
            
            .grid-layout { display: flex; flex-direction: column; gap: 12px; width: 100%; } 
            .bento-card { padding: 18px 15px; border-radius: 16px; width: 100%; box-sizing: border-box; }
            
            .timer-toggle { width: 100%; max-width: 100%; margin-bottom: 20px; } 
            .svg-timer-container { width: 100%; max-width: 220px; margin: 0 auto 20px; }
            
            .btn-play { width: 60px; height: 60px; font-size: 1.5rem; }
            .btn-stop { width: 60px; height: 60px; font-size: 1.3rem; }
            
            .task-input-box { padding: 12px; width: 100%; }
            .task-row-2 { flex-direction: column; width: 100%; gap: 10px; display: flex; } 
            .task-row-2 select, .task-row-2 input[type="date"], .btn-add-task { width: 100%; max-width: 100%; box-sizing: border-box; }
            
            .task-item { padding: 12px; }
            .task-header { flex-direction: column; align-items: flex-start; gap: 8px; }
            .task-actions { flex-direction: column; align-items: flex-start; gap: 12px;}
            .action-icon-btns { width: 100%; justify-content: space-between; }
            
            .goal-svg-wrap { max-width: 140px; }
            .g-big { font-size: 1.8rem; }
            
            /* Responsive Study Room Banner */
            .study-room-banner { flex-direction: column-reverse; text-align: center; padding: 30px 20px; gap: 30px; }
            .banner-text-content { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
            .banner-text-content h2 { font-size: 2rem; justify-content: center; flex-wrap: wrap;}
            .banner-visual { margin: 0 auto; }
            .btn-solid-banner { width: 100%; justify-content: center; }
            
            .modal { align-items: flex-end; padding: 0; }
            .modal-box { border-radius: 20px 20px 0 0; margin: 0; width: 100%; max-width: 100%; transform: translateY(100%); padding: 30px 20px; max-height: 85vh; overflow-y: auto;}
            
            /* Responsive Settings Grid */
            .settings-grid-wrapper { grid-template-columns: 1fr; }
            .setting-list-item { flex-direction: column; align-items: flex-start; }
            .setting-controls { width: 100%; justify-content: space-between; margin-top: 5px; }
            .sound-controls { flex-wrap: nowrap; }
            .setting-input { width: auto; text-align: right; }
            .toggle-switch { width: 44px !important; flex-shrink: 0; }
        }
        
        @media (max-width: 768px) {
            .footer-content { text-align: left; gap: 30px; grid-template-columns: 1fr 1fr; padding: 0 20px;}
            .footer-brand { grid-column: 1 / 3; }
        }
        
        @media (max-width: 480px) {
            .footer-content { grid-template-columns: 1fr; gap: 35px; }
            .footer-brand { grid-column: 1 / 2; }
        }

        @media (max-width: 360px) {
            .bento-card { padding: 20px 12px; } 
            .page-content { padding-top: 150px !important; }
            
            .svg-timer-container { max-width: 190px; } 
            .btn-play { width: 55px; height: 55px; font-size: 1.3rem; }
            .btn-stop { width: 55px; height: 55px; font-size: 1.1rem; }
            .g-big { font-size: 1.6rem; }
            .goal-svg-wrap { max-width: 120px; }
            .time-setter input { width: 45px; font-size: 1.2rem; padding: 5px;}
            .goal-setter input { width: 55px; }
            .banner-text-content h2 { font-size: 1.6rem; }
        }
        .btn-solid-banner i {
    transform: translateY(1.5px); /* Arrow ko thoda sa niche push karne ke liye */
}
/* PREMIUM DATE FILTER */
.custom-date-filter {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--primary);
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2310b981%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
    padding-right: 32px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.custom-date-filter:hover {
    background-color: var(--primary);
    color: white;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}
.custom-date-filter option {
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 500;
}
/* --- 6. LEADERBOARD PREMIUM REDESIGN --- */
.lb-list { display: flex; flex-direction: column; gap: 14px; max-height: 320px; overflow-y: auto; padding: 10px 5px; }
.lb-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg-surface); padding: 10px 14px; border-radius: 16px; border: 1px solid var(--border-color); transition: transform 0.2s, box-shadow 0.2s; gap: 10px;}
.lb-item:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); z-index: 1; }

.lb-rank { font-family: 'Space Grotesk'; font-weight: 800; font-size: 1.05rem; color: var(--text-muted); width: 24px; text-align: center; }
.lb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: 'Space Grotesk'; font-size: 1rem; flex-shrink: 0;}

.lb-name { flex: 1; font-weight: 600; font-size: 0.85rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-time { font-size: 0.75rem; color: var(--primary); font-weight: 700; background: var(--primary-soft); padding: 4px 6px; border-radius: 8px; display: flex; align-items: center; gap: 4px; flex-shrink: 0;}

/* Top 3 Styling */
.lb-item.rank-1 { background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05)); border: 1px solid rgba(251, 191, 36, 0.5); }
.lb-item.rank-1 .lb-rank { color: #FBBF24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
.lb-item.rank-1 .lb-avatar { background: #FBBF24; color: #fff; box-shadow: 0 0 10px rgba(251,191,36,0.3); }

.lb-item.rank-2 { background: linear-gradient(135deg, rgba(156, 163, 175, 0.1), rgba(156, 163, 175, 0.05)); border: 1px solid rgba(156, 163, 175, 0.5); }
.lb-item.rank-2 .lb-rank { color: #9CA3AF; }
.lb-item.rank-2 .lb-avatar { background: #9CA3AF; color: #fff; }

.lb-item.rank-3 { background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(217, 119, 6, 0.05)); border: 1px solid rgba(217, 119, 6, 0.4); }
.lb-item.rank-3 .lb-rank { color: #D97706; }
.lb-item.rank-3 .lb-avatar { background: #D97706; color: #fff; }
@keyframes pulseLive { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); } 70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
@keyframes popIn { from { opacity: 0; transform: translateY(-10px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.pill-btn { border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-muted); padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.2s; font-family: 'Outfit'; }
.pill-btn:hover { background: rgba(0,0,0,0.03); color: var(--text-main); }
.pill-btn.active { border-color: var(--primary); background: rgba(16, 185, 129, 0.1); color: var(--primary); font-weight: 600; }
.pill-btn.icon-pill { padding: 6px 10px; font-size: 0.95rem; }

.btn-apple-submit { 
    background: linear-gradient(135deg, #FF2E93, #FF8038); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    padding: 8px 24px; 
    font-size: 1.05rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    box-shadow: 0 4px 15px rgba(255, 46, 147, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-apple-submit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 46, 147, 0.45);
}
.btn-apple-submit i { font-size: 1.1rem; }


.btn-circle-add { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: white; border: none; font-size: 1.1rem; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); }
.btn-circle-add:hover { transform: scale(1.05); box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4); }

.custom-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 0 100vmax rgba(0,0,0,0.4); z-index: 1000; min-width: 280px; padding: 8px 0; overflow: hidden; animation: popInFixed 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes popInFixed {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.custom-popup .popup-header { padding: 8px 16px 12px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color); }
.custom-popup .popup-list { max-height: 200px; overflow-y: auto; }
.custom-popup .popup-item { padding: 10px 16px; cursor: pointer; transition: 0.2s; font-size: 0.9rem; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.custom-popup .popup-item:hover { background: rgba(0,0,0,0.04); color: var(--primary); }

.cal-nav-btn { background: transparent; border: none; font-size: 1rem; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; transition: 0.2s; }
.cal-nav-btn:hover { color: var(--primary); background: rgba(0,0,0,0.05); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-header-days div { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); padding-bottom: 8px; }
.cal-day { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--text-main); border-radius: 50%; cursor: pointer; transition: 0.2s; margin: 0 auto; }
.cal-day:hover:not(.disabled) { background: var(--sc-hover); }
.cal-day.disabled { color: var(--border-color); cursor: default; }
.cal-day.selected { background: var(--primary); color: #ffffff !important; font-weight: 700; box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3); }
.cal-day.today { border: 1px solid var(--primary); color: var(--primary); }

.cal-action-btn { background: transparent; border: none; font-family: 'Outfit'; font-weight: 600; font-size: 0.9rem; padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: 0.2s; }
.cal-action-btn.cancel { color: var(--text-muted); }
.cal-action-btn.cancel:hover { background: var(--sc-hover); }
.cal-action-btn.done { color: white; background: var(--primary); box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2); }
.cal-action-btn.done:hover { transform: translateY(-1px); box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3); }

.pill-scroll-container::-webkit-scrollbar { display: none; }
.task-filters::-webkit-scrollbar { display: none; }
.task-item.overdue-deadline { border-left: 4px solid var(--danger); }
.task-item.overdue-deadline .t-title { color: var(--danger); }
