/* =========================================================
   F.R.I.D.A.Y. - HACKER CYBER MATRIX TERMINAL STYLESHEET
   Dedicated to Boshliq Abdulloxon
   Theme: Deep Hacker Black & Neon Matrix Green (#00ff41 / #00ff66)
   100% Fully Responsive & Auto-size (Mobile, Tablet, Desktop)
   ========================================================= */

:root {
    --bg-dark: #000000;
    --bg-terminal: #020803;
    --bg-panel: rgba(3, 15, 6, 0.90);
    --bg-panel-solid: #041407;
    --bg-card: rgba(0, 25, 8, 0.85);
    
    /* Neon Matrix Greens */
    --neon-green: #00ff41;
    --neon-bright: #39ff14;
    --green-glow: #00ff66;
    --green-dim: rgba(0, 255, 65, 0.22);
    --green-dark: #02260b;
    --green-accent: #15ff50;
    
    /* System Alerts & Badges */
    --gold-boss: #39ff14;
    --vip-guest: #00ffcc;
    --red-alert: #ff1e42;
    --red-dim: rgba(255, 30, 66, 0.25);
    
    /* Typography Colors */
    --text-main: #d4ffd9;
    --text-bright: #ffffff;
    --text-dim: #4d9959;
    --text-matrix: #00ff41;
    
    /* Borders & Glows */
    --border-hud: rgba(0, 255, 65, 0.38);
    --border-glow: 0 0 15px rgba(0, 255, 65, 0.3);
    --border-strong: #00ff41;
    
    /* Fonts */
    --font-hud: 'Share Tech Mono', 'Orbitron', monospace;
    --font-ui: 'Share Tech Mono', 'Rajdhani', monospace, sans-serif;
    --font-mono: 'Share Tech Mono', 'Consolas', monospace;
}

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

html, body {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

body.theme-hud {
    background: radial-gradient(circle at 50% 30%, #041a08 0%, #000000 85%);
}

/* Background HUD Overlays & Grid */
.hud-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.7;
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 255, 65, 0.03) 3px,
        rgba(0, 0, 0, 0.35) 4px
    );
    opacity: 0.85;
}

/* HUD Circles in background */
.hud-circle {
    position: absolute;
    border: 1px dashed rgba(0, 255, 65, 0.18);
    border-radius: 50%;
    pointer-events: none;
}

.hud-circle-1 {
    width: 650px;
    height: 650px;
    top: -200px;
    right: -200px;
    animation: rotateSlow 60s linear infinite;
}

.hud-circle-2 {
    width: 480px;
    height: 480px;
    bottom: -150px;
    left: -150px;
    animation: rotateRevSlow 45s linear infinite;
}

/* HUD Corner Brackets */
.hud-corner {
    position: absolute;
    width: 25px;
    height: 25px;
    border-color: var(--neon-green);
    border-style: solid;
    pointer-events: none;
    opacity: 0.75;
}

.hud-corner.top-left { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.hud-corner.top-right { top: 10px; right: 10px; border-width: 2px 2px 0 0; }
.hud-corner.bottom-left { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; }
.hud-corner.bottom-right { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }

/* Main Container Layout - Auto-Size */
.main-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding: 10px 16px;
    max-width: 1700px;
    margin: 0 auto;
    width: 100%;
}

/* Header HUD */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border-hud);
    backdrop-filter: blur(10px);
    box-shadow: var(--border-glow);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.system-brand {
    display: flex;
    flex-direction: column;
}

.brand-glitch {
    font-family: var(--font-hud);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8), 0 0 20px rgba(0, 255, 65, 0.4);
}

.system-sub {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1.2px;
    color: var(--text-dim);
}

.hud-stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.stat-value {
    font-family: var(--font-hud);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--neon-bright);
}

.stat-value.active-glow {
    color: var(--neon-bright);
    text-shadow: 0 0 8px var(--neon-bright);
}

.stat-value.boss-glow {
    color: var(--neon-bright);
    text-shadow: 0 0 12px #39ff14, 0 0 20px rgba(57, 255, 20, 0.6);
    font-weight: 900;
}

