/* Background Layer */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#bg:before, #bg:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#bg:before {
    background: #0a0a0f;
    z-index: 2;
}

#bg:after {
    transform: scale(1.125);
    transition: transform 0.325s ease-in-out, filter 0.325s ease-in-out;
    background: #0a0a0f;
    z-index: 1;
}

body.is-blurred #bg:after {
    transform: scale(1.0825);
    filter: blur(0.2rem);
}

/* Password Gate */
.password-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.password-gate.hidden {
    display: none;
}

.password-modal {
    background: rgba(18, 19, 26, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Gate Robot Avatar */
.gate-robot {
    margin-bottom: 20px;
}

.gate-robot-svg {
    width: 80px;
    height: 80px;
    animation: robotFloat 3s ease-in-out infinite;
}

@keyframes robotFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.password-modal h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.password-modal p {
    color: #8b8b9e;
    margin-bottom: 24px;
    font-size: 14px;
}

.password-modal form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.password-modal input {
    background: #1a1b23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    text-align: center;
}

.password-modal input:focus {
    outline: none;
    border-color: #22c55e;
}

.password-modal button {
    background: #22c55e;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.password-modal button:hover {
    background: #16a34a;
}

.password-modal .error {
    color: #f87171;
    font-size: 13px;
    margin-top: 12px;
    margin-bottom: 0;
    min-height: 20px;
}

/* Mission Control - Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-base: #0a0a0f;
    --bg-elevated: #12131a;
    --bg-card: #1a1b23;
    --bg-card-hover: #22232d;
    --bg-input: #1a1b23;
    
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: #8b8b9e;
    --text-muted: #5c5c6d;
    
    --accent-green: #34d399;
    --accent-blue: #60a5fa;
    --accent-purple: #a78bfa;
    --accent-yellow: #fbbf24;
    --accent-orange: #fb923c;
    --accent-red: #f87171;
    --accent-cyan: #22d3ee;
    
    --btn-primary: #22c55e;
    --btn-primary-hover: #16a34a;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: transparent;
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App container with solid dark background */
.app {
    min-height: 100vh;
    background: #0a0a0f;
    position: relative;
}

.app::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.2), transparent);
    background-size: 200px 200px;
    pointer-events: none;
    opacity: 0.5;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.logo svg {
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ping-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.ping-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.ping-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s;
}

.ping-btn.pinged .ping-light {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse-green 2s ease-in-out;
}

.ping-btn.error .ping-light {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.user-name {
    color: var(--text-secondary);
    font-size: 13px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 32px;
    padding: 20px 24px;
    position: relative;
    z-index: 10;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.highlight {
    color: var(--accent-cyan);
}

.stat-value.accent {
    color: var(--accent-green);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px 20px;
    position: relative;
    z-index: 10;
}

.filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.filter-btn.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 28px 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%238b8b9e' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.sync-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.sync-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

.sync-btn.syncing {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Buttons */
.btn-primary {
    background: var(--btn-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
}

.btn-danger {
    background: transparent;
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
}

/* Board */
.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 24px 24px;
    position: relative;
    z-index: 10;
}

@media (max-width: 1024px) {
    .board {
        grid-template-columns: repeat(4, minmax(260px, 1fr));
        overflow-x: auto;
    }
}

/* Columns */
.column {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 12px;
}

.column-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.column-dot.yellow { background: var(--accent-yellow); }
.column-dot.blue { background: var(--accent-blue); }
.column-dot.purple { background: var(--accent-purple); }
.column-dot.green { background: var(--accent-green); }
.column-dot.orange { background: var(--accent-orange); }

.column-header h2 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.task-count {
    font-size: 12px;
    color: var(--text-muted);
}

.add-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.add-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-light);
}

/* Tasks Container */
.tasks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}

.tasks.drag-over {
    background: rgba(255, 255, 255, 0.02);
}

.empty-state {
    color: var(--text-muted);
    font-size: 13px;
    padding: 16px;
    text-align: center;
}

.tasks:has(.task-card) .empty-state {
    display: none;
}

/* Task Cards */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    cursor: grab;
    transition: all 0.15s;
}

