/* =========================================
   Network Analyzer Pro - Professional CSS
   ========================================= */

:root {
    /* Colors - GitHub Dark Theme */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #30363d;
    --bg-active: #388bfd26;
    
    --border-primary: #30363d;
    --border-secondary: #484f58;
    
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-red: #f85149;
    --accent-orange: #d29922;
    --accent-purple: #a371f7;
    --accent-pink: #db61a2;
    --accent-cyan: #39c5cf;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 20px rgba(88, 166, 255, 0.3);
    
    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   Loading Screen
   ========================================= */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loader-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    border-top-color: var(--accent-green);
    animation-duration: 1s;
    animation-direction: reverse;
}

.loader-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    border-top-color: var(--accent-purple);
    animation-duration: 0.8s;
}

.loader-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 140px;
    position: absolute;
}

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

/* =========================================
   App Layout
   ========================================= */
.app {
    display: flex;
    min-height: 100vh;
}

.app.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* =========================================
   Sidebar
   ========================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-normal);
}

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

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

.logo-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.5));
}

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

.logo-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-subtitle {
    font-size: 12px;
    color: var(--accent-blue);
}

/* Navigation */
.nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-active);
    color: var(--accent-blue);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-blue);
    border-radius: 3px;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

.nav-badge {
    margin-right: auto;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-badge.live {
    background: rgba(63, 185, 80, 0.2);
    color: var(--accent-green);
    animation: pulse 2s infinite;
}

.nav-badge.new {
    background: rgba(248, 81, 73, 0.2);
    color: var(--accent-red);
}

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

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
}

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

.status-text {
    font-size: 12px;
    color: var(--text-secondary);
}

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

/* =========================================
   Main Content
   ========================================= */
