@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --bg: #05030a;
    --bg-2: #0a0a18;
    --panel: rgba(9, 7, 18, 0.9);
    --panel-strong: rgba(14, 10, 24, 0.95);
    --accent: #c66bff;
    --accent-2: #7a1dff;
    --text: #e6e0ff;
    --muted: #9b90c8;
    --mono-font: 'JetBrains Mono', 'Ubuntu Mono', monospace;
    --pixel-font: 'Press Start 2P', 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg: #f0eaff;
    --bg-2: #e6ddff;
    --panel: rgba(245, 240, 255, 0.9);
    --panel-strong: rgba(235, 227, 255, 0.95);
    --text: #1a1233;
    --muted: #5d4d80;
}

* {
    box-sizing: border-box;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    width: 0;
    height: 0;
}

body {
    background:
            radial-gradient(circle at 18% 24%, rgba(198, 107, 255, 0.18), transparent 25%),
            radial-gradient(circle at 82% 12%, rgba(122, 29, 255, 0.12), transparent 25%),
            linear-gradient(135deg, #020107 0%, #0a0820 50%, #03010b 100%);
    color: var(--text);
    font-family: var(--pixel-font);
    letter-spacing: 0.6px;
    min-height: 100vh;
}

body[data-theme="light"] {
    background: linear-gradient(135deg, #f0eaff 0%, #e6ddff 40%, #f6f1ff 100%);
}

#app {
    position: relative;
}

.bg-lines {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(122, 29, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(198, 107, 255, 0.12) 1px, transparent 1px);
    background-size: 120px 120px;
    pointer-events: none;
    z-index: 0;
}

.container-fluid.app-frame {
    padding-top: 84px;
    position: relative;
    z-index: 1;
}

.neon-navbar {
    background: var(--panel-strong) !important;
    border-bottom: 1px solid rgba(122, 29, 255, 0.45);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55), 0 0 28px rgba(122, 29, 255, 0.35);
    padding: 12px 18px;
}

.navbar-brand {
    font-family: var(--pixel-font);
    letter-spacing: 1px;
    color: var(--accent) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 10px rgba(122, 29, 255, 0.65);
}

.navbar-sub {
    font-size: 10px;
    color: var(--muted);
    margin-left: 6px;
}

.navbar-metrics {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 12px;
    flex-wrap: wrap;
}

.metric-chip {
    background: rgba(122, 29, 255, 0.12);
    border: 1px solid rgba(122, 29, 255, 0.28);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 8px;
    align-items: center;
    font-size: 11px;
    box-shadow: 0 0 14px rgba(122, 29, 255, 0.24);
}

.metric-chip .label {
    color: var(--muted);
}

.metric-chip .value {
    color: var(--accent);
}

.navbar-nav .nav-link,
.neon-tab {
    color: var(--text) !important;
    border-radius: 12px;
    padding: 8px 10px;
    margin: 4px 4px;
    transition: all .2s ease;
    background: transparent;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active > .nav-link,
.neon-tab:hover {
    background: rgba(122, 29, 255, 0.24);
    box-shadow: 0 0 16px rgba(122, 29, 255, 0.28);
    color: #fff !important;
}

.navbar-cogs > i {
    color: var(--muted);
}

.navbar-cogs > i:hover {
    color: var(--accent);
}

.app-main {
    background: var(--panel);
    border: 1px solid rgba(122, 29, 255, 0.35);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.45), 0 0 38px rgba(122, 29, 255, 0.18);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 24px;
    min-height: calc(100vh - 120px);
}

.sidebar {
    background: var(--panel);
    border-right: 1px solid rgba(122, 29, 255, 0.25);
    box-shadow: inset -10px 0 24px rgba(0, 0, 0, 0.35);
    min-height: calc(100vh - 84px);
    padding-top: 14px;
}

.sidebar .btn {
    font-family: var(--pixel-font);
    letter-spacing: 0.6px;
    border-radius: 10px;
    border-color: rgba(122, 29, 255, 0.35);
    color: var(--text);
}

.sidebar .btn-outline-primary,
.sidebar .btn-outline-info,
.sidebar .btn-outline-success,
.sidebar .btn-outline-warning {
    background: rgba(255, 255, 255, 0.02);
}

.sidebar .btn:hover {
    box-shadow: 0 0 12px rgba(122, 29, 255, 0.3);
}

.sidebar-sticky {
    padding: 8px 6px 14px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.stream-item {
    margin: 8px 0;
    border-radius: 14px;
    border: 1px solid rgba(122, 29, 255, 0.25);
    background: linear-gradient(125deg, rgba(122, 29, 255, 0.12), rgba(7, 4, 15, 0.9));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.stream-item .nav-link {
    color: var(--text) !important;
    padding: 12px;
}

.stream-item .nav-link:hover {
    background: rgba(122, 29, 255, 0.12);
}

.highlight {
    border-color: rgba(122, 29, 255, 0.55);
    box-shadow: 0 0 12px rgba(122, 29, 255, 0.35);
}

.legend-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 12px;
}

.legend-pill {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(122, 29, 255, 0.35);
    background: rgba(122, 29, 255, 0.12);
    box-shadow: 0 0 12px rgba(122, 29, 255, 0.2);
    color: var(--text);
}

.packet-outgoing, .packet-incoming {
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid rgba(122, 29, 255, 0.28);
}

.packet-incoming {
    background: radial-gradient(circle at 18% 20%, rgba(122, 29, 255, 0.16), rgba(9, 7, 18, 0.92));
}

.packet-outgoing {
    background: radial-gradient(circle at 18% 20%, rgba(255, 106, 213, 0.12), rgba(10, 17, 40, 0.9));
}

.packet-incoming div,
.packet-outgoing div {
    font-size: 11px;
    color: var(--muted);
    font-family: var(--pixel-font);
}

.packet-incoming button,
.packet-outgoing button {
    color: var(--accent);
}

.packet-incoming p,
.packet-outgoing p {
    font-family: var(--mono-font);
    font-size: 13px;
    background: rgba(0, 0, 0, 0.22);
    padding: 12px;
    border-radius: 10px;
    color: var(--text);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.35);
}

.btn, .form-control, .custom-select, .page-link {
    font-family: var(--pixel-font);
    letter-spacing: 0.5px;
}

.modal-content {
    background: var(--panel);
    color: var(--text);
    border: 1px solid rgba(122, 29, 255, 0.35);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
}

.dropdown-menu {
    background: var(--panel);
    color: var(--text);
}

.dropdown-item {
    color: var(--text);
}

.dropdown-item:hover {
    background: rgba(122, 29, 255, 0.18);
}

.toast {
    background: var(--panel-strong);
    color: var(--text);
    border: 1px solid rgba(255, 106, 213, 0.22);
}

.theme-toggle {
    margin-left: auto;
}