.task-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.priority-dot.low { background: var(--accent-green); }
.priority-dot.medium { background: var(--accent-orange); }
.priority-dot.high { background: var(--accent-red); }

.task-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
}

.task-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.task-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.task-tag.green {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
}

.task-tag.blue {
    background: rgba(96, 165, 250, 0.15);
    color: var(--accent-blue);
}

.task-tag.purple {
    background: rgba(167, 139, 250, 0.15);
    color: var(--accent-purple);
}

.task-tag.orange {
    background: rgba(251, 146, 60, 0.15);
    color: var(--accent-orange);
}

.task-tag .tag-avatar {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.3;
}

.task-time {
    font-size: 12px;
    color: var(--text-muted);
}

.task-schedule {
    font-size: 11px;
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.15s;
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* Form */
#taskForm {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%238b8b9e' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-actions .spacer {
    flex: 1;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card-hover);
}

/* ========================================
   ABEL ROBOT AVATAR
   ======================================== */

.abel-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.abel-avatar:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

/* Subtle container color changes by state */
.abel-avatar.awake {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.1);
}

.abel-avatar.sleeping {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.1);
}

.abel-avatar.working {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.4);
    animation: avatarGlowPulse 2s ease-in-out infinite;
}

@keyframes avatarGlowPulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(34, 211, 238, 0.3), 
                    0 0 30px rgba(34, 211, 238, 0.15),
                    0 0 45px rgba(34, 211, 238, 0.05);
    }
    50% { 
        box-shadow: 0 0 25px rgba(34, 211, 238, 0.5), 
                    0 0 50px rgba(34, 211, 238, 0.25),
                    0 0 75px rgba(34, 211, 238, 0.1);
    }
}

.abel-avatar.syncing {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.1);
}

.abel-avatar.happy {
    background: rgba(244, 114, 182, 0.1);
    border-color: rgba(244, 114, 182, 0.3);
    box-shadow: 0 0 15px rgba(244, 114, 182, 0.15);
}

.abel-avatar.error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.1);
}

.robot-svg {
    width: 52px;
    height: 52px;
}

