:root {
    /* Core Brand Colors */
    --primary: #3498FB;
    --primary-light: #5A9FD4;
    --primary-dark: #2980D9;
    --secondary: #393B4E;
    
    /* Base Colors */
    --background: #FFFFFF;
    --surface: #FAFBFC;
    --surface-elevated: #FFFFFF;
    
    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #393B4E;
    --text-muted: #6B7280;
    
    /* Semantic Colors */
    --success: #28A745;
    --error: #DC3545;
    --warning: #FFC107;
    --info: var(--primary);
    
    /* Border & Dividers */
    --border: #E8EAED;
    --border-light: #F3F4F6;
    --divider: rgba(52, 152, 251, 0.05);
    
    /* Shadows & Effects */
    --shadow-sm: rgba(52, 152, 251, 0.04);
    --shadow: rgba(52, 152, 251, 0.08);
    --shadow-md: rgba(52, 152, 251, 0.12);
    --shadow-lg: rgba(52, 152, 251, 0.16);
    --shadow-hover: rgba(52, 152, 251, 0.20);
    
    /* Accent & Highlights */
    --accent: rgba(52, 152, 251, 0.04);
    --accent-hover: rgba(52, 152, 251, 0.08);
    
    /* Banner-specific variables for light theme */
    --banner-stat-bg: rgba(255, 255, 255, 0.15);
    --banner-stat-border: rgba(255, 255, 255, 0.2);
    --banner-stat-hover-bg: rgba(255, 255, 255, 0.25);
    --banner-text-primary: white;
    --banner-text-secondary: rgba(255, 255, 255, 0.9);
    
    /* Spacing Scale */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Border Radius Scale */
    --radius-sm: 6px;
    --radius-md: 12px;
    
    /* Touch target minimum size for mobile */
    --touch-target: 44px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Timing Functions */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-theme="dark"] {
    --background: #000000;
    --surface: #393B4E;
    --surface-elevated: #4A4D5A;
    
    --text-primary: #FFFFFF;
    --text-secondary: #B8BCC8;
    --text-muted: #9CA3AF;
    
    --border: #4A4D5A;
    --border-light: #52566C;
    --divider: rgba(255, 255, 255, 0.05);
    
    --shadow-sm: rgba(0, 0, 0, 0.1);
    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-md: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(52, 152, 251, 0.2);
    
    --accent: rgba(52, 152, 251, 0.08);
    --accent-hover: rgba(52, 152, 251, 0.12);
}

/* Dark theme for new header integrated theme toggle */