.hud-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hud-btn {
    background: rgba(0, 255, 65, 0.08);
    border: 1px solid var(--border-hud);
    color: var(--neon-green);
    font-family: var(--font-hud);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.hud-btn:hover {
    background: rgba(0, 255, 65, 0.25);
    border-color: var(--neon-bright);
    box-shadow: 0 0 12px var(--neon-green);
    color: #ffffff;
    transform: translateY(-1px);
}

.hud-btn-primary {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--neon-bright);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.hud-btn-danger {
    border-color: rgba(255, 30, 66, 0.5);
    color: #ff5e78;
}

.hud-btn-danger:hover {
    background: rgba(255, 30, 66, 0.25);
    border-color: var(--red-alert);
    box-shadow: 0 0 12px var(--red-alert);
    color: #fff;
}

.hud-btn-sm {
    padding: 5px 10px;
    font-size: 0.68rem;
    background: rgba(0, 255, 65, 0.08);
    border: 1px solid var(--border-hud);
    color: var(--neon-green);
    border-radius: 4px;
    cursor: pointer;
}

.hud-btn-sm:hover {
    background: rgba(0, 255, 65, 0.2);
    color: #fff;
}

/* Mobile Nav Tabs (Visible on small screens) */
.mobile-nav-tabs {
    display: none;
    width: 100%;
    margin-bottom: 8px;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.mobile-nav-btn {
    background: rgba(0, 255, 65, 0.07);
    border: 1px solid var(--border-hud);
    color: var(--text-dim);
    font-family: var(--font-hud);
    font-size: 0.68rem;
    padding: 8px 4px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.mobile-nav-btn.active {
    background: rgba(0, 255, 65, 0.25);
    border-color: var(--neon-bright);
    color: #fff;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

/* Main Grid Layout */
.hud-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0; /* Enables proper flex scrolling */
}

/* HUD Panels */
.hud-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-hud);
    backdrop-filter: blur(12px);
    box-shadow: var(--border-glow);
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(0, 255, 65, 0.08);
    border-bottom: 1px solid var(--border-hud);
    font-family: var(--font-hud);
    font-size: 0.72rem;
    letter-spacing: 1.2px;
    color: var(--neon-green);
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-bright);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-bright);
    animation: pulse 1.5s infinite;
}

/* Left Panel: Arc Reactor & Monitoring */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 12px;
    overflow-y: auto;
}

.core-visualizer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px 10px;
    position: relative;
}

.arc-reactor {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.15) 0%, rgba(0, 10, 3, 0.85) 70%);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.3);
}

.core-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed var(--neon-green);
}

.core-ring-outer {
    width: 120px;
    height: 120px;
    border-width: 2px;
    animation: rotateSlow 15s linear infinite;
    opacity: 0.8;
}

.core-ring-middle {
    width: 90px;
    height: 90px;
    border: 2px dotted var(--neon-bright);
    animation: rotateRevSlow 10s linear infinite;
}

.core-ring-inner {
    width: 65px;
    height: 65px;
    border: 2px solid var(--green-glow);
    animation: rotateSlow 8s linear infinite;
}

.core-glow-pulse {
    position: absolute;
    width: 42px;
    height: 42px;
    background: radial-gradient(circle, var(--neon-bright) 0%, rgba(0, 255, 65, 0) 70%);
    border-radius: 50%;
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

.core-text {
    position: relative;
    z-index: 2;
    text-align: center;
    font-family: var(--font-hud);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 0 10px var(--neon-green);
}

.core-text span {
    font-size: 0.55rem;
    color: var(--neon-bright);
}

/* Audio Waves */
.voice-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 25px;
    margin-top: 10px;
}

.voice-waves span {
    display: inline-block;
    width: 3px;
    height: 5px;
    background: var(--neon-green);
    border-radius: 2px;
    transition: height 0.15s ease;
}

.voice-waves.speaking span {
    animation: waveAnim 0.8s ease-in-out infinite alternate;
}

.voice-waves span:nth-child(2) { animation-delay: 0.1s; }
.voice-waves span:nth-child(3) { animation-delay: 0.2s; }
.voice-waves span:nth-child(4) { animation-delay: 0.3s; }
.voice-waves span:nth-child(5) { animation-delay: 0.4s; }
.voice-waves span:nth-child(6) { animation-delay: 0.5s; }
.voice-waves span:nth-child(7) { animation-delay: 0.4s; }
.voice-waves span:nth-child(8) { animation-delay: 0.3s; }
.voice-waves span:nth-child(9) { animation-delay: 0.2s; }
.voice-waves span:nth-child(10) { animation-delay: 0.1s; }

/* Gmail Accounts Section */
.gmail-accounts-section {
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.monitor-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    padding-bottom: 4px;
}

.monitor-title {
    font-family: var(--font-hud);
    font-size: 0.68rem;
    letter-spacing: 1px;
    color: var(--neon-green);
}

