/* =============================================
   EduAI "Haad.ai Inspired" Ultra-Minimalism (v17.0)
   Dark Green Glow + Minimal Enterprise Aesthetic
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-base: #0a0a0b;
    --card-bg: #0f0f12;
    --card-hover: #151518;
    --c-primary: #fafafa;
    --c-accent: #e84d30;
    --c-accent-dim: rgba(232, 77, 48, 0.15);
    --c-accent-glow: rgba(232, 77, 48, 0.05);
    --text-pure: #fafafa;
    --text-dim: #888888;
    --glass-border: rgba(232, 77, 48, 0.12);
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

/* ── Ambient Background Glow ── */
body::before {
    content: '';
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(ellipse 80% 40% at 50% -10%, rgba(232, 77, 48, 0.08) 0%, transparent 80%),
        radial-gradient(ellipse 50% 30% at 90% 90%, rgba(232, 77, 48, 0.04) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
    animation: ambientPulse 8s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
    from { opacity: 0.6; }
    to   { opacity: 1; }
}

* { margin:0; padding:0; box-sizing:border-box; outline:none; font-family: var(--font-main); }

body {
    background: var(--bg-base);
    color: var(--text-pure);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Sidebar --- */
.wow-sidebar {
    width: 260px; height: 100vh; position: fixed; left: 0; top: 0;
    background: var(--bg-base); border-right: 1px solid var(--glass-border);
    padding: 32px 24px; z-index: 1000;
    display: flex; flex-direction: column;
}

.nav-link-wow {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px;
    color: var(--text-dim); text-decoration: none; border-radius: 8px;
    font-size: 14px; font-weight: 500; transition: 0.2s; margin-bottom: 4px;
}

.nav-link-wow svg { width: 18px; height: 18px; opacity: 0.7; }
.nav-link-wow:hover { background: var(--c-accent-dim); color: var(--text-pure); }
.nav-link-wow.active { background: var(--c-accent); color: #000; box-shadow: 0 0 20px rgba(232,77,48,0.2); }
.nav-link-wow.active svg { opacity: 1; color: #000; }

.new-badge { font-size: 9px; background: var(--c-accent); color: #000; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-left: auto; }

/* ── Sidebar Music Mini Player ── */
.sidebar-music {
    margin-top: 16px;
    padding: 14px;
    background: var(--c-accent-dim);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}
.sidebar-music .s-song {
    font-size: 12px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 10px;
}
.sidebar-music .s-artist { font-size: 10px; color: var(--text-dim); margin-bottom: 10px; }
.sidebar-music .s-controls { display: flex; align-items: center; gap: 10px; }
.s-controls button {
    background: none; border: none; color: #fff; cursor: pointer;
    padding: 4px; display: flex; align-items:center; justify-content:center;
    opacity: 0.7; transition: opacity 0.2s;
}
.s-controls button:hover { opacity: 1; }
.s-controls button.play-btn {
    background: var(--c-accent); color: #000; border-radius: 50%;
    width: 28px; height: 28px; opacity: 1;
}
.s-progress { flex:1; height: 3px; background: rgba(255,255,255,0.1);
    border-radius: 3px; position: relative; cursor: pointer; }
.s-progress-fill { height: 100%; width: 0%; background: var(--c-accent);
    border-radius: 3px; transition: width 0.5s linear; }

/* --- Layout --- */
main { margin-left: 260px; padding: 48px 64px; }

.view-section { display: none; opacity: 0; }
.view-section.active { display: block; opacity: 1; animation: fadeIn 0.4s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Cards --- */
.wow-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 32px;
    transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative; z-index: 1;
    overflow: hidden;
}
.wow-card:hover {
    background: var(--card-hover);
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.07), 0 8px 32px rgba(0,0,0,0.5);
    transform: translateY(-2px);
}

/* ── Stats Grid ── */
.stats-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
.stat-bento-cell {
    background: var(--bg-base);
    padding: 24px;
    transition: background 0.2s;
}
.stat-bento-cell:hover { background: var(--card-hover); }
.stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.stat-value { font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.stat-change { font-size: 11px; color: var(--c-accent); margin-top: 6px; }

/* ── Layout Grids ── */
.section-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 24px; }
.section-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.section-grid-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

/* --- Buttons --- */
.btn-primary-wow {
    background: var(--c-accent); color: #000; padding: 12px 24px; border-radius: 6px;
    font-size: 14px; font-weight: 600; border: none; cursor: pointer;
    transition: 0.2s; text-decoration: none; display: flex; align-items:center; justify-content:center;
    box-shadow: 0 0 20px rgba(232, 77, 48, 0.25);
}
.btn-primary-wow:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 0 30px rgba(232, 77, 48, 0.4); }

.btn-secondary {
    background: transparent; color: var(--text-pure); padding: 12px 24px; border-radius: 6px;
    font-size: 14px; font-weight: 500; border: 1px solid var(--glass-border); cursor: pointer;
    transition: 0.2s; text-decoration: none; display: flex; align-items:center; justify-content:center;
}
.btn-secondary:hover { background: var(--c-accent-dim); border-color: rgba(232,77,48,0.3); }

/* --- AI Chat Area --- */
.ai-bubble {
    background: transparent; padding: 0 0 24px 0;
    font-size: 15px; line-height: 1.6; color: var(--text-dim);
    border-bottom: 1px solid var(--glass-border); margin-bottom: 24px;
}
.ai-bubble strong { color: #fff; display: block; margin-bottom: 8px; font-weight: 500; }
.user-bubble {
    background: transparent; color: #fff; padding: 0 0 24px 0;
    font-size: 15px; line-height: 1.6;
    border-bottom: 1px solid var(--glass-border); margin-bottom: 24px; font-weight: 500;
}
.user-bubble::before { content: 'Siz'; display: block; color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }

/* --- Forms --- */
.haad-input {
    width: 100%; background: #060d07; border: 1px solid var(--glass-border);
    padding: 14px 18px; border-radius: 8px; color: #fff; font-size: 14px; margin-top: 8px;
    transition: 0.2s;
}
.haad-input:focus { border-color: rgba(232,77,48,0.5); box-shadow: 0 0 0 3px rgba(232,77,48,0.08); }

/* ── Task List ── */
.task-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0; border-bottom: 1px solid var(--glass-border);
}
.task-item:last-child { border-bottom: none; }
.task-check {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--glass-border); cursor: pointer;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.task-check.done { background: var(--c-accent); border-color: var(--c-accent); }
.task-check.done::after { content: '✓'; font-size: 11px; color: #000; font-weight: 700; }
.task-text { flex: 1; font-size: 14px; font-weight: 500; }
.task-text.done { text-decoration: line-through; color: var(--text-dim); }
.task-tag { font-size: 11px; padding: 3px 10px; border-radius: 4px; font-weight: 600; }
.tag-math { background: rgba(232,77,48,0.1); color: var(--c-accent); }
.tag-eng { background: rgba(99,102,241,0.1); color: #818cf8; }
.tag-phy { background: rgba(251,146,60,0.1); color: #fb923c; }
.tag-code { background: rgba(251,191,36,0.1); color: #fbbf24; }
.tag-ai { background: rgba(167, 139, 250, 0.1); color: #a78bfa; }

/* ── Achievement Badges ── */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.badge-item {
    background: var(--card-bg); border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 16px 12px; text-align: center;
    transition: 0.3s;
}
.badge-item:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.badge-icon { font-size: 28px; margin-bottom: 8px; }
.badge-name { font-size: 11px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.badge-desc { font-size: 10px; color: var(--text-dim); }
.badge-item.locked { opacity: 0.35; filter: grayscale(1); }

/* ── Weekly Chart ── */
.week-chart { display: flex; align-items: flex-end; gap: 8px; height: 80px; }
.week-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-bar {
    width: 100%; border-radius: 4px 4px 0 0;
    background: var(--c-accent-dim);
    transition: height 0.6s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}
.week-bar.today { background: var(--c-accent); box-shadow: 0 0 12px rgba(232, 77, 48, 0.4); }
.week-day, .week-hrs { font-size: 10px; color: var(--text-dim); }

/* ── Music Player ── */
.music-player-full {
    background: linear-gradient(135deg, #0a1f10 0%, #000 80%);
    border: 1px solid rgba(232,77,48,0.2);
    border-radius: 12px; padding: 32px;
}
.music-cover {
    width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; margin-bottom: 24px;
    background: linear-gradient(135deg, #1a2f1a, #0a1510);
    display: flex; align-items: center; justify-content: center; position: relative;
}
.music-cover-art { font-size: 80px; animation: spin 8s linear infinite paused; }
.music-cover-art.playing { animation-play-state: running; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.music-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.music-artist { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }
.music-progress { height: 4px; background: rgba(255,255,255,0.08); border-radius: 4px; margin-bottom: 8px; cursor: pointer; position: relative; }
.music-progress-fill { height: 100%; border-radius: 4px; background: var(--c-accent); width: 0%; transition: width 0.5s linear; box-shadow: 0 0 8px rgba(232,77,48,0.5); }
.music-time { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-bottom: 20px; }
.music-controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.m-ctrl-btn { background: none; border: none; color: #fff; cursor: pointer; opacity: 0.6; transition: 0.2s; padding: 8px; display: flex; align-items: center; justify-content: center; }
.m-ctrl-btn:hover { opacity: 1; }
.m-play-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(232,77,48,0.6); }
.music-controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.m-play-btn { background: var(--c-accent); border: none; color: #000; cursor: pointer; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(232, 77, 48, 0.4); transition: 0.2s; flex-shrink: 0; }

/* ── Pomodoro ── */
.pomo-modes { display: flex; gap: 8px; margin-bottom: 32px; justify-content: center; }
.pomo-mode-btn {
    padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--glass-border); background: transparent;
    color: var(--text-dim); cursor: pointer; transition: 0.2s;
}
.pomo-mode-btn.active { background: var(--c-accent); color: #000; border-color: var(--c-accent); }
.pomo-ring { width: 220px; height: 220px; position: relative; margin: 0 auto 40px; }
.pomo-ring svg { width: 220px; height: 220px; transform: rotate(-90deg); }
.pomo-ring-fill { fill: none; stroke: var(--c-accent); stroke-width: 6; stroke-dasharray: 628; stroke-dashoffset: 0; stroke-linecap: round; transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 8px rgba(232,77,48,0.6)); }

/* ── Status Dot ── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 8px var(--c-accent); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── Landing Page Styles (Haad Edition) ── */
.hero-haad {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 24px;
    background: radial-gradient(circle at 50% 0%, rgba(232, 77, 48, 0.1) 0%, transparent 50%);
}

.haad-nav {
    width: 100%;
    max-width: 1400px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: absolute;
    top: 0;
    z-index: 100;
}

.haad-logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -1px;
}

.haad-nav-actions {
    display: flex;
    gap: 12px;
}

.haad-nav-actions .btn-secondary,
.haad-nav-actions .btn-primary-wow {
    padding: 10px 24px;
    font-size: 14px;
}

/* ── Glow Effects ── */
.text-glow {
    text-shadow: 0 0 30px rgba(232, 77, 48, 0.3);
}

.card-blur {
    background: rgba(8, 13, 9, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(232, 77, 48, 0.15);
}

@media (max-width: 768px) {
    .haad-nav { padding: 0 20px; }
    .haad-nav-actions { display: none; }
}

/* ── Fixed Stretched Buttons ── */
.btn-primary-wow, .btn-secondary {
    white-space: nowrap;
    width: fit-content;
    display: inline-flex;
}

/* ── Sidebar Progress Fill ── */
.s-progress-fill { height: 100%; width: 0%; background: var(--c-accent); border-radius: 3px; transition: width 0.5s linear; }

/* ── New Badge ── */
.new-badge { font-size: 9px; background: var(--c-accent); color: #000; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-left: auto; }

/* ── Habit Tracker ── */
.habit-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--glass-border); }
.habit-row:last-child { border-bottom: none; }
.habit-name { flex: 1; font-size: 13px; font-weight: 500; }
.habit-days { display: flex; gap: 5px; }
.h-day { width: 22px; height: 22px; border-radius: 4px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); font-size: 9px; display: flex; align-items: center; justify-content: center; color: var(--text-dim); cursor: pointer; transition: 0.2s; }
.h-day.done { background: var(--c-accent); border-color: var(--c-accent); color: #000; font-weight: 700; }
.h-pct { font-size: 12px; color: var(--c-accent); font-weight: 700; min-width: 36px; text-align: right; }

/* ── Playlist ── */
.music-playlist { margin-top: 24px; }
.playlist-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.playlist-item:hover { background: var(--c-accent-dim); }
.playlist-item.active { background: var(--c-accent-dim); }
.pl-num { font-size: 12px; color: var(--text-dim); width: 20px; text-align: center; }
.pl-info { flex: 1; }
.pl-name { font-size: 13px; font-weight: 500; }
.pl-artist, .pl-dur { font-size: 11px; color: var(--text-dim); }
.pl-bars { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.pl-bar { width: 3px; border-radius: 1px; background: var(--c-accent); }
.pl-bar:nth-child(1) { height: 40%; animation: pl-wave 0.8s infinite alternate; }
.pl-bar:nth-child(2) { height: 100%; animation: pl-wave 0.8s 0.2s infinite alternate; }
.pl-bar:nth-child(3) { height: 60%; animation: pl-wave 0.8s 0.4s infinite alternate; }
@keyframes pl-wave { from { height: 30%; } to { height: 100%; } }

/* ── Volume ── */
.vol-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.vol-icon { font-size: 14px; color: var(--text-dim); }
.vol-slider { flex: 1; -webkit-appearance: none; height: 3px; background: rgba(255,255,255,0.1); border-radius: 3px; cursor: pointer; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: var(--c-accent); border-radius: 50%; }

/* ── Quote Card ── */
.quote-card { background: linear-gradient(135deg,rgba(232, 77, 48, 0.05), transparent); border: 1px solid var(--glass-border); border-radius: 12px; padding: 28px; }
.quote-text { font-size: 18px; font-weight: 500; line-height: 1.5; margin-bottom: 12px; font-style: italic; }
.quote-author { font-size: 12px; color: var(--text-dim); }

/* ── Pomo Timer Center ── */
.pomo-time-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.pomo-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.pomo-sessions { font-size: 12px; color: var(--text-dim); margin-top: 16px; }
.pomo-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); margin: 0 3px; }
.pomo-dot.empty { background: rgba(255,255,255,0.1); }
#timerDisplay { font-size: 48px; font-weight: 300; letter-spacing: -2px; font-variant-numeric: tabular-nums; }

/* ── Notification Panel ── */
#notifPanel { display: none; position: fixed; top: 70px; right: 40px; width: 340px; background: #080d09; border: 1px solid var(--glass-border); border-radius: 12px; z-index: 5000; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
#notifPanel.show { display: block; animation: fadeIn 0.2s ease; }
.notif-bubble { position: relative; }
.notif-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; background: #f43f5e; border-radius: 50%; border: 2px solid #000; }
.notif-item { padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.notif-item:last-child { border-bottom: none; }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.notif-body { font-size: 12px; color: var(--text-dim); }
.notif-time { font-size: 10px; color: var(--text-dim); margin-top: 4px; }

/* ── Focus Overlay ── */
#focusOverlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.97); z-index: 9999; align-items: center; justify-content: center; flex-direction: column; }
#focusOverlay.show { display: flex; }
.focus-exit { position: absolute; top: 24px; right: 24px; background: none; border: 1px solid var(--glass-border); color: var(--text-dim); padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; }

/* ── Music Cover Glow ── */
/* ── Laboratory ── */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.lab-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}
.lab-card:hover {
    border-color: var(--c-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(232, 77, 48, 0.1);
}
.lab-card.big {
    grid-column: span 2;
    flex-direction: row;
}
@media (max-width: 900px) {
    .lab-card.big { grid-column: span 1; flex-direction: column; }
}
.lab-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}
.lab-card.big .lab-img {
    width: 50%;
    height: 100%;
    border-bottom: none;
    border-right: 1px solid var(--glass-border);
}
@media (max-width: 900px) {
    .lab-card.big .lab-img { width: 100%; height: 240px; border-right: none; border-bottom: 1px solid var(--glass-border); }
}
.lab-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.lab-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-accent);
    margin-bottom: 8px;
}
.lab-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}
.lab-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 20px;
}
.theory-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    transition: 0.2s;
}
.theory-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(232, 77, 48, 0.3);
}
.theory-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: var(--c-accent-dim);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.theory-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
/* ── Config Modal ── */
#configModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.modal-content-wow {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    padding: 32px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
