/* ═══════════════════════════════════════════════════════════════════════════
   APEXCYBER DORKS — Professional Dork Search Engine
   Theme: Dark Neon / Glassmorphism
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 30, 0.7);
    --bg-card-hover: rgba(30, 30, 50, 0.8);
    --border-color: rgba(100, 100, 200, 0.15);
    --border-glow: rgba(0, 200, 255, 0.3);
    
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    
    --accent-cyan: #00d4ff;
    --accent-blue: #0066ff;
    --accent-purple: #7c3aed;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --accent-orange: #f97316;
    
    --gradient-primary: linear-gradient(135deg, #00d4ff, #0066ff);
    --gradient-purple: linear-gradient(135deg, #7c3aed, #ec4899);
    --gradient-green: linear-gradient(135deg, #10b981, #059669);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
    
    --shadow-glow: 0 0 30px rgba(0, 200, 255, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --sidebar-width: 240px;
    --header-height: 0px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a { color: var(--accent-cyan); text-decoration: none; }
a:hover { color: #66e5ff; }

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-cyan); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #66e5ff; }

/* ─── Background ────────────────────────────────────────────────────────── */
canvas#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.12;
    pointer-events: none;
}

.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 100, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* ─── Glassmorphism ─────────────────────────────────────────────────────── */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.glass:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8)); }
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.menu-item:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--text-primary);
}

.menu-item.active {
    background: rgba(0, 212, 255, 0.12);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.online .status-dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

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

.version-badge {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ─── Main Content ──────────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ─── Tab Content ───────────────────────────────────────────────────────── */
.tab-content {
    display: none;
    animation: fadeSlideIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

/* ─── Page Headers ──────────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.page-title i {
    margin-right: 12px;
    -webkit-text-fill-color: var(--accent-cyan);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

/* ─── Stats Grid ────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#statTotalSearches::before { background: var(--gradient-primary); }
#statTotalResults::before { background: var(--gradient-purple); }
#statEngines::before { background: var(--gradient-green); }
#statProxies::before { background: var(--gradient-warm); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

#statTotalSearches .stat-icon { background: rgba(0, 212, 255, 0.15); color: var(--accent-cyan); }
#statTotalResults .stat-icon { background: rgba(124, 58, 237, 0.15); color: var(--accent-purple); }
#statEngines .stat-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
#statProxies .stat-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-yellow); }

.stat-info {
    flex: 1;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}

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

.stat-trend {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

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

/* ─── Charts ────────────────────────────────────────────────────────────── */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-card {
    padding: 24px;
}

.chart-header {
    margin-bottom: 16px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-header h3 i {
    margin-right: 8px;
    color: var(--accent-cyan);
}

.chart-body {
    position: relative;
    height: 250px;
}

/* ─── Activity Section ──────────────────────────────────────────────────── */
.activity-section {
    padding: 24px;
}

.activity-header {
    margin-bottom: 16px;
}

.activity-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.activity-header h3 i {
    margin-right: 8px;
    color: var(--accent-purple);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    display: block;
}

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

/* ─── Search Panel ──────────────────────────────────────────────────────── */
.search-panel {
    margin-bottom: 20px;
}

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

.search-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.search-header h3 i {
    margin-right: 8px;
    color: var(--accent-cyan);
}

.search-body {
    padding: 20px 24px;
}

.dork-input-wrapper {
    position: relative;
}

.dork-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.dork-textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.dork-textarea::placeholder {
    color: var(--text-muted);
    font-family: var(--font-body);
}

.dork-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--font-mono);
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

.btn-glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.6); }
}

/* ─── Engine Selection ──────────────────────────────────────────────────── */
.engine-panel {
    margin-bottom: 20px;
    padding: 20px 24px;
}

.engine-header {
    margin-bottom: 16px;
}

.engine-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.engine-header h3 i {
    margin-right: 8px;
    color: var(--accent-green);
}

.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.engine-checkbox {
    cursor: pointer;
}

.engine-checkbox input {
    display: none;
}

.engine-checkbox input:checked + .engine-card {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.engine-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-align: center;
}

.engine-card:hover {
    border-color: var(--text-muted);
}

.engine-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-cyan);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    font-family: var(--font-display);
}

.engine-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ─── Options ───────────────────────────────────────────────────────────── */
.options-panel {
    margin-bottom: 20px;
    padding: 20px 24px;
}