.icon-btn-tiny {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.8;
}

.icon-btn-tiny:hover { opacity: 1; transform: rotate(180deg); transition: transform 0.3s; }

.account-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
}

.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
}

.account-item .acc-email {
    font-family: var(--font-mono);
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 170px;
}

.account-item .acc-badge {
    background: var(--neon-green);
    color: #000;
    font-weight: bold;
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.account-item .btn-remove-acc {
    background: none;
    border: none;
    color: var(--red-alert);
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 6px;
}

.empty-hint {
    color: var(--text-dim);
    font-size: 0.72rem;
    font-style: italic;
    text-align: center;
    padding: 8px 0;
}

.btn-add-gmail {
    background: rgba(0, 255, 65, 0.12);
    border: 1px dashed var(--neon-green);
    color: var(--neon-bright);
    font-family: var(--font-hud);
    font-size: 0.72rem;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
}

.btn-add-gmail:hover {
    background: rgba(0, 255, 65, 0.25);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

/* System Quick Commands */
.system-monitor {
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-commands {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-chip {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0, 255, 65, 0.2);
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    padding: 6px 10px;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-chip:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--neon-bright);
    color: #fff;
    transform: translateX(3px);
}

/* Main Content: Chat Panel & Tabs */
.chat-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chat-tabs {
    display: flex;
    background: rgba(0, 255, 65, 0.06);
    border-bottom: 1px solid var(--border-hud);
}

.chat-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-hud);
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.chat-tab-btn:hover {
    color: var(--text-main);
    background: rgba(0, 255, 65, 0.08);
}

.chat-tab-btn.active {
    color: var(--neon-bright);
    background: rgba(0, 255, 65, 0.15);
    border-bottom: 2px solid var(--neon-bright);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

.tab-badge {
    background: var(--red-alert);
    color: #fff;
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.message-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.86rem;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
    animation: fadeIn 0.25s ease;
}

.message-bubble.friday {
    align-self: flex-start;
    background: rgba(0, 20, 6, 0.85);
    border: 1px solid var(--border-hud);
    border-left: 3px solid var(--neon-bright);
    color: var(--text-main);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.15);
}

.message-bubble.user {
    align-self: flex-end;
    background: rgba(0, 45, 12, 0.9);
    border: 1px solid rgba(0, 255, 65, 0.4);
    border-right: 3px solid var(--neon-green);
    color: #ffffff;
}

.message-bubble.system-alert {
    align-self: center;
    background: rgba(35, 5, 10, 0.9);
    border: 1px solid var(--red-alert);
    color: #ff99aa;
    text-align: center;
    font-size: 0.8rem;
    max-width: 90%;
}

.message-bubble.boss-command {
    border-left: 3px solid #39ff14;
    background: rgba(0, 30, 8, 0.95);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
}

.msg-prefix {
    font-family: var(--font-hud);
    font-size: 0.68rem;
    color: var(--neon-green);
    margin-bottom: 4px;
    display: block;
    letter-spacing: 1px;
}

.message-bubble.user .msg-prefix {
    color: #7df9ff;
    text-align: right;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-green);
}

.typing-indicator .dots {
    display: flex;
    gap: 4px;
}

.typing-indicator .dots span {
    width: 5px;
    height: 5px;
    background: var(--neon-bright);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-indicator .dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dots span:nth-child(3) { animation-delay: 0.4s; }

/* Chat Input Wrapper - Hacker Console Style */
.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(0, 15, 5, 0.95);
    border-top: 1px solid var(--border-hud);
}

.terminal-prompt-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--neon-green);
    font-weight: bold;
    white-space: nowrap;
}

.chat-input {
    flex: 1;
    background: rgba(0, 20, 7, 0.9);
    border: 1px solid var(--border-hud);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 10px 12px;
    border-radius: 4px;
    resize: none;
    outline: none;
    transition: all 0.2s;
    min-height: 42px;
    max-height: 100px;
}

.chat-input:focus {
    border-color: var(--neon-bright);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
    background: rgba(0, 30, 10, 0.95);
}