.abel-status {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Antenna animation - idle bobbing */
.antenna-ball {
    animation: antennaBob 2s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes antennaBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Eye blink animation */
.eyes {
    animation: blink 4s ease-in-out infinite;
}

@keyframes blink {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

/* Pupil look around */
.pupil {
    animation: lookAround 6s ease-in-out infinite;
}

@keyframes lookAround {
    0%, 40%, 60%, 100% { transform: translateX(0); }
    45%, 55% { transform: translateX(2px); }
}

/* Status light pulse */
.status-light {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Cheek pulse on hover */
.abel-avatar:hover .cheek {
    animation: cheekPulse 0.5s ease-in-out;
}

@keyframes cheekPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* ========================================
   ABEL STATES
   ======================================== */

/* AWAKE STATE (default) */
.abel-avatar.awake .status-light { fill: #22c55e; }
.abel-avatar.awake .antenna-ball { fill: #f472b6; }

/* SLEEPING STATE */
.abel-avatar.sleeping .eyes { display: none; }
.abel-avatar.sleeping .sleepy-eyes { display: block !important; }
.abel-avatar.sleeping .happy-mouth { 
    d: path("M 38 62 Q 50 58, 62 62"); /* Slight smile while sleeping */
}
.abel-avatar.sleeping .status-light { fill: #6366f1; }
.abel-avatar.sleeping .antenna-ball { 
    fill: #6366f1;
    animation: sleepyAntenna 3s ease-in-out infinite;
}
.abel-avatar.sleeping .robot-head {
    animation: sleepyBob 3s ease-in-out infinite;
}
.abel-avatar.sleeping .cheek {
    opacity: 0.6;
}

/* Z's floating up */
.abel-avatar.sleeping::after {
    content: 'z z z';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
    color: #6366f1;
    animation: floatZs 2s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes sleepyAntenna {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-1px) rotate(-5deg); }
    75% { transform: translateY(-1px) rotate(5deg); }
}

@keyframes sleepyBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(1px) rotate(2deg); }
}

@keyframes floatZs {
    0% { opacity: 0; transform: translateY(5px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* WORKING STATE */
.abel-avatar.working .eyes {
    animation: none;
}
.abel-avatar.working .pupil {
    animation: workingLook 0.5s ease-in-out infinite;
}
.abel-avatar.working .antenna-ball {
    fill: #fbbf24;
    animation: workingAntenna 0.3s ease-in-out infinite;
}
.abel-avatar.working .status-light {
    fill: #fbbf24;
    animation: workingPulse 0.5s ease-in-out infinite;
}
.abel-avatar.working .robot-head {
    animation: workingShake 0.1s ease-in-out infinite;
}
.abel-avatar.working .happy-mouth {
    d: path("M 38 58 L 62 58"); /* Focused straight mouth */
    stroke-width: 2;
}

/* Sweat drop */
.abel-avatar.working::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 25px;
    width: 4px;
    height: 6px;
    background: #60a5fa;
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    animation: sweatDrop 1s ease-in infinite;
}

@keyframes workingLook {
    0%, 100% { transform: translateX(-1px); }
    50% { transform: translateX(1px); }
}

@keyframes workingAntenna {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-1px) scale(1.1); }
}

@keyframes workingPulse {
    0%, 100% { opacity: 1; fill: #fbbf24; }
    50% { opacity: 0.7; fill: #f59e0b; }
}

@keyframes workingShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-0.5px); }
    75% { transform: translateX(0.5px); }
}

@keyframes sweatDrop {
    0% { opacity: 0; transform: translateY(-2px); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translateY(8px); }
}

/* SYNCING STATE */
.abel-avatar.syncing .robot-head {
    animation: syncPulse 0.8s ease-in-out infinite;
}
.abel-avatar.syncing .antenna-ball {
    fill: #22d3ee;
    animation: syncAntenna 0.4s linear infinite;
}
.abel-avatar.syncing .status-light {
    fill: #22d3ee;
    animation: syncLight 0.4s linear infinite;
}
.abel-avatar.syncing .pupil {
    animation: syncEyes 0.8s ease-in-out infinite;
}

@keyframes syncPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes syncAntenna {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes syncLight {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

@keyframes syncEyes {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(2px) translateY(-1px); }
    50% { transform: translateX(0) translateY(1px); }
    75% { transform: translateX(-2px) translateY(-1px); }
}

/* HAPPY STATE (task completed) */
.abel-avatar.happy .eyes {
    animation: happyBlink 0.3s ease-in-out;
}
.abel-avatar.happy .happy-mouth {
    d: path("M 32 58 Q 50 75, 68 58");
    stroke-width: 3;
}
.abel-avatar.happy .cheek {
    opacity: 0.8;
    animation: happyCheeks 0.5s ease-in-out infinite;
}
.abel-avatar.happy .antenna-ball {
    fill: #22c55e;
    animation: happyBounce 0.3s ease-in-out infinite;
}
.abel-avatar.happy .robot-head {
    animation: happyWiggle 0.3s ease-in-out infinite;
}

/* Sparkles */
.abel-avatar.happy::before,
.abel-avatar.happy::after {
    content: '✨';
    position: absolute;
    font-size: 12px;
    animation: sparkle 0.6s ease-in-out infinite;
}
.abel-avatar.happy::before {
    top: -2px;
    left: 5px;
    animation-delay: 0.1s;
}
.abel-avatar.happy::after {
    top: 0px;
    right: 0px;
    animation-delay: 0.3s;
}

@keyframes happyBlink {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

@keyframes happyCheeks {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes happyBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.2); }
}

@keyframes happyWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1); }
}

