/* Premium UI Overrides & Enhancements */

:root {
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-muted: #94a3b8;
}


/* Header & Branding Optimization */
.navbar {
    height: 60px !important;
    padding: 0 16px !important;
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    /* Consistency for centering menu */
}

.brand-main {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.brand-main:hover {
    transform: translateY(-1px);
}

.brand-logo {
    height: 24px;
    /* Reduced from 28px for a more balanced look */
    width: auto;
    filter: drop-shadow(0 0 8px var(--primary));
    transition: transform 0.2s ease;
}

.brand-partner a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-main h1 {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    margin: 0 !important;
    color: white !important;
    white-space: nowrap;
}

/* Tab & Header SVG Icons */
.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-icon {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nav-tab.active .tab-icon {
    opacity: 1;
    color: var(--primary);
}

.header-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.3));
}

.btn-icon-svg {
    margin-right: 6px;
    vertical-align: middle;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-divider {
    height: 20px;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.brand-main {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-title {
    font-size: 1.1rem !important;
    /* Smaller text size */
    margin: 0;
    letter-spacing: 2px !important;
    font-weight: 800;
}

.brand-logo {
    height: 24px;
    width: auto;
}

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

.pb-label {
    font-size: 10.4px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    display: flex;
    align-items: center;
}

/* Nav Actions Spacing */
.nav-actions {
    display: flex !important;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    min-width: 200px;
    /* Balance with brand width roughly */
}

/* Ensure no inner gaps push them apart */
.theme-switcher,
.lang-switcher {
    display: flex;
    align-items: center;
}

.partner-logo {
    height: 18px !important;
    /* Restored size */
    width: auto;
    filter: brightness(0) invert(1);
}

.nav-actions-mobile {
    display: none;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2100;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Mobile Nav Tray & Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-tray {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border-color);
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-nav-tray.active {
    transform: translateX(-320px);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.close-mobile-menu {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
}

.mobile-nav-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.mobile-section-label {
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.mobile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-item svg {
    color: var(--primary);
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.mobile-nav-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.mobile-setting-group {
    display: flex;
    gap: 0.8rem;
}

.mobile-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
}

.company-name {
    font-weight: 800 !important;
    letter-spacing: 0.5px;
}

/* Compact Dashboard */
.dashboard {
    margin-top: 65px !important;
    gap: 0.8rem !important;
    padding: 0 0.8rem 0.8rem !important;
}

.card {
    padding: 1rem !important;
    margin-bottom: 0.8rem !important;
}

.card-header {
    margin-bottom: 0.8rem !important;
    padding-bottom: 0.6rem !important;
}

/* Compact Map Containers */
.premium-map {
    height: 380px !important;
    /* Extremely compact as requested */
    background: #000 !important;
}

/* Premium Map Popups (2D) */
.map-popup-premium {
    min-width: 200px;
    color: #fff;
    padding: 0.2rem;
}

.popup-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.4rem;
    padding-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-body strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.popup-body small {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.popup-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
    font-size: 0.65rem;
}

.latency-pill {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    color: #fff;
}

.latency-pill.fast {
    background: #2563eb;
}

.latency-pill.moderate {
    background: #16a34a;
}

.latency-pill.slow {
    background: #dc2626;
}

/* Premium Leaflet Popup Style */
.leaflet-popup-content-wrapper {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary) !important;
    border-radius: 10px !important;
    color: #fff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

.leaflet-popup-tip {
    background: var(--primary) !important;
}

/* Redesigned Map Toggle Buttons */
.map-controls-premium {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.map-toggle {
    padding: 4px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

.map-toggle.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Progress Indicator */
.progress-soft {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    margin-right: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

.spinner-small {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Map Overlap Fixes */
.map-hidden {
    display: none !important;
}

#download-capture-area {
    position: relative;
    height: 380px;
    /* Force height so absolute children don't collapse it */
    overflow: hidden;
}

#map-2d,
#map-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#map-2d {
    z-index: 10;
}

#map-3d {
    z-index: 5;
}

#map-2d:not(.map-hidden) {
    display: block !important;
    z-index: 15;
}

#map-3d:not(.map-hidden) {
    display: flex !important;
    z-index: 15;
}

/* Action Buttons Refinement */
.btn-action {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

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

.btn-action:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Terminal Styling */
#raw-output-container {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(5, 5, 5, 0.98) !important;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.9) !important;
}

#close-raw {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#close-raw:hover {
    background: #ef4444;
    border-color: #ef4444;
}

/* Navbar Tabs */
.nav-tab {
    font-size: 0.8rem !important;
    padding: 0.5rem 1rem !important;
}

.nav-tab.active {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
}

/* --- Analysis Report Presentation --- */
.conclusion-overlay {
    background-color: #050505 !important;
    background: linear-gradient(135deg, #050505 0%, #0a0a0a 100%) !important;
    border: 2px solid var(--primary) !important;
    padding: 3rem !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    position: relative !important;
    /* Sit below map in capture area */
    width: 100% !important;
    box-sizing: border-box !important;
    z-index: 100 !important;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.report-badge {
    background: var(--primary);
    color: #fff;
    padding: 3px 12px;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.conclusion-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem !important;
    letter-spacing: 6px !important;
    color: var(--primary) !important;
}

.conclusion-summary {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: #fff !important;
    font-weight: 500 !important;
    margin: 1rem 0 !important;
}

.report-raw-section {
    background: rgba(0, 0, 0, 0.8) !important;
    /* Darker, more opaque background */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin-top: 2rem;
}

.report-label {
    font-size: 0.6rem;
    color: var(--primary);
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

.report-raw-pre {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    color: #00ff00;
    opacity: 0.8;
}

.report-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.conclusion-footer {
    font-size: 0.7rem !important;
    color: var(--text-muted) !important;
}

.report-ad {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: normal !important;
    /* REMOVE ITALICS */
}

.report-ad a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid var(--primary);
}

/* Compact Traceroute Table Styling */
#traceroute-table td {
    padding: 0.45rem 0.6rem !important;
    font-size: 0.8rem !important;
}

#traceroute-table .hop-badge {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.7rem !important;
}

#traceroute-table .text-muted small {
    font-size: 0.65rem !important;
    opacity: 0.7;
}

#traceroute-table strong {
    font-size: 0.8rem !important;
}

#traceroute-table .latency {
    font-size: 0.9rem !important;
}

/* Professional Table Polish */
#traceroute-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

#traceroute-table thead th {
    padding: 0.5rem 0.6rem !important;
    font-size: 0.65rem !important;
    background: rgba(0, 0, 0, 0.2);
}

