/* ZenAxon Theme Color Palette - Nebula Lavender */
:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(30, 37, 56, 0.65);
    --bg-card-solid: #1e2538;
    --primary: #8b5cf6; /* Vibrant Lavender */
    --primary-glow: rgba(139, 92, 246, 0.4);
    --primary-dark: #6d28d9;
    --secondary: #a78bfa;
    --accent: #fda4af; /* Soft Coral Pink */
    --accent-glow: rgba(253, 164, 175, 0.3);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    --border-color: rgba(255, 255, 255, 0.08);
    --success: #34d399;
    --danger: #f87171;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-display: 'Outfit', sans-serif;
}

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

body {
    background: radial-gradient(circle at 50% 0%, #1e1b4b 0%, var(--bg-dark) 70%);
    color: var(--text-main);
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Layout Wrapper */
.app-dashboard {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    width: 100vw;
    height: 100vh;
    padding: 16px;
    gap: 16px;
}

/* Sidebar Styling Common */
.tracker-panel, .console-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Smartphone Simulator */
.simulator-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-frame {
    width: 375px;
    height: 760px;
    background: #000;
    border: 12px solid #1e293b;
    border-radius: 48px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 
                0 0 0 4px rgba(255, 255, 255, 0.05),
                0 0 40px var(--primary-glow);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 30px;
    background: #000;
    border-radius: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 10px;
    justify-content: flex-end;
}
.camera {
    width: 8px;
    height: 8px;
    background: #111;
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(255,255,255,0.4);
}
.island-pill {
    color: var(--secondary);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: var(--font-display);
    margin-right: auto;
    margin-left: 10px;
}

/* Phone Status Bar */
.status-bar {
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 24px 6px 24px;
    background: transparent;
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 999;
}
.status-bar .icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Phone Content Screen */
.phone-content {
    flex-grow: 1;
    padding: 12px 20px;
    overflow-y: auto;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
}
.phone-content::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

/* Navigation bar */
.app-nav {
    height: 64px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 8px;
    z-index: 999;
}
.nav-item {
    background: none;
    border: none;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    width: 60px;
}
.nav-item i {
    font-size: 1.1rem;
}
.nav-item.active {
    color: var(--primary);
}
.nav-item:hover {
    color: var(--secondary);
}

.home-indicator {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    z-index: 1000;
}

/* Right Panel: Console Logs & EEG Graph */
.console-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.console-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}
.status-indicator {
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    background: currentColor;
}
.status-indicator.online {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}
.status-indicator.offline {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

.eeg-wave-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.eeg-wave-container canvas {
    width: 100%;
    height: 80px;
    display: block;
}
.eeg-metrics {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.console-logs {
    background: #05070c;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    flex-grow: 1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 230px);
}
.log-entry.system { color: #818cf8; }
.log-entry.ble { color: #38bdf8; }
.log-entry.algo { color: #c084fc; }
.log-entry.user { color: #a7f3d0; }
.log-entry.error { color: #fca5a5; }

/* General Button Styles */
.btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}
.btn-reset {
    margin-top: 12px;
    padding: 8px;
    font-size: 0.75rem;
}