/* ERROR STATE */
.abel-avatar.error .status-light { fill: #ef4444; }
.abel-avatar.error .antenna-ball { 
    fill: #ef4444;
    animation: errorShake 0.1s ease-in-out infinite;
}
.abel-avatar.error .robot-head {
    animation: errorShake 0.1s ease-in-out infinite;
}
.abel-avatar.error .happy-mouth {
    d: path("M 35 65 Q 50 55, 65 65"); /* Sad frown */
}
.abel-avatar.error .pupil {
    fill: #ef4444;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Position for pseudo elements */
.abel-avatar {
    position: relative;
}

/* PINGED STATE (when Ping Abel is clicked) */
.abel-avatar.pinged {
    animation: pingBounce 0.5s ease-in-out;
}

.abel-avatar.pinged .robot-head {
    animation: pingWiggle 0.5s ease-in-out infinite;
}

.abel-avatar.pinged .eyes {
    animation: pingEyes 0.15s ease-in-out 3;
}

.abel-avatar.pinged .antenna-ball {
    fill: #22c55e;
    animation: pingAntenna 0.3s ease-in-out infinite;
}

.abel-avatar.pinged .cheek {
    opacity: 1;
    animation: pingCheeks 0.3s ease-in-out infinite;
}

.abel-avatar.pinged .status-light {
    fill: #22c55e;
    animation: pingLight 0.2s ease-in-out infinite;
}

.abel-avatar.pinged .happy-mouth {
    d: path("M 30 58 Q 50 78, 70 58");
    stroke-width: 4;
}

.abel-avatar.pinged .ear {
    animation: pingEars 0.2s ease-in-out infinite alternate;
}

/* Wave hand effect */
.abel-avatar.pinged::before {
    content: '👋';
    position: absolute;
    top: -10px;
    right: -15px;
    font-size: 20px;
    animation: waveHand 0.4s ease-in-out infinite;
}

/* Hearts floating */
.abel-avatar.pinged::after {
    content: '💚';
    position: absolute;
    top: -5px;
    left: 0px;
    font-size: 14px;
    animation: floatHeart 0.8s ease-in-out infinite;
}

@keyframes pingBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.15) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-3deg); }
}

@keyframes pingWiggle {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-8deg) translateY(-2px); }
    75% { transform: rotate(8deg) translateY(-2px); }
}

@keyframes pingEyes {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

@keyframes pingAntenna {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(180deg); }
}

@keyframes pingCheeks {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.3); }
}

@keyframes pingLight {
    0%, 100% { opacity: 1; r: 3; }
    50% { opacity: 1; r: 5; }
}

@keyframes pingEars {
    0% { transform: translateX(0); }
    100% { transform: translateX(2px); }
}

@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

@keyframes floatHeart {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 1; transform: translateY(-15px) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.5); }
}

/* Larger avatar container */
.abel-avatar {
    padding: 8px 14px 8px 10px;
}

.abel-status {
    font-size: 14px;
}

/* ========================================
   ENHANCED WORKING STATE - Sweaty Robot!
   ======================================== */

/* Override working state - HAPPY VIGOROUS WORKER! */
.abel-avatar.working {
    animation: happyBounce 0.4s ease-in-out infinite;
}

.abel-avatar.working .robot-head {
    animation: happyNod 0.3s ease-in-out infinite;
}

.abel-avatar.working .eyes {
    animation: focusedEyes 0.6s ease-in-out infinite;
}

.abel-avatar.working .pupil {
    animation: determinedLook 0.8s ease-in-out infinite;
    fill: #22d3ee !important; /* Keep friendly cyan */
}

/* Big happy smile while working! */
.abel-avatar.working .happy-mouth {
    d: path("M 32 58 Q 50 75, 68 58") !important;
    stroke-width: 3;
}

.abel-avatar.working .antenna {
    animation: enthusiasticAntenna 0.25s ease-in-out infinite;
}

.abel-avatar.working .antenna-ball {
    fill: #22d3ee !important; /* Happy cyan glow */
    animation: antennaPulse 0.5s ease-in-out infinite !important;
}

.abel-avatar.working .status-light {
    fill: #4ade80 !important; /* Green = productive! */
    animation: productivePulse 0.8s ease-in-out infinite !important;
}

/* Happy pink cheeks */
.abel-avatar.working .cheek {
    fill: #f472b6 !important;
    opacity: 0.6 !important;
    animation: happyCheeks 1s ease-in-out infinite;
}

.abel-avatar.working .ear {
    animation: earBop 0.4s ease-in-out infinite alternate;
}