/* Dark theme adjustments for stats grid */
[data-theme="dark"] .stats-grid {
    background: linear-gradient(135deg, var(--primary, #3498FB) 0%, #2980D9 50%, #000000 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    /* Clean gradient without masking for dark mode */
}

[data-theme="dark"] .stat-card {
    background: rgba(57, 59, 78, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(57, 59, 78, 0.4);
}

[data-theme="dark"] .download-btn {
    background: var(--surface, #393B4E);
    color: var(--text-primary, #FFFFFF);
}

[data-theme="dark"] .download-btn:hover {
    background: var(--primary, #3498FB);
    color: white;
}

/* Dark theme chart enhancements */
[data-theme="dark"] .chart-wrapper {
    background: var(--surface, #393B4E);
    box-shadow: 
        0 0 20px rgba(52, 152, 251, 0.15),
        0 0 40px rgba(52, 152, 251, 0.08),
        0 0 0 1px rgba(52, 152, 251, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .chart-wrapper:hover {
    box-shadow: 
        0 0 30px rgba(52, 152, 251, 0.25),
        0 0 60px rgba(52, 152, 251, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(52, 152, 251, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .charts-container {
    background: linear-gradient(135deg, rgba(52, 152, 251, 0.12) 0%, rgba(52, 152, 251, 0.06) 100%);
    border: 2px solid rgba(52, 152, 251, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Dark theme fill effects - more visible */
[data-theme="dark"] .stat-card::after {
    background: linear-gradient(180deg, 
        rgba(52, 152, 251, 0.3) 0%, 
        rgba(52, 152, 251, 0.2) 50%,
        rgba(52, 152, 251, 0.1) 100%);
    box-shadow: inset 0 1px 0 rgba(52, 152, 251, 0.4);
}

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

/* Mobile Performance & Touch Optimizations */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior-y: none; /* Prevent pull-to-refresh */
}

/* Improve button/link touch targets */
button, .nav-btn, .btn {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    touch-action: manipulation;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea {
    font-size: 16px;
}

@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Add smooth theme transitions to key elements only */
body, .container, .header, .stats-grid, .chart-container, .results-table, .downloads-section,
table, th, td, .theme-toggle, .url-cell {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background, #FFFFFF);
    color: var(--text-primary, #000000);
    line-height: 1.6;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Old theme toggle styles removed - now integrated in header nav */

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* Enhanced Insights Banner */
.insights-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 16px;
    margin: 16px 0 32px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px var(--shadow-lg),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.insights-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.banner-content {
    padding: 28px 32px;
    position: relative;
    z-index: 1;
}

.banner-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.banner-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.15);
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--banner-text-primary);
    margin: 0;
}

.banner-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.banner-stat {
    text-align: center;
    background: var(--banner-stat-bg);
    border-radius: 12px;
    padding: 16px 12px;
    border: 1px solid var(--banner-stat-border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.banner-stat:hover {
    background: var(--banner-stat-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--banner-text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--banner-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.banner-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--banner-text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Global Mobile Improvements */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Header Mobile */
    .header-content {
        padding: 0 16px;
        height: 56px;
    }
    
    .logo h1 {
        font-size: 1.1rem;
        display: none; /* Hide on very small screens */
    }
    
    .desktop-nav {
        gap: 8px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    /* Main content mobile spacing */
    .main-content {
        padding: 16px;
    }
    
    /* Banner Mobile */
    .insights-banner {
        margin: 12px 0 24px 0;
        border-radius: 12px;
    }
    
    .banner-content {
        padding: 20px 16px;
    }
    
    .banner-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .banner-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .banner-title {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    
    .banner-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .banner-stat {
        padding: 14px 10px;
        border-radius: 10px;
    }
    
    .stat-value {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }
    
    .banner-description {
        font-size: 0.85rem;
        line-height: 1.5;
        padding: 0 8px;
    }
    
    /* Dashboard sections mobile */
    .dashboard-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    /* Status grid mobile */
    .status-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Health map mobile */
    .map-legend {
        gap: 12px;
        justify-content: center;
    }
    
    .legend-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .map-container {
        min-height: 250px;
        padding: 16px;
        gap: 4px;
    }
    
    .health-dot {
        width: 12px;
        height: 12px;
    }
    
    .map-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
    
    .map-stat-number {
        font-size: 1.2rem;
    }
    
    /* Heatmap mobile */
    .heatmap-controls {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .heatmap-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .heatmap-view {
        padding: 16px;
    }
    
    .heatmap-row {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
        padding: 16px 0;
    }
    
    .category-label::before {
        display: none;
    }
    
    .coverage-percent {
        font-size: 1rem;
        min-width: auto;
        align-self: center;
    }
    
    /* Stealth dashboard mobile */
    .stealth-metrics {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .stealth-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stealth-tlds {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    /* Very small mobile improvements */
    .header-content {
        padding: 0 12px;
        height: 52px;
    }
    
    .logo h1 {
        font-size: 1rem;
        margin-left: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
        display: block !important;
        visibility: visible !important;
    }
    
    .logo {
        flex-shrink: 0;
    }
    
    .nav-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .insights-banner {
        margin: 8px 0 20px 0;
        border-radius: 10px;
    }
    
    .banner-content {
        padding: 16px 12px;
    }
    
    .banner-title {
        font-size: 1.2rem;
    }
    
    .banner-stats {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .banner-stat {
        padding: 12px;
        border-radius: 8px;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .banner-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .banner-description {
        font-size: 0.8rem;
        padding: 0 4px;
    }
    
    .map-stats {
        grid-template-columns: 1fr;
    }
    
    .health-dot {
        width: 10px;
        height: 10px;
    }
    
    .heatmap-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

/* Dark Theme Compatibility */
[data-theme="dark"] .insights-banner {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
    box-shadow: 
        0 8px 32px rgba(30, 58, 138, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .banner-stat {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .banner-stat:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .banner-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .map-container {
    border: 1px solid var(--border);
}

[data-theme="dark"] .map-container::before {
    content: '';
    position: absolute;
    top: 60%;
    left: -200%;
    width: 500%;
    height: 400%;
    background: radial-gradient(circle 900px at 60% 40%, 
        rgba(0, 0, 0, 1.2) 0%, 
        rgba(0, 0, 0, 0.8) 30%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(0, 0, 0, 0.2) 70%, 
        transparent 100%);
    pointer-events: none;
    z-index: 1;
    animation: leftCircleFlow 20s linear infinite;
}

[data-theme="dark"] .map-container::after {
    content: '';
    position: absolute;
    top: 60%;
    right: -200%;
    width: 500%;
    height: 400%;
    background: radial-gradient(circle 900px at 40% 40%, 
        rgba(0, 0, 0, 1.2) 0%, 
        rgba(0, 0, 0, 0.8) 30%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(0, 0, 0, 0.2) 70%, 
        transparent 100%);
    pointer-events: none;
    z-index: 1;
    animation: rightCircleFlow 20s linear infinite -10s;
}

/* Hide circles on mobile */
@media (max-width: 768px) {
    .map-container::before,
    .map-container::after,
    [data-theme="dark"] .map-container::before,
    [data-theme="dark"] .map-container::after {
        display: none;
    }
    
}

[data-theme="dark"] .legend-item:hover {
    background: var(--primary);
    color: white;
}

[data-theme="dark"] .heatmap-container {
    background: var(--background);
    border: 1px solid var(--border);
}

[data-theme="dark"] .heatmap-row:hover {
    background: var(--surface);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin: 24px 0 12px 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Minimalistic Downloads Section */
.downloads-wrapper {
    margin: 0 0 24px 0;
    position: relative;
}

.downloads-section {
    background: transparent;
    padding: 20px 0;
    position: relative;
    text-align: center;
}

.downloads-section h2 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-secondary, #393B4E);
    text-align: center;
    position: relative;
}

.download-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface, #FAFBFC);
    border: 1px solid var(--border, #E8EAED);
    color: var(--text-primary, #000000);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-width: 80px;
}

.download-btn:hover {
    background: var(--primary, #3498FB);
    border-color: var(--primary, #3498FB);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-hover, rgba(52, 152, 251, 0.20));
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Statistics Grid with Gradient Background */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary, #3498FB) 0%, #2980D9 50%, var(--secondary, #393B4E) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    border-radius: 24px;
    /* Clean gradient without masking effects */
}

/* Clean gradient container without any masking effects */

.stats-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    pointer-events: none;
}

.stats-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 120% 120% at center, transparent 60%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    /* Fallback for browsers without backdrop-filter support */
    background-color: rgba(255, 255, 255, 0.25);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Enhance fill visibility on hover */
.stat-card:hover::after {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.35) 0%, 
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.15) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Dark theme hover effects */
[data-theme="dark"] .stat-card:hover::after {
    background: linear-gradient(180deg, 
        rgba(52, 152, 251, 0.4) 0%, 
        rgba(52, 152, 251, 0.3) 50%,
        rgba(52, 152, 251, 0.2) 100%);
    box-shadow: inset 0 1px 0 rgba(52, 152, 251, 0.5);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
}

/* Animated counter effect */
.stat-value.counting {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* Add icon styling */
.stat-icon {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto 12px auto;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Card fill effect for completeness */

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--fill-height, 0%);
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 100%);
    transition: height 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    border-radius: 0 0 16px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Animated fill effect */
.stat-card.fill-animate::after {
    animation: fillFromBottom 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fillFromBottom {
    from {
        height: 0%;
    }
    to {
        height: var(--fill-height);
    }
}

/* Ensure content stays above fill */
.stat-card > * {
    position: relative;
    z-index: 1;
}

/* Pulse effect for important metrics */
.stat-card.highlight .stat-value {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    50% {
        text-shadow: 0 2px 8px rgba(255,255,255,0.3), 0 0 16px rgba(255,255,255,0.2);
    }
}

@keyframes blueShift {
    0% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
    100% { 
        background-position: 0% 50%; 
    }
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
    padding: 32px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(52, 152, 251, 0.08) 0%, rgba(52, 152, 251, 0.04) 100%);
    border: 2px solid rgba(52, 152, 251, 0.15);
    box-shadow: 
        0 8px 32px rgba(52, 152, 251, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Monitoring Dashboard */
.monitoring-dashboard {
    margin-bottom: 48px;
}

.dashboard-section {
    background: var(--surface, #FAFBFC);
    border: 1px solid var(--border, #E8EAED);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border, #E8EAED);
    padding-bottom: 16px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

/* Service Status Dashboard */
.status-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.healthy { background: #28A745; }
.status-dot.warning { background: #FFC107; }
.status-dot.critical { background: #DC3545; }
.status-dot.unknown { background: #95A5A6; }

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

.status-panel {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.status-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.status-panel.rdap::before { background: #3498FB; }
.status-panel.whois::before { background: #F39C12; }
.status-panel.stealth::before { background: #9B59B6; }

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

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
}

.panel-status.healthy { background: #28A745; color: white; }
.panel-status.warning { background: #FFC107; color: black; }
.panel-status.critical { background: #DC3545; color: white; }
.panel-status.unknown { background: #95A5A6; color: white; }
.panel-status.active { background: #9B59B6; color: white; }
.panel-status.inactive { background: var(--border); color: var(--text-secondary); }

.service-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.status-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
    display: flex;
}

.bar-fill {
    height: 100%;
    transition: width 2s ease;
}

.bar-fill.healthy { background: #28A745; }
.bar-fill.critical { background: #DC3545; }
.bar-fill.unknown { background: #95A5A6; }
.bar-fill.stealth { background: #9B59B6; }

/* Health Map */
.map-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.zoom-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.zoom-level {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 50px;
    text-align: center;
}

.map-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(52, 152, 251, 0.3);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 8px 16px;
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.legend-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 251, 0.2);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.legend-dot.healthy { background: #28A745; }
.legend-dot.partial { background: #FFC107; }
.legend-dot.broken { background: #DC3545; }
.legend-dot.unknown { background: #95A5A6; }

.health-map {
    margin-top: 20px;
    position: relative;
}

.map-container {
    min-height: 400px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
    display: grid;
    grid-template-columns: repeat(60, 1fr);
    gap: 4px;
    grid-auto-rows: 20px;
    width: 100%;
    height: 600px;
    align-items: start;
    justify-items: start;
}

.health-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0.9;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 10;
    box-shadow: 
        0 1px 3px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.health-dot.rdap-down::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Ensure black dot is visible even when dot is scaled on hover */
.health-dot.rdap-down:hover::after {
    transform: translate(-50%, -50%) scale(0.5);
}

.health-dot:hover {
    transform: scale(1.3);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.8);
}

.health-dot.filtered-out {
    opacity: 0.1;
    transform: scale(0.5);
    pointer-events: none;
}

.health-dot.filtered-in {
    opacity: 1;
    transform: scale(1.3);
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}




/* Mobile TLD List - Hidden by default, shown on mobile */
.mobile-tld-list {
    display: none;
    width: 100%;
    background: transparent;
}

.mobile-list-header {
    display: none;
    padding: 12px 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 12px;
}

.mobile-search {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px; /* Prevent zoom on iOS */
    background: var(--background);
    color: var(--text-primary);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.mobile-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 251, 0.1), inset 0 1px 3px rgba(0,0,0,0.1);
}

.mobile-tld-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-tld-item:hover {
    background-color: var(--accent-hover);
    border-radius: 6px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.mobile-tld-item.hidden {
    display: none;
}



/* Enhanced Tooltip */
.health-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.health-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #3498FB;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
    font-size: 0.8rem;
}

.tooltip-label {
    color: rgba(255, 255, 255, 0.8);
}

.tooltip-value {
    font-weight: 600;
}

.tooltip-value.working { color: #28A745; }
.tooltip-value.down { color: #DC3545; }
.tooltip-value.available { color: #FFC107; }
.tooltip-value.stealth { color: #9B59B6; }
.tooltip-value.none { color: #95A5A6; }

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


@keyframes leftCircleFlow {
    0% {
        transform: translateY(0%);
        opacity: 0;
    }
    5% {
        opacity: 0.3;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes rightCircleFlow {
    0% {
        transform: translateY(0%);
        opacity: 0;
    }
    5% {
        opacity: 0.3;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.map-stats {
    display: grid;
    grid-template-rows: repeat(auto-fit);
    gap: 16px;
    margin-top: 20px;
    padding: 20px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

.map-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.map-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Interactive Stacked Bar Styles */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-total {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stacked-bar-container {
    margin-bottom: 24px;
}

.stacked-bar {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
}

.bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    min-width: 0;
}

.bar-segment:hover {
    filter: brightness(1.1);
}

.bar-segment.active {
    filter: brightness(1.2);
    box-shadow: 0 0 0 2px var(--primary);
    transform: scaleY(1.05);
}

.bar-segment.both {
    background: #28A745;
}

.bar-segment.rdap {
    background: #3498FB;
}

.bar-segment.whois {
    background: #F39C12;
}

.bar-segment.none {
    background: #8B0000;
}

.segment-label {
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    pointer-events: none;
}

.stats-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.legend-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.legend-item:hover {
    background: var(--background);
    border-color: var(--border);
    transform: translateY(-1px);
}

.legend-item[data-type="both"]:hover {
    border-color: #28A745;
}

.legend-item[data-type="rdap"]:hover {
    border-color: #3498FB;
}

.legend-item[data-type="whois"]:hover {
    border-color: #F39C12;
}

.legend-item[data-type="none"]:hover {
    border-color: #95A5A6;
}

/* Active state for legend items */
.legend-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(52, 152, 251, 0.3);
}

.legend-item.active .legend-text,
.legend-item.active .legend-count,
.legend-item.active .legend-percent {
    color: white;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-color.both { background: #28A745; }
.legend-color.rdap { background: #3498FB; }
.legend-color.whois { background: #F39C12; }
.legend-color.none { background: #8B0000; }

.legend-text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.legend-count {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    min-width: 30px;
    text-align: right;
}

.legend-percent {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 35px;
    text-align: right;
    font-weight: 500;
}

/* TLD Type Filters */
.tld-type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.type-filter-btn {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.type-filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.type-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(52, 152, 251, 0.3);
}

/* Results Section and Table Width Fix */
.results-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.table-responsive {
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
}

.results-table {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.mobile-results {
    max-width: 1200px;
    margin: 0 auto;
}

/* Mobile Compatibility */
@media (max-width: 768px) {
    .map-controls {
        gap: 12px;
    }
    
    .map-filters {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .tld-type-filters {
        gap: 4px;
    }
    
    .type-filter-btn {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .map-container {
        padding: 15px;
        min-height: 300px;
        grid-template-columns: repeat(30, 1fr);
        gap: 3px;
        grid-auto-rows: 18px;
    }
    
    .health-dot {
        width: 10px;
        height: 10px;
    }
    
    .health-dot:hover {
        transform: scale(1.8);
    }
    
    .stats-legend {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .legend-item {
        padding: 6px 10px;
    }
    
    .stacked-bar {
        height: 35px;
    }
    
    .segment-label {
        font-size: 0.7rem;
    }
    
    .results-section {
        padding: 0 15px;
    }
    
    .table-responsive {
        max-width: 100%;
        padding: 0 10px;
    }
}

/* Switch to mobile list layout for screens under 1100px */
@media (max-width: 1100px) {
    /* Hide the dot grid on smaller screens */
    .health-dot {
        display: none;
    }
    
    /* Show mobile-friendly TLD list instead */
    .mobile-tld-list {
        display: block !important;
    }
    
    .mobile-list-header {
        display: block !important;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        position: sticky;
        top: 0;
        z-index: 3;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    
    .map-container {
        display: flex;
        flex-direction: column;
        padding: 16px 12px;
        min-height: 300px;
        max-height: 400px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .map-controls {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .map-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 10px 6px;
        font-size: 0.75rem;
        min-height: var(--touch-target);
        border-radius: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        touch-action: manipulation;
        transition: all 0.2s ease;
    }
    
    .filter-btn:active {
        transform: scale(0.95);
    }
    
    .tld-type-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    
    .type-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 8px 4px;
        font-size: 0.7rem;
        min-height: 36px;
        border-radius: 6px;
        touch-action: manipulation;
        transition: all 0.2s ease;
    }
    
    .type-filter-btn:active {
        transform: scale(0.95);
    }
    
    .mobile-tld-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
        min-height: var(--touch-target);
        touch-action: manipulation;
        position: relative;
        z-index: 2;
    }
    
    .mobile-tld-item:last-child {
        border-bottom: none;
    }
    
    .mobile-tld-name {
        font-weight: 600;
        color: var(--text-primary);
        font-size: 0.9rem;
    }
    
    .mobile-tld-status {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.8rem;
        color: var(--text-secondary);
    }
    
    .mobile-status-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 1px solid rgba(0,0,0,0.2);
        flex-shrink: 0;
    }
    
    .stacked-bar {
        height: 30px;
    }
    
    .segment-label {
        display: none;
    }
    
    .stats-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .results-section {
        padding: 0 10px;
    }
    
    .table-responsive {
        padding: 0 5px;
    }
}

/* Coverage Heatmap */
.heatmap-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.heatmap-btn {
    padding: 12px 24px;
    border: 2px solid var(--border);
    background: var(--background);
    color: var(--text-secondary);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.heatmap-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.heatmap-btn:hover::before {
    left: 100%;
}

.heatmap-btn.active,
.heatmap-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 251, 0.3);
}

.heatmap-container {
    margin-top: 20px;
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.heatmap-view {
    display: block;
    padding: 24px;
}

.heatmap-row {
    display: grid;
    grid-template-columns: 200px 1fr 100px;
    gap: 20px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
}

.heatmap-row:last-child {
    border-bottom: none;
}

.heatmap-row:hover {
    background: var(--surface);
    transform: translateX(8px);
    border-radius: 8px;
    margin: 0 -8px;
    padding: 16px 8px;
}

.category-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-label::before {
    content: '';
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: var(--primary);
}

.heatmap-bar {
    height: 24px;
    border-radius: 12px;
    background: var(--border);
    overflow: hidden;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.heat-segment {
    height: 100%;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.heat-segment::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
}

.heat-segment.rdap { 
    background: linear-gradient(135deg, #3498FB, #2980B9); 
}
.heat-segment.whois { 
    background: linear-gradient(135deg, #F39C12, #E67E22); 
}
.heat-segment.stealth { 
    background: linear-gradient(135deg, #9B59B6, #8E44AD); 
}
.heat-segment.none { 
    background: linear-gradient(135deg, #DC3545, #C0392B); 
}

.heatmap-row {
    cursor: pointer;
}

.heatmap-row:hover .heat-segment {
    filter: brightness(1.1);
}

.heatmap-row.filtered {
    opacity: 0.3;
    pointer-events: none;
}

.coverage-percent {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.heatmap-summary {
    padding: 20px 24px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

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

.summary-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.summary-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* TLD Details Modal */
.tld-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--background);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.detail-value.working {
    background: #28A745;
    color: white;
}

.detail-value.down {
    background: #DC3545;
    color: white;
}

.detail-value.unavailable {
    background: var(--border);
    color: var(--text-secondary);
}

.detail-value.stealth {
    background: #9B59B6;
    color: white;
}

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

.url-item {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background: var(--surface);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    word-break: break-all;
}

/* Stealth Dashboard */
.stealth-dashboard {
    background: var(--background);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.stealth-header {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
    color: white;
    padding: 24px;
    text-align: center;
}

.stealth-header h3 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.stealth-description {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

.stealth-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.stealth-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stealth-stat .stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stealth-stat .stat-content {
    flex: 1;
}

.stealth-stat .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #9B59B6;
    line-height: 1;
    margin-bottom: 4px;
}

.stealth-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stealth-chart-container {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.stealth-tlds {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.stealth-tlds h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

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

.stealth-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stealth-item:hover {
    background: #9B59B6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.2);
}

.tld-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.stealth-url {
    font-size: 0.8rem;
    opacity: 0.8;
    font-family: 'Courier New', monospace;
}

.stealth-item:hover .stealth-url {
    opacity: 1;
}

.stealth-insights {
    padding: 24px;
}

.insight-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.insight-box h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.insight-box ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.insight-box li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.insight-box li:last-child {
    margin-bottom: 0;
}

.insight-box strong {
    color: var(--text-primary);
}

.stealth-controls {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    margin-top: 20px;
}

.stealth-controls h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.control-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.control-buttons .btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--background);
    border-color: var(--primary);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scan-result {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.scan-status {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.scan-success {
    color: #28A745;
    font-weight: 600;
}

.scan-error {
    color: #DC3545;
    font-weight: 600;
}

.status-item {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Chart tabs */
.charts-tabs { margin-top: 14px; margin-bottom: 32px; }
.tabs-nav { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tab-btn {
    background: var(--surface, #FAFBFC);
    color: var(--text-secondary);
    border: 1px solid var(--border, #E8EAED);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}
.tab-btn.active { color: var(--text-primary); border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }



.chart-wrapper {
    background: var(--surface, #FAFBFC);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
}

.chart-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a, #3498fb, #87ceeb, #3498fb, #1e3a8a);
    background-size: 200% 100%;
    animation: blueShift 3s ease-in-out infinite;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

.chart-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.1);
}

.chart-wrapper h3 {
    padding: 24px 24px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #000000);
    text-align: center;
    margin-bottom: 0;
}

.chart-container {
    padding: 20px 24px 24px;
    background: transparent;
    height: 300px;
    position: relative;
}

.chart-container canvas {
    border: none !important;
    outline: none !important;
}

/* Results Section */
.results-section {
    background: var(--surface, #FAFBFC);
    border: 1px solid var(--border, #E8EAED);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px var(--shadow, rgba(52, 152, 251, 0.08));
    position: relative;
    overflow: hidden;
    overflow-x: hidden;
    margin-bottom: 100px;
}

.results-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #3498FB), #5A9FD4, var(--primary, #3498FB));
}

.results-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
    text-align: center;
    position: relative;
}

.results-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: 16px;
    background: var(--surface, #FAFBFC);
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    border: none;
    max-width: 100%;
    width: 100%;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.875rem;
    background: var(--surface, #FAFBFC);
    border-radius: 16px;
    overflow: hidden;
}

.results-table th {
    background: linear-gradient(135deg, var(--primary, #3498FB) 0%, #2980D9 100%);
    color: white;
    padding: 20px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-table th:first-child,
.results-table th:last-child {
    text-align: center;
}

.results-table th:first-child {
    border-top-left-radius: 16px;
}

.results-table th:last-child {
    border-top-right-radius: 16px;
}

.results-table td {
    padding: 16px;
    border: 0;
    background: var(--surface, #FAFBFC);
    vertical-align: middle;
    text-align: center;
    line-height: 1.5;
    transition: none;
    height: 54px;
}

.results-table td:first-child,
.results-table td:last-child {
    text-align: left;
}

.results-table tbody tr {
    /* No transition for instant response */
}

.results-table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.02);
}

.results-table tbody tr:hover {
    /* Minimal hover state for performance */
}

.results-table tbody tr:hover td {
    background: rgba(52, 152, 251, 0.08) !important;
    border: 0 !important;
}

.results-table tbody tr:hover td:first-child {
    border-radius: 12px 0 0 12px !important;
    border-right: 0 !important;
}

.results-table tbody tr:hover td:last-child {
    border-radius: 0 12px 12px 0 !important;
    border-left: 0 !important;
}

.results-table tbody tr:hover td:not(:first-child):not(:last-child) {
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
}

.results-table tr:last-child td {
    border-bottom: none;
}

/* Remove rounded corners from table rows since container is rounded */
.results-table tr:last-child td:first-child,
.results-table tr:last-child td:last-child {
    border-radius: 0;
}

/* Override for new table container */
.table-container .results-table tr:last-child td:first-child,
.table-container .results-table tr:last-child td:last-child {
    border-radius: 0;
}

/* Desktop TLD Search Interface */
.desktop-search-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin: 0 auto 16px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 1200px;
    width: 100%;
}

.desktop-tld-search {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    background: var(--background);
    color: var(--text-primary);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.desktop-tld-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 251, 0.1), inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Hide desktop search on mobile */
@media (max-width: 1100px) {
    .desktop-search-header {
        display: none;
    }
    
    .table-container {
        display: none;
    }
}

/* Hide filtered table rows */
.tld-row.filtered-out {
    display: none;
}

/* Separated table header and scrolling body */
.table-container {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

.table-header {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    position: relative;
    z-index: 10;
}

.results-table-header {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.results-table-header th {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    border: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Table column layout - shared for header and body */
.results-table-header {
    padding-right: 12px; /* Account for scrollbar */
}

.results-table-header th:first-child,
.table-container .results-table td:first-child {
    width: 100px;
    padding-left: 16px;
}

.results-table-header th:nth-child(2),
.results-table-header th:nth-child(3),
.results-table-header th:nth-child(4),
.results-table-header th:nth-child(5),
.table-container .results-table td:nth-child(2),
.table-container .results-table td:nth-child(3),
.table-container .results-table td:nth-child(4),
.table-container .results-table td:nth-child(5) {
    width: 90px;
    text-align: center;
}

.results-table-header th:last-child,
.table-container .results-table td:last-child {
    width: auto;
    min-width: 300px;
    padding-right: 16px;
}

/* Last column text wrapping */
.table-container .results-table td:last-child {
    white-space: normal;
    word-break: break-word;
}

.table-body-container {
    height: 600px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.results-table {
    width: 100% !important;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed !important;
    min-width: 100%;
    max-width: 100%;
}

/* Zebra stripe rows */
.table-container .results-table tbody tr {
    background: var(--background);
}

.table-container .results-table tbody tr:nth-child(even),
.table-container .results-table tbody tr:nth-child(even) td {
    background: var(--surface);
}

/* Simple instant hover - no transitions */
.table-container .results-table tbody tr:hover {
    background: var(--accent-hover) !important;
}

.table-container .results-table tbody tr:hover td {
    background: var(--accent-hover) !important;
}

/* Remove all rounded corners from table cells */
.table-container .results-table td,
.table-container .results-table-header th {
    border-radius: 0 !important;
}

.table-container .results-table td {
    padding: 12px;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Override table cell color for status spans */
.table-container .results-table td span.status-yes {
    color: #28A745 !important;
}

.table-container .results-table td span.status-no {
    color: #DC3545 !important;
}

/* Ensure header visibility in both themes */
[data-theme="light"] .results-table-header th {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .results-table-header th {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
}


/* Add bottom padding to results section */
.results-section {
    padding-bottom: 40px;
}

/* Custom scrollbar for table body container */
.table-body-container::-webkit-scrollbar {
    width: 12px;
}

.table-body-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0;
}

.table-body-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.table-body-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
    background-clip: content-box;
}

/* Theme-specific scrollbar colors */
[data-theme="light"] .table-body-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

[data-theme="light"] .table-body-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

[data-theme="dark"] .table-body-container::-webkit-scrollbar-thumb {
    background: #404040;
}

[data-theme="dark"] .table-body-container::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

/* Firefox scrollbar support */
.table-body-container {
    scrollbar-width: thin;
}

[data-theme="light"] .table-body-container {
    scrollbar-color: #404040 transparent;
}

[data-theme="dark"] .table-body-container {
    scrollbar-color: #3498fb transparent;
}
}

/* Status Badges */
.table-container .results-table td .status-yes {
    color: #28A745 !important;
    font-weight: 600;
}

.table-container .results-table td .status-no {
    color: #DC3545 !important;
    font-weight: 600;
}

.status-untested {
    color: var(--text-muted, #6B7280);
    font-weight: 500;
    font-style: italic;
}

.no-data {
    color: var(--text-muted, #6B7280);
    font-style: italic;
    opacity: 0.6;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    vertical-align: middle;
    display: inline-block;
}

.url-cell {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--primary, #3498FB);
    word-break: break-all;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(52, 152, 251, 0.3);
    text-underline-offset: 3px;
}

.url-cell:hover {
    text-decoration-color: var(--primary);
    color: #3498fb;
}

.url-list-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.url-item-cell {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent, rgba(52, 152, 251, 0.04));
    border: 1px solid var(--border, #E8EAED);
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.3;
}

.url-item-cell:hover {
    background: var(--accent-hover, rgba(52, 152, 251, 0.08));
}



/* Mobile Cards */
.mobile-results {
    display: none;
}

.tld-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.tld-card::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 3px;
    background: linear-gradient(90deg, #1e3a8a, #3498fb, #87ceeb, #3498fb, #1e3a8a);
    background-size: 200% 100%;
    animation: blueShift 3s ease-in-out infinite;
    border-radius: 10px 10px 0 0;
    z-index: 1;
}

.tld-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--shadow-hover);
    border-color: var(--primary);
}

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

.tld-name {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
}

.tld-status {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.rdap-yes {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-badge.rdap-no {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.status-badge.working-yes {
    background: rgba(52, 152, 251, 0.1);
    color: var(--primary);
    border: 1px solid rgba(52, 152, 251, 0.2);
}

.status-badge.working-no {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.tld-details {
    display: grid;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    flex-shrink: 0;
    min-width: 80px;
}

.detail-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.8125rem;
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
    flex: 1;
}

.server-url {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--accent);
    padding: 6px 10px;
    border-radius: 6px;
    word-break: break-all;
    border: 1px solid var(--border);
}

/* Generated Time */
.generated-time {
    text-align: center;
    margin-top: 32px;
    padding: 16px;
    background: var(--accent);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .header {
        margin-bottom: 32px;
    }

    h1 {
        font-size: 2.25rem;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 32px;
    }

    .stat-card {
        padding: 16px;
    }

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

    .charts-container {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }

    .chart-container {
        height: 250px;
        padding: 16px 20px 20px;
    }
    
    /* Ensure blue lines are visible on mobile chart wrappers */
    .chart-wrapper::before {
        height: 3px;
        background: linear-gradient(90deg, #1e3a8a, #3498fb, #87ceeb, #3498fb, #1e3a8a);
        background-size: 200% 100%;
        animation: blueShift 3s ease-in-out infinite;
        border-radius: 16px 16px 0 0;
    }

    /* Old mobile theme toggle styles removed */

    /* Mobile: hide table, show cards */
    .table-responsive {
        display: none !important;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .mobile-results {
        display: block;
    }

    .downloads-wrapper {
        margin-bottom: 16px;
    }

    .downloads-section {
        padding: 16px 0;
    }

    .downloads-section h2 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .download-grid {
        gap: 8px;
    }

    .download-btn {
        min-width: 70px;
        padding: 6px 12px;
        font-size: 0.8125rem;
    }

    .stats-grid {
        padding: 32px 20px;
        /* Clean mobile layout without masking */
        border-radius: 20px;
        margin: 0 8px 32px 8px;
    }

    .stat-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 8px;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }
    
    .results-section {
        max-width: 90%;
        border-radius: 12px;
        margin-top: 20px;
    }
    
    .results-section h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-icon {
        width: 24px;
        height: 24px;
        margin-bottom: 6px;
    }

    .stat-value {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .stat-label {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    /* Card fill effects work the same on mobile */

    .chart-container {
        height: 200px;
        padding: 12px 16px 16px;
    }

    .tld-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tld-status {
        width: 100%;
        justify-content: flex-start;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .detail-value {
        text-align: left;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

/* Focus and accessibility */
.download-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Header Menu Styles */
.header-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--surface, #FAFBFC);
    border-bottom: 1px solid var(--border, rgba(52, 152, 251, 0.1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 10;
    min-width: 0;
    flex: 1;
}

.logo img {
    transition: opacity 0.3s ease;
    border-radius: 4px;
    flex-shrink: 0;
    display: block;
    z-index: 10;
}

/* Logo theme switching */
.logo-light {
    display: block;
}

.logo-dark {
    display: none !important;
}

[data-theme="dark"] .logo-light {
    display: none !important;
}

[data-theme="dark"] .logo-dark {
    display: block !important;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #000000);
    margin: 0;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary, #000000);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.nav-btn:focus {
    outline: none;
    box-shadow: none;
}

.nav-btn:focus-visible {
    outline: 2px solid var(--primary, #3498FB);
    outline-offset: 2px;
}

/* Theme toggle button matches other nav buttons */
.nav-btn.theme-toggle {
    padding: 8px 12px;
    min-width: auto;
}

.nav-btn:hover {
    background: var(--hover, rgba(52, 152, 251, 0.1));
    color: var(--primary, #3498FB);
}

.nav-btn svg {
    flex-shrink: 0;
}

/* Mobile Hamburger */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary, #000000);
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--surface, #FAFBFC);
    border-top: 1px solid var(--border, rgba(52, 152, 251, 0.1));
    padding: 16px 24px;
    gap: 8px;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary, #000000);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.mobile-nav-btn:hover {
    background: var(--hover, rgba(52, 152, 251, 0.1));
    color: var(--primary, #3498FB);
}

.mobile-nav-btn:focus {
    outline: none;
    box-shadow: none;
}

.mobile-nav-btn:focus-visible {
    outline: 2px solid var(--primary, #3498FB);
    outline-offset: 2px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--surface, #FAFBFC);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    margin: 20px;
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border, rgba(52, 152, 251, 0.1));
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #000000);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary, #6B7280);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--hover, rgba(52, 152, 251, 0.1));
    color: var(--text-primary, #000000);
}

.modal-body {
    padding: 16px 24px 24px;
}

.modal-body p {
    margin: 0 0 16px;
    color: var(--text-secondary, #6B7280);
    font-size: 0.875rem;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border, rgba(52, 152, 251, 0.1));
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary, #000000);
    transition: all 0.2s ease;
}

.download-option:hover {
    border-color: var(--primary, #3498FB);
    background: var(--hover, rgba(52, 152, 251, 0.05));
    transform: translateY(-1px);
}

.download-option svg {
    color: var(--primary, #3498FB);
    flex-shrink: 0;
}

.download-option div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.download-option strong {
    font-weight: 600;
    font-size: 0.875rem;
}

.download-option span {
    font-size: 0.75rem;
    color: var(--text-secondary, #6B7280);
}

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

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile Responsive for Header */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .hamburger-btn {
        display: flex;
    }
    
    .header-content {
        padding: 0 16px;
    }
    
    .logo h1 {
        font-size: 1.25rem;
        display: block !important;
        visibility: visible !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 250px;
    }
}

/* API Documentation Styles */
.api-docs {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 0;
}

.api-docs h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary, #000000);
    margin-bottom: 16px;
    text-align: center;
}

.api-intro {
    font-size: 1.125rem;
    color: var(--text-secondary, #6B7280);
    text-align: center;
    margin-bottom: 48px;
    line-height: 1.6;
}

.api-section {
    margin-bottom: 48px;
    background: var(--surface, #FAFBFC);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border, rgba(52, 152, 251, 0.1));
}

.api-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary, #000000);
    margin-bottom: 24px;
    border-bottom: 2px solid var(--primary, #3498FB);
    padding-bottom: 8px;
}

.endpoint {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--background, #FFFFFF);
    border-radius: 12px;
    border: 1px solid var(--border, rgba(52, 152, 251, 0.1));
}

.endpoint:last-child {
    margin-bottom: 0;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.method {
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method.get {
    background: #10B981;
    color: white;
}

.endpoint-url {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary, #3498FB);
    background: var(--hover, rgba(52, 152, 251, 0.1));
    padding: 8px 16px;
    border-radius: 8px;
}

.endpoint p {
    color: var(--text-secondary, #6B7280);
    line-height: 1.6;
    margin-bottom: 0;
}

.code-block {
    margin-top: 20px;
    background: #1F2937;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border, rgba(52, 152, 251, 0.1));
}

.code-block h4 {
    background: var(--primary, #3498FB);
    color: white;
    margin: 0;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    background: #1F2937;
}

.code-block code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #F8F9FA;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: var(--background, #FFFFFF);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border, rgba(52, 152, 251, 0.1));
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border, rgba(52, 152, 251, 0.1));
}

.data-table th {
    background: var(--hover, rgba(52, 152, 251, 0.05));
    font-weight: 600;
    color: var(--text-primary, #000000);
    font-size: 0.875rem;
}

.data-table td {
    color: var(--text-secondary, #6B7280);
    font-size: 0.875rem;
}

.data-table td code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    background: var(--hover, rgba(52, 152, 251, 0.1));
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--primary, #3498FB);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.info-box {
    background: var(--hover, rgba(52, 152, 251, 0.05));
    border: 1px solid var(--border, rgba(52, 152, 251, 0.2));
    border-radius: 12px;
    padding: 20px;
}

.info-box p {
    margin: 8px 0;
    color: var(--text-secondary, #6B7280);
    font-size: 0.875rem;
    line-height: 1.6;
}

.info-box p:first-child {
    margin-top: 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.example {
    margin-bottom: 32px;
}

.example:last-child {
    margin-bottom: 0;
}

.example h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #000000);
    margin-bottom: 16px;
}

/* Dark theme adjustments for API docs */
[data-theme="dark"] .api-section {
    background: var(--surface, #393B4E);
}

[data-theme="dark"] .endpoint {
    background: var(--background, #2D2F36);
}

[data-theme="dark"] .data-table {
    background: var(--background, #2D2F36);
}

[data-theme="dark"] .data-table th {
    background: var(--hover, rgba(52, 152, 251, 0.1));
}

/* Dark theme results table alternating rows */
[data-theme="dark"] .results-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}

/* Dark theme table hover effects */
[data-theme="dark"] .results-table tbody tr:hover td {
    background: rgba(52, 152, 251, 0.1) !important;
}

[data-theme="dark"] .code-block {
    background: #1F2937;
}

/* Mobile responsive for API docs */
@media (max-width: 768px) {
    .api-docs {
        padding: 24px 0;
    }
    
    .api-docs h1 {
        font-size: 2rem;
    }
    
    .api-section {
        padding: 24px 16px;
        margin-bottom: 32px;
    }
    
    .endpoint {
        padding: 20px 16px;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .endpoint-url {
        font-size: 0.875rem;
        word-break: break-all;
    }
    
    .code-block pre {
        padding: 16px;
        font-size: 0.8rem;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
        min-width: 120px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stat-card, .results-section {
        border-width: 2px;
    }
    
    .chart-wrapper {
        box-shadow: 0 0 0 2px var(--border);
    }
    
    .status-badge {
        border-width: 1px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    /* Disable complex animations while keeping essential transitions */
    .gradientShift,
    .fade-in {
        animation: none !important;
    }
    
    /* Reduce transition durations but don't eliminate them entirely */
    *, *::before, *::after {
        animation-duration: 0.1s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.1s !important;
    }
    
    /* Keep focus transitions for accessibility */
    :focus-visible {
        transition-duration: 0.15s !important;
    }
}