.chat-input::placeholder {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.mic-btn, .send-btn {
    background: rgba(0, 255, 65, 0.15);
    border: 1px solid var(--border-hud);
    color: var(--neon-green);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-btn {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
}

.mic-btn:hover {
    background: rgba(0, 255, 65, 0.3);
    color: #fff;
}

.mic-btn.listening {
    background: rgba(255, 30, 66, 0.3);
    border-color: var(--red-alert);
    animation: pulse 1s infinite;
}

.send-btn {
    padding: 0 16px;
    height: 42px;
    font-family: var(--font-hud);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    gap: 6px;
}

.send-btn:hover {
    background: rgba(0, 255, 65, 0.35);
    color: #fff;
    box-shadow: 0 0 12px var(--neon-green);
}

.send-icon {
    width: 16px;
    height: 16px;
}

/* =========================================================
   INBOX CONTENT & EMAIL HUB
   ========================================================= */
.inbox-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.inbox-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 255, 65, 0.05);
    border-bottom: 1px solid var(--border-hud);
}

.inbox-filters {
    display: flex;
    gap: 6px;
}

.filter-btn {
    background: none;
    border: 1px solid rgba(0, 255, 65, 0.2);
    color: var(--text-dim);
    font-family: var(--font-hud);
    font-size: 0.68rem;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
}

.filter-btn.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--neon-bright);
    color: #fff;
}

.inbox-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inbox-card {
    background: rgba(0, 20, 6, 0.7);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.inbox-card:hover {
    background: rgba(0, 35, 10, 0.85);
    border-color: var(--neon-bright);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.25);
}

.inbox-card.unread {
    border-left: 3px solid var(--neon-bright);
    background: rgba(0, 30, 8, 0.9);
}

.inbox-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.75rem;
}

.inbox-card-sender {
    color: var(--neon-bright);
    font-weight: bold;
}

.inbox-card-date {
    color: var(--text-dim);
    font-size: 0.68rem;
}

.inbox-card-subject {
    font-size: 0.82rem;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 600;
}

.inbox-card-snippet {
    font-size: 0.74rem;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   PHONE & GPS SURVEILLANCE TERMINAL (TELEFON KUZATUVI)
   ========================================================= */
.phone-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    gap: 12px;
}

.surveillance-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 255, 65, 0.08);
    border: 1px solid var(--border-hud);
    padding: 10px 14px;
    border-radius: 4px;
    flex-wrap: wrap;
    gap: 10px;
}

.surveillance-title {
    font-family: var(--font-hud);
    font-size: 0.85rem;
    color: var(--neon-bright);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.surveillance-radar-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--neon-bright);
    border-radius: 50%;
    animation: pulse 1.2s infinite;
}

.phone-add-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.phone-input {
    background: rgba(0, 20, 7, 0.9);
    border: 1px solid var(--border-hud);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: 4px;
    min-width: 200px;
}

.phone-input:focus {
    border-color: var(--neon-bright);
    outline: none;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.surveillance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.target-card {
    background: rgba(2, 18, 6, 0.9);
    border: 1px solid var(--border-hud);
    border-radius: 6px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.15);
    position: relative;
    overflow: hidden;
}

.target-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--neon-bright);
}

.target-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.target-name {
    font-family: var(--font-hud);
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 700;
}

.target-status-badge {
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid var(--neon-bright);
    color: var(--neon-bright);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-family: var(--font-hud);
}

.target-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(0, 10, 3, 0.7);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 65, 0.15);
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.68rem;
}

.metric-label {
    color: var(--text-dim);
    margin-bottom: 2px;
}

.metric-val {
    color: var(--neon-green);
    font-weight: bold;
}

.target-location-box {
    background: rgba(0, 25, 8, 0.8);
    border: 1px solid rgba(0, 255, 65, 0.25);
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.74rem;
}

.target-location-title {
    color: var(--neon-bright);
    font-size: 0.68rem;
    margin-bottom: 2px;
    font-weight: bold;
}

.target-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.target-action-btn {
    flex: 1;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--border-hud);
    color: var(--text-main);
    font-family: var(--font-hud);
    font-size: 0.68rem;
    padding: 6px 8px;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    min-width: 80px;
}

.target-action-btn:hover {
    background: rgba(0, 255, 65, 0.25);
    color: #fff;
    border-color: var(--neon-bright);
}