/* --- Realistic Animation Toggle --- */
.setting-item {
    margin-top: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.label-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-title {
    font-size: 17.6px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-badge {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    padding: 2px 6px !important;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    line-height: 1;
}

.label-text {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    line-height: 1;
}

.toggle-switch {
    position: relative;
    width: 34px;
    height: 18px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 18px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(16px);
}

/* Expanded Stats Grid for Ping */
.ping-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* Sparkline & Trends */
.stat-trend-spark {
    height: 40px !important;
    width: 100%;
    margin-top: 5px;
}

.sparkline-container {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 100%;
    width: 100%;
}

.spark-bar {
    flex: 1;
    min-width: 1px;
    background: var(--primary);
    border-radius: 1px 1px 0 0;
    transition: height 0.3s ease;
}

.spark-bar.fast {
    background: #22c55e;
}

.spark-bar.moderate {
    background: #eab308;
}

.spark-bar.slow {
    background: #ef4444;
}

/* Info Icon & Tooltip */
.info-icon {
    cursor: help;
    font-size: 0.85rem;
    color: var(--primary);
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-icon:hover {
    opacity: 1;
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background: #0a0a0a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-family: 'Poppins', sans-serif;
    white-space: normal;
    width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Phase 8: Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-arrow {
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

/* Invisible bridge to prevent closing on hover */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    text-align: left;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
    transform: translateX(4px);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Phase 7 & 8: New Result Grids */
/* Responsive Breakpoints */
@media (max-width: 1024px) {

    .nav-menu {
        display: none !important;
    }

    .nav-actions {
        display: flex !important;
        gap: 8px;
        order: 2;
        margin-left: auto;
    }

    .theme-switcher {
        display: none !important;
    }

    .nav-actions-mobile {
        display: flex !important;
        order: 3;
        margin-left: 0 !important;
    }

    .brand-divider {
        margin: 0 8px;
    }

    .sidebar {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .dashboard {
        margin-top: 80px !important;
    }

    .mobile-nav-tray {
        width: 100%;
        right: -100%;
    }

    .mobile-nav-tray.active {
        transform: translateX(-100%);
    }

    .premium-map {
        height: 300px !important;
    }
}

.risk-section {
    border-radius: 8px;
    padding: 1rem;
}

.risk-badge {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
}

.risk-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.risk-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.risk-badge.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.risk-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.risk-value {
    font-weight: 800;
}

/* Phase 10: Hosting Guide Section */
.guide-card {
    margin-top: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
}

.guide-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 600;
}

.guide-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}

.guide-content strong {
    color: #bfdbfe;
    font-weight: 500;
}

.stat-card-wide {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .nav-container {
        padding: 0 10px !important;
        gap: 5px !important;
    }

    .brand {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        flex: 1;
        min-width: 0;
    }

    .brand-main {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .brand-title {
        font-size: 14px !important;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .brand-divider {
        display: none !important;
    }

    .brand-partner {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
        margin-left: 34px !important;
        /* Align with the start of 'NETTRACER' */
    }

    .pb-label {
        font-size: 8px !important;
        max-width: none !important;
        width: auto !important;
        white-space: nowrap !important;
        line-height: 1;
    }

    .partner-logo {
        height: 12px !important;
    }

    .nav-actions {
        gap: 6px !important;
    }

    #current-lang-name {
        display: none !important;
    }
}

.stat-card-wide {
    grid-column: span 1;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    align-items: center;
}

.toast-notification {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
    animation: toast-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-notification.fading {
    opacity: 0;
    transform: translateY(-10px);
}

@keyframes toast-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}