.options-grid {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

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

.option-item label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-styled {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.select-styled:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.tooltip-trigger {
    cursor: help;
    color: var(--text-muted);
    font-size: 14px;
}

/* ─── Search Action ─────────────────────────────────────────────────────── */
.search-action {
    text-align: center;
    margin: 24px 0;
}

.search-action .btn {
    padding: 16px 40px;
    font-size: 16px;
    font-family: var(--font-display);
    letter-spacing: 2px;
}

/* ─── Progress ──────────────────────────────────────────────────────────── */
.progress-panel {
    margin-bottom: 20px;
    padding: 20px 24px;
}

.progress-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* ─── Results ───────────────────────────────────────────────────────────── */
.results-panel {
    margin-bottom: 20px;
}

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

.results-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.results-header h3 i {
    margin-right: 8px;
    color: var(--accent-cyan);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
    margin-left: 8px;
}

.results-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.results-stats-bar {
    padding: 12px 24px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--border-color);
}

.results-table-wrapper {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.results-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1;
}

.results-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: top;
}

.results-table tr:hover {
    background: rgba(0, 212, 255, 0.03);
}

.results-table .result-url {
    color: var(--accent-cyan);
    word-break: break-all;
    font-family: var(--font-mono);
    font-size: 12px;
}

.results-table .result-title {
    color: var(--text-primary);
    font-weight: 500;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.results-table .result-source {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.source-google { background: rgba(66, 133, 244, 0.2); color: #4285f4; }
.source-bing { background: rgba(0, 120, 212, 0.2); color: #0078d4; }
.source-duckduckgo { background: rgba(222, 88, 51, 0.2); color: #de5833; }
.source-brave { background: rgba(251, 84, 43, 0.2); color: #fb542b; }
.source-yahoo { background: rgba(96, 1, 209, 0.2); color: #6001d1; }

.results-footer {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── Dork Library ──────────────────────────────────────────────────────── */
.dork-actions {
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dork-categories {
    min-height: 300px;
    display: flex;
    gap: 0;
    overflow: hidden;
}

.category-tabs {
    width: 220px;
    border-right: 1px solid var(--border-color);
    padding: 12px;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 500px;
}

.category-tab {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: left;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
    font-family: var(--font-body);
}

.category-tab:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--text-primary);
}

.category-tab.active {
    background: rgba(0, 212, 255, 0.12);
    color: var(--accent-cyan);
    font-weight: 600;
}

.category-tab .count {
    float: right;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.category-content {
    flex: 1;
    padding: 20px;
    min-height: 300px;
}

.category-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.category-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.category-dork-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-dork-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    font-family: var(--font-mono);
    font-size: 12px;
    transition: background 0.2s ease;
}

.category-dork-item:hover {
    background: rgba(0, 212, 255, 0.05);
}

.category-dork-item .dork-text {
    color: var(--text-primary);
    word-break: break-all;
    flex: 1;
}

.category-dork-item .dork-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.category-dork-item .dork-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.category-dork-item .dork-actions button:hover {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.category-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ─── Saved Results ─────────────────────────────────────────────────────── */
.saved-results {
    padding: 24px;
}

.saved-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.saved-results-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.saved-results-header h3 i {
    margin-right: 8px;
    color: var(--accent-purple);
}

/* ─── Proxy Panel ───────────────────────────────────────────────────────── */
.proxy-panel {
    margin-bottom: 20px;
}

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

.proxy-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.proxy-header h3 i {
    margin-right: 8px;
    color: var(--accent-yellow);
}

.proxy-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.active {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.status-indicator.inactive {
    background: var(--text-muted);
}

.proxy-body {
    padding: 20px 24px;
}

.proxy-info {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.proxy-info code {
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-cyan);
}

.proxy-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 16px;
}

.proxy-textarea:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.proxy-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.proxy-test-result {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    font-family: var(--font-mono);
}

.proxy-test-result.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.proxy-test-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.proxy-stats {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.proxy-stat {
    text-align: center;
}

.proxy-stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.proxy-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Settings ──────────────────────────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.settings-card {
    padding: 24px;
}

.settings-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.settings-card h3 i {
    margin-right: 8px;
    color: var(--accent-cyan);
}

.setting-item {
    margin-bottom: 16px;
}

.setting-item label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.setting-textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
}

.setting-textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.input-styled {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-styled:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.engine-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.engine-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

/* ─── Modal ─────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-header h3 i {
    margin-right: 8px;
    color: var(--accent-cyan);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

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

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

/* ─── Toast ─────────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--accent-green);
}

.toast.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--accent-red);
}

.toast.info {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--accent-cyan);
}

.toast.warning {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--accent-yellow);
}

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

.toast .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .category-tabs {
        width: 160px;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .engine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-title {
        font-size: 22px;
    }
}

/* ─── Loading Spinner ────────────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ─── Copy feedback ─────────────────────────────────────────────────────── */
.copy-feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-sm);
    color: var(--accent-green);
    font-size: 13px;
    z-index: 2000;
    animation: copyFadeIn 0.3s ease;
}

@keyframes copyFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