/* Sparkles instead of sweat! */
.abel-avatar.working::before {
    content: '✨';
    position: absolute;
    top: -5px;
    right: 15px;
    font-size: 12px;
    animation: sparkle 0.8s ease-in-out infinite;
    z-index: 10;
}

.abel-avatar.working::after {
    content: '⚡';
    position: absolute;
    top: -2px;
    left: 8px;
    font-size: 10px;
    animation: sparkle 0.6s ease-in-out infinite 0.3s;
    z-index: 10;
}

/* Happy productive glow */
.abel-avatar.working .robot-head {
    box-shadow: 
        0 0 15px rgba(34, 211, 238, 0.3),
        0 0 30px rgba(74, 222, 128, 0.15);
}

@keyframes happyBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(0deg); }
}

@keyframes happyNod {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-1px) rotate(-2deg); }
    75% { transform: translateY(-1px) rotate(2deg); }
}

@keyframes focusedEyes {
    0%, 100% { transform: scaleY(1) scaleX(1); }
    50% { transform: scaleY(1.1) scaleX(1); }
}

@keyframes determinedLook {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(1px); }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.5; transform: scale(1.3) rotate(180deg); }
}

@keyframes enthusiasticAntenna {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes antennaPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes productivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes happyCheeks {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes earBop {
    0% { transform: translateY(0); }
    100% { transform: translateY(-1px); }
}

@keyframes antennaWiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes antennaPanic {
    0%, 100% { transform: scale(1) translateY(0); }
    25% { transform: scale(1.2) translateY(-2px); }
    50% { transform: scale(0.9) translateY(1px); }
    75% { transform: scale(1.15) translateY(-1px); }
}

@keyframes statusFlash {
    0%, 100% { opacity: 1; fill: #fbbf24; }
    50% { opacity: 0.3; fill: #ef4444; }
}

@keyframes hotCheeks {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes earWiggle {
    0% { transform: translateY(0) rotate(-5deg); }
    100% { transform: translateY(-2px) rotate(5deg); }
}

@keyframes sweatFly {
    0% { 
        opacity: 0; 
        transform: translate(0, 0) scale(0.5); 
    }
    30% { 
        opacity: 1; 
        transform: translate(-5px, 5px) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translate(-15px, 20px) scale(0.3); 
    }
}

/* Extra: exclamation marks floating */
.abel-avatar.working .robot-svg::after {
    content: '!';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #ef4444;
    animation: exclaim 0.4s ease-in-out infinite;
}

@keyframes exclaim {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 1; transform: translateY(-5px) scale(1); }
}

/* ========================================
   ABEL ACTIVITY WIDGET (Compact - Header Right)
   ======================================== */

.activity-widget-compact {
    display: flex;
    align-items: center;
    max-width: 280px;
    min-width: 200px;
}

/* Glow Status Line */
.glow-status {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 10px 16px;
    border-left: 3px solid #00d9ff;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: glowPulse 2s ease-in-out infinite;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    min-width: 180px;
    max-width: 250px;
}

.glow-status.scanning { border-color: #a78bfa; box-shadow: 0 0 15px rgba(167, 139, 250, 0.2); }
.glow-status.writing { border-color: #fbbf24; box-shadow: 0 0 15px rgba(251, 191, 36, 0.2); }
.glow-status.building { border-color: #f472b6; box-shadow: 0 0 15px rgba(244, 114, 182, 0.2); }
.glow-status.done { border-color: #4ade80; box-shadow: 0 0 15px rgba(74, 222, 128, 0.2); }
.glow-status.idle { border-color: #00d9ff; box-shadow: 0 0 10px rgba(0, 217, 255, 0.15); }

@keyframes glowPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.glow-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.glow-text {
    color: #fff;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Activity Scroll (compact vertical list) */
.activity-scroll {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 10px;
    min-width: 200px;
    max-height: 80px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-scroll::-webkit-scrollbar {
    width: 4px;
}

.activity-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 2px;
}

.activity-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.3);
    border-radius: 2px;
}

.activity-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.5);
}

.activity-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    font-size: 0.68rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    flex-shrink: 0;
    cursor: pointer;
}

.activity-entry:hover {
    background: rgba(255, 255, 255, 0.08);
}

.activity-entry[data-type="done"] { border-left-color: #4ade80; }
.activity-entry[data-type="scan"] { border-left-color: #a78bfa; }
.activity-entry[data-type="write"] { border-left-color: #fbbf24; }
.activity-entry[data-type="build"] { border-left-color: #f472b6; }

.activity-entry[data-type="done"] .activity-text { color: #4ade80; }
.activity-entry[data-type="scan"] .activity-text { color: #a78bfa; }
.activity-entry[data-type="write"] .activity-text { color: #fbbf24; }
.activity-entry[data-type="build"] .activity-text { color: #f472b6; }

/* Active/Working Entry - Glowing */
.activity-entry.active-entry {
    background: rgba(34, 211, 238, 0.15);
    border-left-color: #22d3ee;
    animation: activeEntryGlow 1.5s ease-in-out infinite;
}

.activity-entry.active-entry .activity-text {
    color: #22d3ee;
    font-weight: 600;
}

.activity-entry.active-entry .activity-time {
    color: #22d3ee;
    font-weight: 600;
}

@keyframes activeEntryGlow {
    0%, 100% {
        background: rgba(34, 211, 238, 0.1);
        box-shadow: 0 0 8px rgba(34, 211, 238, 0.2);
    }
    50% {
        background: rgba(34, 211, 238, 0.2);
        box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
    }
}

.activity-icon {
    flex-shrink: 0;
    font-size: 0.8rem;
}

.activity-text {
    color: #ccc;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    color: #555;
    font-size: 0.6rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========================================
   ACTIVITY DETAIL POPUP
   ======================================== */

.activity-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
}

.activity-popup.show {
    display: flex;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.activity-popup-content {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    min-width: 320px;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.2s ease;
}

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

.activity-popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.activity-popup-icon {
    font-size: 1.4rem;
}

.activity-popup-type {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-popup-type.done { color: #4ade80; }
.activity-popup-type.scan { color: #a78bfa; }
.activity-popup-type.write { color: #fbbf24; }
.activity-popup-type.build { color: #f472b6; }

.activity-popup-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.activity-popup-close:hover {
    color: var(--text-primary);
}

.activity-popup-body {
    padding: 16px;
}

.activity-popup-text {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.activity-popup-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 14px 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 2px solid var(--accent-cyan);
}

.activity-popup-meta {
    display: flex;
    justify-content: flex-end;
}

.activity-popup-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========================================
   NAVIGATION BAR
   ======================================== */

.main-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.main-nav a.active {
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
    border-color: rgba(34, 211, 238, 0.4);
}

.main-nav .nav-icon {
    font-size: 1rem;
}

/* Page-specific nav positioning for full-screen pages */
.nav-floating {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.nav-floating a {
    padding: 8px 14px;
    font-size: 0.8rem;
}

/* ========================================
   STATUS PAGE
   ======================================== */

.status-page {
    min-height: 100vh;
    background: rgba(10, 10, 15, 0.85);
    padding: 80px 24px 24px;
}

.status-container {
    max-width: 800px;
    margin: 0 auto;
}

.status-header {
    text-align: center;
    margin-bottom: 30px;
}

.status-header h1 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.status-header .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.status-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 20px;
}

.status-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.status-card-title {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

.avatar-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.avatar-large .robot-svg {
    width: 100px;
    height: 100px;
}

.avatar-info {
    text-align: left;
}

.avatar-status-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.avatar-task-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   MEMORY GRAPH PAGE
   ======================================== */

.memory-page {
    min-height: 100vh;
    background: var(--bg-base);
    overflow: hidden;
}

#graph {
    width: 100vw;
    height: 100vh;
}

.graph-tooltip {
    position: fixed;
    background: rgba(18, 19, 26, 0.95);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.85rem;
    max-width: 300px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 200;
    backdrop-filter: blur(8px);
}

.graph-tooltip.visible {
    opacity: 1;
}

.graph-tooltip-title {
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.graph-tooltip-content {
    color: var(--text-secondary);
    line-height: 1.5;
}

.graph-legend {
    position: fixed;
    top: 90px;
    right: 20px;
    background: rgba(18, 19, 26, 0.9);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.75rem;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.legend-item:last-child {
    margin-bottom: 0;
}

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

.legend-dot.person { background: var(--accent-green); }
.legend-dot.work { background: var(--accent-yellow); }
.legend-dot.tool { background: var(--accent-purple); }
.legend-dot.topic { background: var(--accent-cyan); }
.legend-dot.date { background: #f472b6; }
.legend-dot.place { background: var(--accent-orange); }

.graph-info {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(18, 19, 26, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 100;
}

.graph-info kbd {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 7px;
    border-radius: 4px;
    margin: 0 3px;
    font-family: inherit;
}

/* ========================================
   DOCS PAGE
   ======================================== */

.docs-page {
    min-height: 100vh;
    background: rgba(10, 10, 15, 0.85);
    padding: 80px 24px 24px;
}

.docs-container {
    max-width: 800px;
    margin: 0 auto;
}

.coming-soon {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

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

/* Welcome Banner */
.welcome-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin: 20px 24px;
    box-shadow: 0 4px 30px rgba(34, 211, 238, 0.15);
    border: 1px solid var(--border);
}

.welcome-banner img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.welcome-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent 0%, rgba(10,10,15,0.95) 80%);
    padding: 60px 20px 18px;
    text-align: center;
}

.welcome-text {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-shadow: 0 0 15px rgba(34, 211, 238, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Nav Avatar Widget */
.nav-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-avatar .abel-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 2px;
}

.nav-avatar-status {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 500;
}

.nav-avatar .abel-avatar.working {
    background: rgba(34, 211, 238, 0.2);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.nav-avatar .abel-avatar.syncing {
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.nav-avatar .abel-avatar.happy,
.nav-avatar .abel-avatar.done {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.nav-avatar .abel-avatar.error {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.nav-avatar .abel-avatar.sleeping {
    opacity: 0.5;
}

/* Brain Browser */
.brain-browser {
    background: var(--bg-card, rgba(26, 27, 35, 0.9));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
}

.brain-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.brain-nav-label {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brain-topic {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-secondary, #cbd5e1);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.brain-topic:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.brain-topic.active {
    background: rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.4);
    color: #22d3ee;
}

.brain-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 600px;
}

.brain-list {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    max-height: 700px;
}

.brain-list-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

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

.brain-list-item.active {
    background: rgba(34, 211, 238, 0.1);
    border-left: 3px solid #22d3ee;
}

.brain-list-item-title {
    font-size: 0.9rem;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 4px;
}

.brain-list-item-topic {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
}

.brain-loading {
    padding: 20px;
    color: var(--text-muted);
    text-align: center;
}

.brain-viewer {
    padding: 24px 32px;
    overflow-y: auto;
    max-height: 700px;
}

.brain-viewer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
}

.brain-viewer-placeholder span {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.brain-viewer h1, .brain-viewer h2, .brain-viewer h3 {
    color: var(--text-primary, #f1f5f9);
    margin: 1em 0 0.5em;
}

.brain-viewer h1 { font-size: 1.5rem; }
.brain-viewer h2 { font-size: 1.2rem; color: #22d3ee; }
.brain-viewer h3 { font-size: 1rem; }

.brain-viewer p {
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.6;
    margin: 0.5em 0;
}

.brain-viewer ul, .brain-viewer ol {
    color: var(--text-secondary);
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.brain-viewer li {
    margin: 0.3em 0;
}

.brain-viewer code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', monospace;
    font-size: 0.85em;
    color: #f472b6;
}

.brain-viewer pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1em 0;
}

.brain-viewer pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

.brain-viewer blockquote {
    border-left: 3px solid #22d3ee;
    padding-left: 16px;
    margin: 1em 0;
    color: var(--text-muted);
    font-style: italic;
}

.brain-viewer a {
    color: #22d3ee;
    text-decoration: none;
}

.brain-viewer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .brain-content {
        grid-template-columns: 1fr;
    }
    .brain-list {
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
}