/* Footer HUD */
.hud-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-panel);
    border: 1px solid var(--border-hud);
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-ok { color: var(--neon-bright); font-weight: bold; }
.status-warning { color: #ffbe0b; }
.status-error { color: var(--red-alert); }

/* =========================================================
   MODALS (HACKER TERMINAL DIALOGS)
   ========================================================= */
.hud-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 15px;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: var(--bg-panel-solid);
    border: 2px solid var(--neon-green);
    border-radius: 6px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(0, 255, 65, 0.12);
    border-bottom: 1px solid var(--border-hud);
    font-family: var(--font-hud);
    font-size: 0.85rem;
    color: var(--neon-bright);
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-close:hover { color: #fff; }

.modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(0, 10, 3, 0.6);
    border-top: 1px solid var(--border-hud);
}

.hud-input {
    width: 100%;
    background: rgba(0, 20, 7, 0.9);
    border: 1px solid var(--border-hud);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 9px 12px;
    border-radius: 4px;
    outline: none;
    transition: all 0.2s;
}

.hud-input:focus {
    border-color: var(--neon-bright);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-label {
    font-family: var(--font-hud);
    font-size: 0.68rem;
    color: var(--neon-green);
    letter-spacing: 0.8px;
}

.key-help {
    background: rgba(0, 255, 65, 0.05);
    border-left: 3px solid var(--neon-bright);
    padding: 8px 12px;
    font-size: 0.74rem;
    color: var(--text-main);
    border-radius: 0 4px 4px 0;
}

.key-help a {
    color: var(--neon-bright);
    text-decoration: underline;
}

/* Settings & Add Account Tabs */
.settings-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border-hud);
    padding-bottom: 8px;
}

.tab-btn {
    background: none;
    border: 1px solid rgba(0, 255, 65, 0.2);
    color: var(--text-dim);
    font-family: var(--font-hud);
    font-size: 0.72rem;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.tab-btn.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--neon-bright);
    color: #fff;
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    background: rgba(3, 20, 8, 0.95);
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    border-radius: 4px;
    padding: 10px 14px;
    animation: toastSlideIn 0.3s ease;
    position: relative;
}

.toast.error {
    border-color: var(--red-alert);
    box-shadow: 0 0 15px rgba(255, 30, 66, 0.4);
}

.toast-title {
    font-family: var(--font-hud);
    font-size: 0.8rem;
    color: var(--neon-bright);
    margin-bottom: 4px;
}

.toast.error .toast-title {
    color: var(--red-alert);
}

.toast-body {
    font-size: 0.76rem;
    color: var(--text-main);
}

/* Animations */
@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes pulseGlow {
    from { transform: scale(0.85); opacity: 0.6; }
    to { transform: scale(1.15); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

@keyframes waveAnim {
    0% { height: 4px; }
    100% { height: 26px; }
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* =========================================================
   RESPONSIVE AUTO-SIZE (PC, TABLET, MOBILE SMARTPHONES)
   ========================================================= */
@media (max-width: 900px) {
    .main-container {
        padding: 6px 8px;
    }
    
    .hud-header {
        padding: 8px 10px;
        margin-bottom: 6px;
    }

    .brand-glitch {
        font-size: 1.3rem;
    }

    .system-sub {
        display: none;
    }

    .hud-stats {
        gap: 10px;
    }

    .stat-label {
        font-size: 0.55rem;
    }

    .stat-value {
        font-size: 0.75rem;
    }

    .hud-controls .btn-text {
        display: none;
    }

    .hud-controls .hud-btn {
        padding: 6px 8px;
    }

    /* Show Mobile Tabs Bar */
    .mobile-nav-tabs {
        display: grid;
    }

    .hud-grid {
        grid-template-columns: 1fr;
    }

    /* Panels switchable via Mobile Tabs */
    .left-panel {
        display: none; /* Controlled dynamically via activeMobileTab */
    }

    .left-panel.mobile-active {
        display: flex !important;
        max-height: calc(100dvh - 170px);
    }

    .chat-panel {
        display: flex;
    }

    .chat-panel.mobile-hidden {
        display: none !important;
    }

    .chat-tabs .chat-tab-btn {
        font-size: 0.65rem;
        padding: 8px 4px;
    }

    .chat-input-wrapper {
        padding: 8px;
    }

    .terminal-prompt-tag {
        display: none;
    }

    .chat-input {
        font-size: 0.8rem;
        padding: 8px;
    }

    .send-btn span {
        display: none;
    }

    .send-btn {
        padding: 0 12px;
    }

    .hud-footer {
        display: none; /* Hide on small mobile to maximize workspace */
    }

    .toast-container {
        max-width: 92%;
        left: 4%;
        right: 4%;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .hud-header {
        justify-content: space-between;
    }

    .brand-glitch {
        font-size: 1.15rem;
    }

    .stat-box:nth-child(2), .stat-box:nth-child(4) {
        display: none; /* Show only Status and User on tiny mobile */
    }

    .message-bubble {
        max-width: 90%;
        font-size: 0.82rem;
    }
}
