*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

body{
    background:linear-gradient(135deg,#0a0a1a,#13132e);
    color:rgba(255,255,255,.92);
    font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    min-height:100vh;
    line-height:1.5;
}

::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:rgba(255,255,255,.03)}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.2)}

/* ── Header ─────────────────────────────────────────── */
.header{
    display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;
    padding:16px 24px;
    background:rgba(255,255,255,.03);
    border-bottom:1px solid rgba(255,255,255,.06);
    backdrop-filter:blur(12px);
    position:sticky;top:0;z-index:50;
}
.header-title{font-size:1.25rem;font-weight:700;letter-spacing:-.02em;white-space:nowrap}
.header-controls{display:flex;gap:10px;align-items:center}

/* ── Inputs / Selects ───────────────────────────────── */
.input{
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    border-radius:8px;
    color:#fff;
    padding:8px 12px;
    font-size:.875rem;
    outline:none;
    transition:border-color .2s,box-shadow .2s;
}
.input:focus{border-color:rgb(99,102,241);box-shadow:0 0 0 3px rgba(99,102,241,.18)}
select.input{cursor:pointer}
input[type="date"]::-webkit-calendar-picker-indicator{filter:invert(1) brightness(.8)}

/* ── Buttons ────────────────────────────────────────── */
.btn{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;
    padding:9px 18px;border-radius:8px;font-size:.875rem;font-weight:500;
    cursor:pointer;border:none;transition:opacity .2s,transform .1s;
    white-space:nowrap;
}
.btn:active{transform:scale(.97)}
.btn-primary{
    background:linear-gradient(135deg,rgb(79,70,229),rgb(124,58,237));
    color:#fff;
}
.btn-primary:hover{opacity:.88}
.btn-secondary{
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.1);
    color:rgba(255,255,255,.85);
}
.btn-secondary:hover{background:rgba(255,255,255,.08)}

.btn-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}

/* ── Main ───────────────────────────────────────────── */
.main{max-width:1200px;margin:0 auto;padding:24px 20px 48px;display:flex;flex-direction:column;gap:24px}

/* ── Card ───────────────────────────────────────────── */
.card{
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    padding:24px;
}

.section-title{font-size:1rem;font-weight:600;margin-bottom:16px;color:rgba(255,255,255,.75)}

/* ── Stats Row ──────────────────────────────────────── */
.stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}
.stat-card{
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    padding:20px 24px;
    display:flex;flex-direction:column;gap:4px;
    transition:border-color .2s,background .2s;
}
.stat-card:hover{border-color:rgba(99,102,241,.4);background:rgba(99,102,241,.06)}
.stat-value{font-size:1.75rem;font-weight:700;letter-spacing:-.03em;line-height:1.2}
.stat-label{font-size:.8rem;color:rgba(255,255,255,.5);text-transform:uppercase;letter-spacing:.04em}

/* ── Chart ──────────────────────────────────────────── */
.chart-section{overflow:hidden}

/* ── Timeline ───────────────────────────────────────── */
.timeline-wrapper{overflow-x:auto;padding-bottom:4px}
.timeline-hours{
    display:flex;justify-content:space-between;min-width:720px;
    padding:0 2px;margin-bottom:6px;
    font-size:.7rem;color:rgba(255,255,255,.4);
}
.timeline-track{
    position:relative;height:32px;min-width:720px;
    background:rgba(255,255,255,.03);border-radius:6px;overflow:hidden;
}
.timeline-block{
    position:absolute;top:0;height:100%;border-radius:4px;
    cursor:pointer;transition:opacity .15s;min-width:2px;
}
.timeline-block:hover{opacity:.8}

.timeline-tooltip{
    position:fixed;padding:8px 12px;background:rgba(10,10,26,.95);
    border:1px solid rgba(255,255,255,.12);border-radius:8px;
    font-size:.75rem;pointer-events:none;z-index:100;
    white-space:nowrap;opacity:0;transition:opacity .15s;
}
.timeline-tooltip.visible{opacity:1}

/* ── Screenshot Gallery ─────────────────────────────── */
.screenshot-grid{
    display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;
}
.screenshot-thumb{
    position:relative;border-radius:10px;overflow:hidden;cursor:pointer;
    aspect-ratio:16/10;background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.06);
    transition:border-color .2s,transform .2s;
}
.screenshot-thumb:hover{border-color:rgba(99,102,241,.5);transform:translateY(-2px)}
.screenshot-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.screenshot-time{
    position:absolute;bottom:0;left:0;right:0;
    padding:4px 8px;font-size:.7rem;
    background:linear-gradient(transparent,rgba(0,0,0,.7));
    color:rgba(255,255,255,.85);text-align:right;
}