.main {
    flex: 1;
    margin-right: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.header-info h1 {
    font-size: 20px;
    font-weight: 600;
}

.header-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.live-stats {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.live-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-icon {
    font-size: 14px;
}

.live-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-blue);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #4393e6;
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-xl {
    padding: 18px 36px;
    font-size: 18px;
    border-radius: var(--radius-lg);
}

.btn-icon {
    font-size: 16px;
}

/* Content */
.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* =========================================
   Stats Grid
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.primary { border-right: 3px solid var(--accent-blue); }
.stat-card.success { border-right: 3px solid var(--accent-green); }
.stat-card.warning { border-right: 3px solid var(--accent-orange); }
.stat-card.info { border-right: 3px solid var(--accent-purple); }

.stat-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.score {
    color: var(--accent-green);
}

.stat-extra {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* =========================================
   Metrics Grid
   ========================================= */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.metric-icon {
    font-size: 20px;
}

.metric-icon.green { filter: drop-shadow(0 0 4px var(--accent-green)); }
.metric-icon.blue { filter: drop-shadow(0 0 4px var(--accent-blue)); }
.metric-icon.purple { filter: drop-shadow(0 0 4px var(--accent-purple)); }
.metric-icon.orange { filter: drop-shadow(0 0 4px var(--accent-orange)); }

.metric-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.metric-status {
    margin-right: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--bg-tertiary);
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.metric-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.bar-fill.green { background: linear-gradient(90deg, var(--accent-green), #56d364); }
.bar-fill.blue { background: linear-gradient(90deg, var(--accent-blue), #79c0ff); }
.bar-fill.purple { background: linear-gradient(90deg, var(--accent-purple), #c6a4f7); }
.bar-fill.orange { background: linear-gradient(90deg, var(--accent-orange), #e3b341); }

.metric-range {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
}

/* =========================================
   Charts
   ========================================= */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.chart-header h3 {
    font-size: 14px;
    font-weight: 600;
}

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

.chart-btn {
    padding: 4px 12px;
    font-size: 11px;
    border: 1px solid var(--border-primary);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chart-btn:hover,
.chart-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.chart-body {
    padding: 20px;
    height: 250px;
}

.chart-body canvas {
    width: 100% !important;
    height: 100% !important;
}

/* =========================================
   Quick Tests
   ========================================= */
.quick-tests {
    margin-bottom: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.quick-tests-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-test-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-test-btn:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.qt-icon {
    font-size: 32px;
}

.qt-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* =========================================
   Data Tables
   ========================================= */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    border-bottom: 1px solid var(--border-primary);
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-primary);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table .empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.status-badge.error {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

.status-badge.warning {
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-orange);
}

/* =========================================
   Test Header
   ========================================= */
.test-header {
    text-align: center;
    margin-bottom: 32px;
}

.test-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.test-header p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* =========================================
   Speed Test
   ========================================= */
.speed-test-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

.speed-gauge {
    position: relative;
    width: 300px;
    height: 180px;
    margin-bottom: 32px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
}

.gauge-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 12;
    stroke-linecap: round;
}

.gauge-fill {
    fill: none;
    stroke: url(#gaugeGradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 251;
    stroke-dashoffset: 251;
    transition: stroke-dashoffset 1s ease;
}

.gauge-needle {
    fill: var(--accent-blue);
    filter: drop-shadow(0 0 8px var(--accent-blue));
}

.gauge-value-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.gauge-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
}

.gauge-unit {
    font-size: 16px;
    color: var(--text-secondary);
}

.speed-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 32px;
    width: 100%;
    max-width: 800px;
}

.speed-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.speed-icon {
    font-size: 24px;
}

.speed-label {
    font-size: 12px;
    color: var(--text-muted);
}

.speed-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-blue);
}

/* =========================================
   VPN Grid
   ========================================= */
.vpn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.vpn-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-fast);
}

.vpn-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.vpn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.vpn-name {
    font-size: 18px;
    font-weight: 700;
}

.vpn-rating {
    font-size: 14px;
}

.vpn-type {
    font-size: 12px;
    color: var(--accent-blue);
    margin-bottom: 8px;
}

.vpn-protocols {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.vpn-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* =========================================
   Bypass Grid
   ========================================= */
.bypass-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.bypass-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.bypass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bypass-name {
    font-size: 18px;
    font-weight: 700;
}

.bypass-difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.bypass-difficulty.easy {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.bypass-difficulty.medium {
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-orange);
}

.bypass-difficulty.hard {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

.bypass-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.bypass-steps {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.bypass-steps h4 {
    font-size: 12px;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.bypass-steps ul {
    list-style: none;
    padding: 0;
}

.bypass-steps li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-primary);
}

.bypass-steps li:last-child {
    border-bottom: none;
}

/* =========================================
   Config Builder
   ========================================= */
.config-builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.config-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-field,
.select-field {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.input-field:focus,
.select-field:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn .input-field {
    flex: 1;
}

.config-output {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.output-header h4 {
    font-size: 14px;
    font-weight: 600;
}

.config-textarea {
    width: 100%;
    height: 200px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--accent-green);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    resize: vertical;
}

/* =========================================
   Toast Notifications
   ========================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.toast.success { border-right: 3px solid var(--accent-green); }
.toast.error { border-right: 3px solid var(--accent-red); }
.toast.warning { border-right: 3px solid var(--accent-orange); }
.toast.info { border-right: 3px solid var(--accent-blue); }

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

.toast-icon {
    font-size: 20px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1200px) {
    .stats-grid,
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .vpn-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .config-builder {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main {
        margin-right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid,
    .metrics-grid,
    .quick-tests-grid {
        grid-template-columns: 1fr;
    }
    
    .header-right {
        display: none;
    }
    
    .speed-results {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vpn-grid,
    .bypass-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Text color utilities */
.text-green { color: var(--accent-green) !important; }
.text-red { color: var(--accent-red) !important; }
.text-orange { color: var(--accent-orange) !important; }
.text-blue { color: var(--accent-blue) !important; }

/* =========================================
   Network Scan Results Grid
   ========================================= */
.scan-result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
}

.scan-result-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--accent-green);
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 12px;
}

.scan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.scan-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    transition: var(--transition-fast);
}

.scan-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.scan-icon {
    font-size: 24px;
}

.scan-label {
    color: var(--text-secondary);
    font-size: 14px;
    min-width: 80px;
}

.scan-value {
    color: var(--text-primary);
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.scan-value code {
    background: var(--bg-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--accent-cyan);
}

.scan-advice {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    font-size: 15px;
}

.scan-advice.warning {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.scan-advice.success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

/* =========================================
   Traceroute Styles
   ========================================= */
.traceroute-results {
    margin-top: 20px;
}

.loading-traceroute {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
}

.traceroute-hop {
    display: grid;
    grid-template-columns: 40px 180px 1fr 100px;
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.traceroute-hop:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.hop-num {
    width: 32px;
    height: 32px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.hop-ip code {
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent-cyan);
}

.hop-name {
    color: var(--text-primary);
    font-weight: 500;
}

.hop-latency {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.hop-latency.good {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.hop-latency.medium {
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-orange);
}

.hop-latency.slow {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

/* =========================================
   VPN Cards (Iran Edition)
   ========================================= */
.vpn-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-normal);
}

.vpn-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.vpn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.vpn-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.vpn-rating {
    font-size: 14px;
}

.vpn-type {
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.vpn-protocols {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
}

.vpn-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.vpn-clients {
    color: var(--accent-cyan);
    font-size: 12px;
    margin-bottom: 12px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

/* =========================================
   Bypass Cards (Iran Edition)
   ========================================= */
.bypass-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-normal);
}

.bypass-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.bypass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bypass-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.bypass-difficulty {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.bypass-difficulty.easy {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
}

.bypass-difficulty.medium {
    background: rgba(210, 153, 34, 0.15);
    color: var(--accent-orange);
}

.bypass-difficulty.hard {
    background: rgba(248, 81, 73, 0.15);
    color: var(--accent-red);
}

.bypass-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.bypass-steps {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 14px;
}

.bypass-steps h4 {
    font-size: 13px;
    color: var(--accent-purple);
    margin-bottom: 10px;
}

.bypass-steps ul {
    list-style: none;
    padding: 0;
}

.bypass-steps li {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 6px 0;
    padding-right: 20px;
    position: relative;
}

.bypass-steps li::before {
    content: '→';
    position: absolute;
    right: 0;
    color: var(--accent-cyan);
}
