        :root {
            --bg-gradient: linear-gradient(135deg, #f2f2f7 0%, #e5e5ea 100%);
            --card-bg: rgba(255, 255, 255, 0.85);
            --card-border: rgba(209, 209, 214, 0.6);
            --text-main: #1d1d1f;
            --text-secondary: #86868b;
            --accent: #0066cc;
            --accent-glow: rgba(0, 102, 204, 0.25);
            --success: #34c759;
            --warning: #ff9500;
            --danger: #ff3b30;
            --shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
            --radius-lg: 24px;
            --radius-md: 14px;
            --radius-sm: 8px;
            --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        @media (prefers-color-scheme: dark) {
            :root {
                --bg-gradient: linear-gradient(135deg, #0b0b0f 0%, #121218 100%);
                --card-bg: rgba(24, 24, 29, 0.85);
                --card-border: rgba(255, 255, 255, 0.1);
                --text-main: #f5f5f7;
                --text-secondary: #98989d;
                --accent: #0a84ff;
                --accent-glow: rgba(10, 132, 255, 0.35);
                --success: #30d158;
                --warning: #ffd60a;
                --danger: #ff453a;
                --shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
            }
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: var(--font-family);
            -webkit-font-smoothing: antialiased;
        }

        body {
            /*
            background: var(--bg-gradient);
            color: var(--text-main);
            */
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

    .app-shell {
            flex: 1;
            display: flex;
            flex-direction: column;
            width: 100%;
            max-width: 1920px;
            margin: 0 auto;
            padding: 24px;
            gap: 20px;
            height: 100vh;
        }

        @media (max-width: 768px) {
            .app-shell {
                padding: 12px;
                gap: 12px;
                height: 100vh;
            }
        }

        .app-shell {
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--card-bg);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border: 1px solid var(--card-border);
            border-radius: var(--radius-lg);
            padding: 16px 28px;
            box-shadow: var(--shadow);
            z-index: 10;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .brand-logo {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, var(--accent), #5856d6);
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 1.1rem;
            box-shadow: 0 4px 12px var(--accent-glow);
        }

        .brand-text h1 {
            font-size: 1.15rem;
            font-weight: 600;
            letter-spacing: -0.01em;
        }

        .brand-text p {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .status-pill {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: rgba(120, 120, 128, 0.1);
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--warning);
            animation: pulse 2s infinite;
        }

        .status-dot.connected {
            background: var(--success);
        }

        .status-dot.error {
            background: var(--danger);
            animation: none;
        }

        @keyframes pulse {
            0% { opacity: 0.4; }
            50% { opacity: 1; }
            100% { opacity: 0.4; }
        }

        .mode-switchers {
            /* display: flex; */
            background: rgba(120, 120, 128, 0.1);
            padding: 4px;
            border-radius: var(--radius-md);
            gap: 4px;
        }

        .mode-btn {
            background: transparent;
            border: none;
            padding: 8px 18px;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            border-radius: 10px;
            cursor: pointer;
            transition: var(--transition);
        }

        .mode-btn.active {
            background: var(--card-bg);
            color: var(--text-main);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
            font-weight: 600;
        }

        .workspace {
            flex: 1;
            position: relative;
            background: var(--card-bg);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border: 1px solid var(--card-border);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow);
            display: flex;
        }

        .view-pane {
            position: absolute;
            inset: 0;
            display: none;
            flex-direction: column;
            opacity: 0;
            transition: opacity 0.35s ease-in-out;
        }

        .view-pane.active {
            display: flex;
            opacity: 1;
        }

        .map-container {
            width: 100%;
            height: 100%;
            background: #111;
        }

        .inspector-card {
            position: absolute;
            top: 24px;
            left: 24px;
            width: 340px;
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--card-border);
            border-radius: var(--radius-md);
            padding: 20px;
            box-shadow: var(--shadow);
            z-index: 5;
            display: flex;
            flex-direction: column;
            gap: 12px;
            pointer-events: auto;
        }

        .inspector-title {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-secondary);
            font-weight: 600;
        }

        .inspector-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .inspector-metric {
            background: rgba(120, 120, 128, 0.06);
            padding: 10px;
            border-radius: var(--radius-sm);
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .metric-label {
            font-size: 0.7rem;
            color: var(--text-secondary);
        }

        .metric-value {
            font-size: 0.9rem;
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .inspector-card {
                display: none;
            }
        }

        .timeline-overlay {
            position: absolute;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 850px;
            background: var(--card-bg);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border: 1px solid var(--card-border);
            border-radius: var(--radius-lg);
            padding: 20px 24px;
            box-shadow: var(--shadow);
            z-index: 5;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .timeline-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .timeline-badge {
            background: var(--accent);
            color: white;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .timeline-date-display {
            font-size: 0.95rem;
            font-weight: 600;
        }

        .timeline-controls-row {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .control-btn {
            background: var(--accent);
            color: white;
            border: none;
            padding: 8px 18px;
            border-radius: var(--radius-sm);
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: 0 4px 12px var(--accent-glow);
        }

        .control-btn:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .slider-wrapper {
            flex: 1;
            display: flex;
            align-items: center;
        }

        input[type="range"] {
            width: 100%;
            height: 6px;
            background: rgba(120, 120, 128, 0.2);
            border-radius: 3px;
            outline: none;
            appearance: none;
            accent-color: var(--accent);
        }

        input[type="range"]::-webkit-slider-thumb {
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--accent);
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
            transition: transform 0.1s;
        }

        input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.15);
        }

        /* Pure Timeline Workspace Styles */
        .pure-timeline-container {
            flex: 1;
            padding: 40px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 30px;
            max-width: 1000px;
            margin: 0 auto;
            width: 100%;
        }

        .pure-timeline-dashboard {
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .pure-timeline-scrubber-card {
            background: rgba(120, 120, 128, 0.04);
            border: 1px solid var(--card-border);
            border-radius: var(--radius-md);
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .events-stream {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .event-card-item {
            background: rgba(120, 120, 128, 0.04);
            border: 1px solid var(--card-border);
            border-radius: var(--radius-sm);
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            transition: var(--transition);
        }

        .event-card-item.active-event {
            background: rgba(10, 132, 255, 0.08);
            border-color: var(--accent);
        }

        .table-wrapper {
            flex: 1;
            overflow: auto;
            padding: 24px;
        }

        .table-wrapper table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.85rem;
            white-space: nowrap;
        }

        th, td {
            padding: 14px 18px;
            border-bottom: 1px solid var(--card-border);
        }

        th {
            font-weight: 600;
            color: var(--text-secondary);
            background: rgba(120, 120, 128, 0.05);
            position: sticky;
            top: 0;
            backdrop-filter: blur(10px);
            z-index: 2;
        }

        tr {
            transition: background 0.15s;
        }

        tr:hover td {
            background: rgba(120, 120, 128, 0.04);
        }

        .tag {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 500;
            background: rgba(120, 120, 128, 0.1);
        }

        .tag.danger {
            background: rgba(255, 59, 48, 0.15);
            color: var(--danger);
        }

        .tag.success {
            background: rgba(52, 199, 89, 0.15);
            color: var(--success);
        }

        /* Loading Overlay */
        .loading-overlay {
            position: absolute;
            inset: 0;
            background: var(--card-bg);
            backdrop-filter: blur(10px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
            z-index: 100;
            transition: opacity 0.3s ease;
        }

        .loading-spinner {
            width: 36px;
            height: 36px;
            border: 3px solid rgba(120, 120, 128, 0.2);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

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