.empty-state{
    grid-column:1/-1;text-align:center;padding:40px 0;
    color:rgba(255,255,255,.3);font-size:.9rem;
}

/* ── Lightbox ───────────────────────────────────────── */
.lightbox{
    position:fixed;inset:0;background:rgba(0,0,0,.88);
    display:flex;align-items:center;justify-content:center;
    z-index:200;opacity:0;pointer-events:none;transition:opacity .25s;
}
.lightbox.active{opacity:1;pointer-events:auto}
.lightbox-img{max-width:92vw;max-height:90vh;border-radius:8px;object-fit:contain}
.lightbox-close{
    position:absolute;top:16px;right:20px;
    background:none;border:none;color:#fff;font-size:2rem;
    cursor:pointer;opacity:.7;transition:opacity .2s;
    line-height:1;
}
.lightbox-close:hover{opacity:1}

/* ── Settings ───────────────────────────────────────── */
.settings-section{padding:0;overflow:hidden}
.settings-toggle{
    display:flex;align-items:center;justify-content:space-between;
    width:100%;padding:18px 24px;
    background:none;border:none;color:rgba(255,255,255,.75);
    font-size:1rem;font-weight:600;cursor:pointer;
    transition:color .2s;
}
.settings-toggle:hover{color:rgba(255,255,255,.92)}
.toggle-arrow{transition:transform .3s}
.settings-section.open .toggle-arrow{transform:rotate(180deg)}
.settings-body{
    max-height:0;overflow:hidden;transition:max-height .4s ease;
    padding:0 24px;
}
.settings-section.open .settings-body{max-height:2000px;padding:0 24px 24px}
.settings-group{margin-bottom:24px}
.settings-group:last-child{margin-bottom:0}
.settings-group-title{font-size:.9rem;font-weight:600;margin-bottom:12px;color:rgba(255,255,255,.6)}

.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.form-label{display:flex;flex-direction:column;gap:6px;font-size:.8rem;color:rgba(255,255,255,.55)}
.form-label .input{width:100%}

/* Notification tabs */
.notif-tabs{display:flex;gap:4px;margin-bottom:16px;flex-wrap:wrap}
.notif-tab{
    padding:7px 16px;border-radius:6px;font-size:.8rem;font-weight:500;
    background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);
    color:rgba(255,255,255,.55);cursor:pointer;transition:all .2s;
}
.notif-tab.active{background:rgba(99,102,241,.15);border-color:rgba(99,102,241,.4);color:#fff}
.notif-panel{display:flex;flex-direction:column;gap:12px}
.notif-panel.hidden{display:none}

.toggle-label{
    display:flex;align-items:center;gap:8px;font-size:.85rem;
    color:rgba(255,255,255,.75);cursor:pointer;
}
.toggle-label input[type="checkbox"]{
    width:16px;height:16px;accent-color:rgb(99,102,241);
}

/* ── Toast ──────────────────────────────────────────── */
.toast-container{position:fixed;bottom:20px;right:20px;display:flex;flex-direction:column;gap:8px;z-index:300}
.toast{
    padding:12px 20px;border-radius:8px;font-size:.85rem;
    background:rgba(10,10,26,.92);border:1px solid rgba(255,255,255,.1);
    backdrop-filter:blur(10px);
    animation:toast-in .3s ease forwards;
}
.toast.success{border-color:rgba(16,185,129,.4)}
.toast.error{border-color:rgba(239,68,68,.4)}
@keyframes toast-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

/* ── Category Colors ────────────────────────────────── */
.cat-coding{background:#6366f1}
.cat-browsing{background:#8b5cf6}
.cat-communication{background:#06b6d4}
.cat-design{background:#f59e0b}
.cat-documents{background:#10b981}
.cat-entertainment{background:#ef4444}
.cat-system{background:#6b7280}
.cat-idle{background:#374151}

/* ── Responsive ─────────────────────────────────────── */
@media(max-width:640px){
    .header{padding:12px 16px}
    .header-controls{width:100%}
    .header-controls .input{flex:1;min-width:0}
    .main{padding:16px 12px 40px}
    .card{padding:16px}
    .form-row{grid-template-columns:1fr}
    .stats-row{grid-template-columns:repeat(2,1fr)}
    .screenshot-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
}
