
/* ========== Style Block 1 ========== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body {
            width: 100%;
            overflow-x: hidden;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #f5f5f7;
            color: #1d1d1f;
        }

        /* Navigation */
        .nav {
            background: white;
            padding: 20px 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            position: sticky;
            top: 0;
            z-index: 100;
            margin-bottom: 40px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 24px;
            font-weight: 700;
            color: #667eea;
            text-decoration: none;
        }

        .nav-links {
            display: flex;
            gap: 40px;
            align-items: center;
        }

        .nav-links a {
            color: #1d1d1f;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s;
        }

        .nav-links a:hover {
            color: #667eea;
        }

        .nav-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 8px;
            font-size: 18px;
            transition: transform 0.2s;
        }

        .nav-links a:hover .nav-icon {
            transform: scale(1.15);
        }

        .container {
            max-width: 900px;
            margin: 0 auto 40px;
            padding: 0 40px;
        }

        .container-wide {
            width: 100%;
            margin: 0;
            padding: 0;
        }

        .card {
            background: white;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
            margin-bottom: 30px;
        }

        .search-card {
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            color: #333;
            padding: 20px 30px;
        }

        .search-header {
            display: none;
        }

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

        .dropdown-group {
            flex: 1;
            min-width: 200px;
        }

        .modern-select {
            width: 100%;
            padding: 14px 18px;
            font-size: 15px;
            font-weight: 600;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: white;
            border: 2px solid #e8e8e8;
            border-radius: 10px;
            color: #1d1d1f;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            appearance: none;
            background-image: url("data:svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23667eea' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 45px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        .modern-select:hover:not(:disabled) {
            border-color: #667eea;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
            transform: translateY(-1px);
        }

        .modern-select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
            transform: translateY(-1px);
        }

        .modern-select:disabled {
            background: #f8f9fa;
            cursor: not-allowed;
            color: #9ca3af;
            opacity: 0.6;
            border-color: #e8e8e8;
        }

        /* Custom dropdown styling */
        .custom-dropdown {
            position: relative;
            width: 100%;
        }

        .custom-dropdown-selected {
            width: 100%;
            padding: 14px 18px;
            font-size: 15px;
            font-weight: 600;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: white;
            border: 2px solid #e8e8e8;
            border-radius: 10px;
            color: #1d1d1f;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            user-select: none;
        }

        .custom-dropdown-selected.disabled {
            background: #f8f9fa;
            cursor: not-allowed;
            color: #9ca3af;
            opacity: 0.6;
            pointer-events: none;
        }

        .custom-dropdown-selected:not(.disabled):hover {
            border-color: #667eea;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
            transform: translateY(-1px);
        }

        .custom-dropdown-selected.active {
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
        }

        .custom-dropdown-arrow {
            width: 16px;
            height: 16px;
            transition: transform 0.3s;
        }

        .custom-dropdown-selected.active .custom-dropdown-arrow {
            transform: rotate(180deg);
        }

        .custom-dropdown-options {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            background: white;
            border: 2px solid #667eea;
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
            max-height: 320px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
            animation: dropdownSlide 0.2s ease-out;
        }

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

        .custom-dropdown-options.show {
            display: block;
        }

        .custom-dropdown-option {
            padding: 12px 18px;
            font-size: 15px;
            font-weight: 500;
            color: #1d1d1f;
            cursor: pointer;
            transition: all 0.15s;
            border-bottom: 1px solid #f0f0f0;
        }

        .custom-dropdown-option:last-child {
            border-bottom: none;
        }

        .custom-dropdown-option:hover {
            background: linear-gradient(135deg, #f0f4ff 0%, #f8f0ff 100%);
            color: #667eea;
            padding-left: 24px;
        }

        .custom-dropdown-option.selected {
            background: #667eea !important;
            color: white !important;
            font-weight: 600;
        }
        
        .custom-dropdown-option.selected:hover {
            background: #667eea !important;
            color: white !important;
            padding-left: 18px !important;
        }

        .custom-dropdown-options::-webkit-scrollbar {
            width: 8px;
        }

        .custom-dropdown-options::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .custom-dropdown-options::-webkit-scrollbar-thumb {
            background: #667eea;
            border-radius: 10px;
        }

        .custom-dropdown-options::-webkit-scrollbar-thumb:hover {
            background: #5568d3;
        }

        .primary-button, .analyse-btn-modern {
            padding: 14px 28px;
            font-size: 15px;
            font-weight: 600;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            white-space: nowrap;
            flex-shrink: 0;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
        }

        .analyse-btn-modern:hover:not(:disabled) {
            background: #5568d3;
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
            transform: translateY(-2px);
        }

        .analyse-btn-modern:active:not(:disabled) {
            transform: translateY(0);
            box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
        }

        .analyse-btn-modern:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: #cbd5e1;
            box-shadow: none;
        }
        
        .primary-button:hover:not(:disabled) {
            background: #5568d3;
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
            transform: translateY(-2px);
        }
        
        .secondary-button {
            padding: 14px 28px;
            font-size: 15px;
            font-weight: 600;
            background: white;
            color: #667eea;
            border: 2px solid #667eea;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            white-space: nowrap;
            flex-shrink: 0;
        }
        
        .secondary-button:hover:not(:disabled) {
            background: #667eea;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
        }
        
        .secondary-button.saved {
            background: #10b981;
            border-color: #10b981;
            color: white;
        }
        
        .secondary-button.saved:hover {
            background: #059669;
            border-color: #059669;
        }
        
        .button-group {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        h1 {
            color: #1d1d1f;
            font-size: 36px;
            font-weight: 800;
            margin-bottom: 10px;
            letter-spacing: -0.02em;
        }

        .stats {
            color: #6e6e73;
            margin-bottom: 30px;
            font-size: 16px;
        }

        /* Hero Section - Global Market Pulse */
        .hero-section-wrapper {
            width: 100%;
            max-width: 1600px;
            margin: 0 auto 40px;
            padding: 0 20px;
        }
        
        .hero-section {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 24px;
            padding: 48px;
            color: white;
            box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
            position: relative;
            overflow: hidden;
        }

        .hero-section::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
            animation: pulse 4s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.1); opacity: 0.8; }
        }

        .hero-content {
            position: relative;
            z-index: 1;
        }

        .hero-headline {
            font-size: 36px;
            font-weight: 800;
            margin-bottom: 8px;
            letter-spacing: -0.02em;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .hero-subtitle {
            font-size: 18px;
            opacity: 0.95;
            margin-bottom: 32px;
            font-weight: 500;
        }

        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-bottom: 24px;
        }
        
        @media (max-width: 1400px) {
            .metrics-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        .metric-card {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            border-radius: 16px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            min-height: 140px;
            display: flex;
            flex-direction: column;
        }

        .metric-card:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        }

        .metric-card-label {
            font-size: 14px;
            opacity: 0.9;
            margin-bottom: 8px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .metric-card-value {
            font-size: 28px;
            font-weight: 800;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .metric-card-change {
            font-size: 14px;
            opacity: 0.9;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .change-positive {
            color: #86efac;
        }

        .change-negative {
            color: #fca5a5;
        }

        .metric-models {
            font-size: 16px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .metric-models span {
            opacity: 0.9;
        }

        .metric-brands-list {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-top: 8px;
        }

        .brand-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 8px 6px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 8px;
        }

        .brand-name {
            font-weight: 600;
            opacity: 0.95;
            font-size: 13px;
            margin-bottom: 4px;
        }

        .brand-price {
            font-weight: 700;
            opacity: 0.9;
            font-size: 14px;
            color: rgba(255, 255, 255, 0.95);
        }

        .insight-line {
            background: rgba(255, 255, 255, 0.1);
            border-left: 4px solid rgba(255, 255, 255, 0.6);
            padding: 16px 20px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 12px;
            animation: slideIn 0.5s ease-out;
        }

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

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

        .loading-shimmer {
            background: linear-gradient(
                90deg,
                rgba(255, 255, 255, 0.1) 0%,
                rgba(255, 255, 255, 0.3) 50%,
                rgba(255, 255, 255, 0.1) 100%
            );
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }

        @media (max-width: 768px) {
            .hero-section-wrapper {
                padding: 0 20px;
                margin-bottom: 30px;
            }
            
            .hero-section {
                padding: 32px 24px;
            }

            .hero-headline {
                font-size: 28px;
            }

            .metrics-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .metric-card-value {
                font-size: 24px;
            }
            
            .search-card {
                padding: 15px 20px;
            }

            .search-controls {
                flex-direction: column;
                gap: 10px;
            }

            .dropdown-group {
                min-width: 100%;
            }

            .analyse-btn-modern {
                width: 100%;
            }
        }


        /* Toast Notifications */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-width: 400px;
        }

        /* Toast notifications now use unified .scrape-status-toast system (see scrape-status.css) */

        @media (max-width: 768px) {
            .toast-container {
                right: 10px;
                left: 10px;
                max-width: none;
            }
        }

        .spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(102, 126, 234, 0.2);
            border-radius: 50%;
            border-top-color: #667eea;
            animation: spin 1s ease-in-out infinite;
        }

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

        /* Dashboard Section Styles */
        #dashboardSection {
            background: #f5f5f7;
            width: 100vw;
            margin-left: calc(-50vw + 50%);
            padding: 21px 0;
            box-sizing: border-box;
            display: flex;
            justify-content: center;
        }

        /* Analytics Cards Section */
        .analytics-section {
            margin-top: 0;
            width: 100%;
            max-width: 1600px;
            padding: 0 20px;
            margin: 0 auto;
        }

        .analytics-title {
            font-size: 36px;
            font-weight: 700;
            color: #000000;
            margin-bottom: 12px;
            letter-spacing: -1px;
        }

        .analytics-subtitle {
            font-size: 18px;
            color: #6e6e73;
            margin-bottom: 40px;
        }

        .analytics-section > .analytics-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 32px;
            justify-items: center;
        }

        @media (max-width: 1600px) {
            .analytics-section > .analytics-grid {
                grid-template-columns: repeat(3, minmax(300px, 500px));
            }
        }

        @media (max-width: 1200px) {
            .analytics-section > .analytics-grid {
                grid-template-columns: repeat(2, 1fr);
                max-width: 1100px;
            }
        }

        @media (max-width: 900px) {
            .analytics-section > .analytics-grid {
                grid-template-columns: 1fr;
                max-width: 550px;
            }
        }

        /* Segment-Oriented Cars Section with Tabs */
        .segments-section {
            grid-column: 1 / -1;
            background: white;
            border-radius: 24px;
            padding: 40px;
            margin: 40px 0;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
        }

        .segments-header {
            text-align: center;
            margin-bottom: 32px;
        }

        .segments-title {
            font-size: 36px;
            font-weight: 700;
            color: #1d1d1f;
            margin: 0 0 8px 0;
        }

        .segments-subtitle {
            font-size: 18px;
            color: #6b7280;
            margin: 0;
        }

        /* Tab Navigation */
        .segment-tabs {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 32px;
            padding-bottom: 24px;
            border-bottom: 2px solid #f0f0f0;
        }

        .segment-tab {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 14px 24px;
            background: #f5f5f7;
            border: 2px solid transparent;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            color: #6b7280;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .segment-tab:hover {
            background: #e8e8ea;
            transform: translateY(-2px);
        }

        .segment-tab.active {
            background: white;
            color: #1d1d1f;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        /* Tab-specific colors */
        .segment-tab.active[data-segment="electric"] {
            border-color: #0ea5e9;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        }

        .segment-tab.active[data-segment="cruiser"] {
            border-color: #a855f7;
            background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
        }

        .segment-tab.active[data-segment="adventure"] {
            border-color: #22c55e;
            background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        }

        .segment-tab.active[data-segment="urban"] {
            border-color: #f97316;
            background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
        }

        .tab-icon {
            font-size: 20px;
            line-height: 1;
        }

        .tab-text {
            line-height: 1;
        }

        /* Tab Content */
        .segment-content-wrapper {
            min-height: 500px;
        }

        .segment-content {
            display: none;
            animation: fadeIn 0.3s ease;
        }

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

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

        .segment-description {
            text-align: center;
            margin-bottom: 24px;
        }

        .segment-description p {
            font-size: 17px;
            color: #1d1d1f;
            margin: 0;
            line-height: 1.5;
        }

        /* Cards grid within tabs */
        .category-cards-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
            justify-items: center;
        }

        @media (max-width: 1400px) {
            .category-cards-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 900px) {
            .category-cards-grid {
                grid-template-columns: 1fr;
            }
            
            .segments-section {
                padding: 24px;
            }

            .segments-title {
                font-size: 28px;
            }

            .segments-subtitle {
                font-size: 16px;
            }

            .segment-tabs {
                gap: 8px;
            }

            .segment-tab {
                padding: 12px 16px;
                font-size: 14px;
            }

            .tab-icon {
                font-size: 18px;
            }
        }

        .analytics-card {
            background: white;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
            border: 1px solid #e5e7eb;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            max-width: 500px;
        }

        .analytics-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
        }

        .analytics-card-image {
            position: relative;
            width: 100%;
            height: 180px;
            overflow: hidden;
        }

        .analytics-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .analytics-card:hover .analytics-card-image img {
            transform: scale(1.05);
        }

        .analytics-badge {
            position: absolute;
            top: 16px;
            right: 16px;
            background: rgba(99, 102, 241, 0.95);
            color: white;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            backdrop-filter: blur(10px);
        }

        .analytics-card-content {
            padding: 16px 20px 20px 20px;
        }

        .analytics-card-title {
            font-size: 26px;
            font-weight: 700;
            color: #000000;
            margin: 0 !important;
            line-height: 1.2;
        }

        .analytics-card-desc {
            font-size: 13px;
            color: #6b7280;
            margin: 0 0 16px 0 !important;
            line-height: 1.4;
        }

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

        .metric {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 12px;
            background: #f9fafb;
            border-radius: 10px;
            border: 1px solid #e5e7eb;
        }

        .metric-label {
            font-size: 11px;
            font-weight: 600;
            color: #6e6e73;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .metric-value {
            font-size: 18px;
            font-weight: 700;
            color: #000000;
            letter-spacing: -0.5px;
        }

        /* Info Cards Grid */
        .info-cards-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-bottom: 16px;
        }

        .info-card {
            padding: 12px;
            border-radius: 10px;
            border: 2px solid;
            transition: all 0.2s ease;
        }

        .info-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .info-card-blue {
            background: #eff6ff;
            border-color: #3b82f6;
        }

        .info-card-orange {
            background: #fff7ed;
            border-color: #f97316;
        }

        .info-card-purple {
            background: #faf5ff;
            border-color: #a855f7;
        }

        .info-card-icon {
            font-size: 20px;
            margin-right: 6px;
        }

        .info-card-title {
            font-size: 13px;
            font-weight: 700;
            color: #000000;
            margin-bottom: 8px;
            letter-spacing: -0.2px;
            display: flex;
            align-items: center;
        }

        .info-card-content {
            font-size: 12px;
            line-height: 1.5;
            color: #4b5563;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .analytics-view-btn {
            width: 100%;
            background: #6366f1;
            color: white;
            border: none;
            padding: 16px 24px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .analytics-view-btn:hover {
            background: #4f46e5;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }

        .analytics-view-btn svg {
            transition: transform 0.2s ease;
        }

        .analytics-card:hover .analytics-view-btn svg {
            transform: translateX(4px);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .nav {
                padding: 15px 20px;
            }

            .container {
                padding: 0 20px;
            }

            .card {
                padding: 24px;
            }

            h1 {
                font-size: 28px;
            }

            .analytics-section > .analytics-grid {
                grid-template-columns: 1fr !important;
                max-width: 100% !important;
            }

            .analytics-title {
                font-size: 28px;
            }

            .analytics-metrics {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .info-cards-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            
            /* Stack Known Problems & Interesting Fact on mobile */
            .info-cards-grid {
                grid-template-columns: 1fr !important;
            }
        }

/* ========== Style Block 2 ========== */
        /* Analytics Section */
        #analyticsSection {
            max-width: 1400px;
            margin: 40px auto;
            padding: 0 40px;
        }

        .analytics-container {
            background: white;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }

        .analytics-loader {
            text-align: center;
            padding: 80px 40px;
        }

        .loader-spinner {
            width: 60px;
            height: 60px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #667eea;
            border-radius: 50%;
            margin: 0 auto 20px;
            animation: spin 1s linear infinite;
        }

        .analytics-loader p {
            color: #6e6e73;
            font-size: 16px;
            font-weight: 500;
        }

        .analytics-title {
            font-size: 32px;
            font-weight: 800;
            color: #1d1d1f;
            margin-bottom: 30px;
            letter-spacing: -0.02em;
        }

        .analytics-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 40px;
        }

        .stat-card {
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border: 2px solid #e8e8e8;
            border-radius: 16px;
            padding: 24px;
            text-align: center;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .stat-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.08);
            border-color: #667eea;
        }

        .stat-card .stat-icon {
            font-size: 40px;
            margin-bottom: 12px;
        }

        .stat-card .stat-label {
            font-size: 14px;
            color: #6e6e73;
            margin-bottom: 8px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .stat-value {
            font-size: 32px;
            font-weight: 800;
            color: #667eea;
            margin-bottom: 4px;
        }

        .stat-range {
            font-size: 13px;
            color: #86868b;
        }

        .analytics-section {
            margin: 20px 0;
        }

        .analytics-section h3 {
            font-size: 24px;
            font-weight: 700;
            color: #1d1d1f;
            margin-bottom: 20px;
        }

        .description-box {
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border: 2px solid #e8e8e8;
            border-radius: 16px;
            padding: 24px;
        }

        .car-description {
            font-size: 16px;
            line-height: 1.8;
            color: #1d1d1f;
            margin: 0;
            text-align: justify;
        }

        .country-grid {
            display: block;
        }

        .country-cards-grid {
            display: flex;
            gap: 20px;
            overflow-x: auto;
            padding-bottom: 12px;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
        }

        .country-cards-grid::-webkit-scrollbar {
            height: 8px;
        }

        .country-cards-grid::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        .country-cards-grid::-webkit-scrollbar-thumb {
            background: #667eea;
            border-radius: 10px;
        }

        .country-cards-grid::-webkit-scrollbar-thumb:hover {
            background: #5568d3;
        }

        .country-card {
            background: #f8f9fa;
            border: 2px solid #e8e8e8;
            border-radius: 12px;
            padding: 20px;
            transition: all 0.2s;
            min-width: 300px;
            max-width: 300px;
            flex-shrink: 0;
        }

        .country-card:hover {
            border-color: #667eea;
            transform: translateY(-2px);
        }

        .country-card.selected {
            border-color: #667eea;
            border-width: 3px;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
        }

        .country-card h4 {
            font-size: 18px;
            font-weight: 700;
            color: #1d1d1f;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .country-rank {
            display: inline-block;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .country-rank.gold {
            background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
            color: #1d1d1f;
        }

        .country-stat {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #e8e8e8;
        }

        .country-stat:last-child {
            border-bottom: none;
        }

        .country-stat-label {
            color: #6e6e73;
            font-size: 14px;
        }

        .country-stat-value {
            font-weight: 700;
            color: #1d1d1f;
            font-size: 14px;
        }

        .deviation-positive {
            color: #e74c3c;
        }

        .deviation-negative {
            color: #27ae60;
        }

        /* Similar Vehicles Styles */
        .similar-vehicles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 15px;
        }

        .similar-vehicle-card {
            background: white;
            border: 2px solid #e8e8e8;
            border-radius: 12px;
            padding: 20px;
            transition: all 0.3s;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .similar-vehicle-card:hover {
            border-color: #667eea;
            transform: translateY(-4px);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.15);
        }

        .similar-vehicle-header {
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 2px solid #f0f0f0;
        }

        .similar-vehicle-title {
            font-size: 20px;
            font-weight: 700;
            color: #1d1d1f;
            margin: 0;
        }

        .similar-vehicle-body {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .similar-vehicle-reason,
        .similar-vehicle-comparison {
            margin: 0;
            font-size: 14px;
            line-height: 1.6;
            color: #424242;
        }

        .similar-vehicle-reason strong,
        .similar-vehicle-comparison strong {
            color: #667eea;
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .similar-vehicles-grid {
                grid-template-columns: 1fr;
            }
        }
        
        /* Interesting Fact Tooltip Styles */
        .info-icon {
            position: relative;
            display: inline-block;
            transition: transform 0.2s;
        }
        
        .info-icon:hover {
            transform: scale(1.1);
        }
        
        .fact-tooltip {
            position: absolute;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 16px 20px;
            border-radius: 12px;
            font-size: 14px;
            line-height: 1.6;
            font-style: italic;
            min-width: 280px;
            max-width: 400px;
            z-index: 1000;
            box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
            bottom: calc(100% + 12px);
            right: -10px;
            animation: tooltipFade 0.3s ease-out;
        }
        
        @keyframes tooltipFade {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .fact-tooltip::before {
            content: '';
            position: absolute;
            top: 100%;
            right: 20px;
            border: 8px solid transparent;
            border-top-color: #667eea;
        }

        #carListingsSection {
            max-width: 1400px !important;
            margin: 40px auto !important;
            padding: 0 40px !important;
        }

        #carListingsSection .card {
            background: white;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }

        #carListingsSection h2 {
            font-size: 32px;
            font-weight: 800;
            color: #1d1d1f;
            margin-bottom: 30px;
            letter-spacing: -0.02em;
        }

        .listings-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        /* Listing Tabs Styles */
        .listings-tabs {
            display: flex;
            gap: 12px;
            margin-bottom: 24px;
            border-bottom: 2px solid #f0f0f0;
            padding-bottom: 0;
        }
        
        .listing-tab {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 24px;
            background: transparent;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            color: #666;
            transition: all 0.3s ease;
            position: relative;
            bottom: -2px;
        }
        
        .listing-tab:hover {
            color: #667eea;
            background: rgba(102, 126, 234, 0.05);
        }
        
        .listing-tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
            font-weight: 600;
        }
        
        .tab-icon {
            font-size: 18px;
        }
        
        .tab-count {
            background: #f0f0f0;
            color: #666;
            padding: 2px 10px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 600;
            min-width: 24px;
            text-align: center;
            border: none;
        }
        
        .listing-tab.active .tab-count {
            background: #667eea;
            color: white;
        }

        .header-left {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .filter-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            max-width: 100%;
            flex-wrap: wrap;
        }

        .filter-badge-item {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50px;
            font-size: 14px;
            font-weight: 600;
            gap: 8px;
            width: fit-content;
        }

        .filter-badge-item span {
            font-size: 16px;
            font-weight: 700;
            opacity: 0.8;
            transition: opacity 0.2s;
        }

        .filter-badge-item span:hover {
            opacity: 1;
        }
        
        /* Toast notifications now use unified .scrape-status-toast system (see scrape-status.css and models.js showToast function) */

        .filter-count-badge {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            background: #f5f5f5;
            color: #666;
            border-radius: 50px;
            font-size: 14px;
            font-weight: 600;
            border: 1px solid #e0e0e0;
        }

        .sort-controls {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .vat-toggle-container {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .vat-toggle-label {
            font-size: 14px;
            font-weight: 500;
            color: #6b7280;
            transition: color 0.2s;
        }
        
        .vat-toggle-switch {
            position: relative;
            display: inline-block;
            width: 52px;
            height: 28px;
        }
        
        .vat-toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .vat-toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #e5e7eb;
            transition: 0.3s;
            border-radius: 28px;
        }
        
        .vat-toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: 0.3s;
            border-radius: 50%;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        .vat-toggle-switch input:checked + .vat-toggle-slider {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .vat-toggle-switch input:checked + .vat-toggle-slider:before {
            transform: translateX(24px);
        }
        
        .vat-toggle-container:has(input:checked) .vat-toggle-label {
            color: #667eea;
            font-weight: 600;
        }
        
        .sort-controls .custom-dropdown {
            min-width: 280px;
        }

        #carListings {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .car-list-item {
            display: flex;
            position: relative;
            background: white;
            border: 2px solid #e8e8e8;
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }

        .car-list-item:hover {
            border-color: #667eea;
            box-shadow: 0 6px 20px rgba(0,0,0,0.08);
        }
        
        .car-image {
            width: 252px;
            height: 180px;
            flex-shrink: 0;
            border-radius: 12px;
            overflow: hidden;
            background: #f5f5f7;
            position: relative;
        }
        
        .car-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* Car listing heart button positioning */
        .car-listing-heart {
            position: absolute !important;
            top: 12px !important;
            right: 12px !important;
            z-index: 10 !important;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
            display: inline-flex !important;
            opacity: 1 !important;
            visibility: visible !important;
            width: 40px !important;
            height: 40px !important;
        }
        
        .car-listing-heart:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
        }

        .sort-controls {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .car-placeholder {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Sold overlay styles */
        .sold-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
        }

        .sold-badge {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.85) 0%, rgba(220, 38, 38, 0.85) 100%);
            color: white;
            padding: 16px 32px;
            border-radius: 8px;
            font-size: 24px;
            font-weight: 800;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            transform: rotate(-5deg);
            letter-spacing: 2px;
            backdrop-filter: blur(2px);
        }

        .sold-badge small {
            font-size: 12px;
            font-weight: 500;
            opacity: 0.9;
            letter-spacing: 0.5px;
        }

        .sold-listing {
            opacity: 0.85;
            filter: grayscale(50%);
        }

        .sold-listing:hover {
            opacity: 0.95;
            border-color: #ef4444;
        }

        .car-placeholder svg {
            width: 80px;
            height: 80px;
            opacity: 0.5;
        }

        .car-info {
            flex: 1;
            padding: 20px 24px;
            display: flex;
            flex-direction: column;
        }

        .car-title {
            margin: 0 0 12px 0;
            font-size: 20px;
            font-weight: 700;
            color: #1d1d1f;
            line-height: 1.3;
        }

        .car-price-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 8px;
            flex-wrap: wrap;
            line-height: 1;
        }

        .car-price {
            color: #667eea;
            font-size: 28px;
            font-weight: 800;
            line-height: 1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .car-specs {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            margin-bottom: 16px;
            flex: 1;
        }

        .spec-item {
            color: #6e6e73;
            font-size: 14px;
        }

        .spec-item strong {
            color: #1d1d1f;
            font-weight: 600;
        }

        .comparison {
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 400;
            line-height: 1;
        }

        .comparison.below-avg {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .comparison.above-avg {
            background: #ffebee;
            color: #c62828;
        }

        .days-on-market {
            display: inline-flex;
            align-items: center;
            font-size: 13px;
            font-weight: 600;
            color: #6e6e73;
            line-height: 1;
        }

        /* VAT Badge Styles */
        .vat-badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 400;
            line-height: 1;
        }

        .vat-badge.vat-included {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .vat-badge.vat-none {
            background: #fff3e0;
            color: #e65100;
        }

        .leverage-badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 400;
            white-space: nowrap;
            line-height: 1;
        }

        .leverage-badge.leverage-low {
            background: #ffebee;
            color: #c62828;
        }

        .leverage-badge.leverage-fair {
            background: #e3f2fd;
            color: #1565c0;
        }

        .leverage-badge.leverage-good {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .leverage-badge.leverage-high {
            background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
            color: white;
        }

        .car-depreciation-side {
            position: absolute !important;
            right: 20px !important;
            top: 20px !important;
            z-index: 10 !important;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            max-width: 400px;
        }

        .depreciation-badge {
            display: inline-flex;
            align-items: center;
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 400;
            line-height: 1;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .depreciation-badge.depreciation-low {
            background: #ffebee;
            color: #c62828;
            border: 1px solid #ef9a9a;
        }

        .depreciation-badge.depreciation-moderate {
            background: #fff3e0;
            color: #e65100;
            border: 1px solid #ffb74d;
        }

        .depreciation-badge.depreciation-high {
            background: #e8f5e9;
            color: #2e7d32;
            border: 1px solid #81c784;
        }

        .depreciation-badge.depreciation-neutral {
            background: #f5f5f5;
            color: #424242;
            border: 1px solid #e0e0e0;
        }

        .view-details-btn {
            display: inline-block;
            padding: 12px 28px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            text-decoration: none;
            border: none;
            border-radius: 50px;
            font-size: 14px;
            font-weight: 600;
            transition: transform 0.2s, box-shadow 0.2s;
            align-self: flex-start;
            cursor: pointer;
        }

        .view-details-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
        }

        @media (max-width: 768px) {
            .car-list-item {
                flex-direction: column;
            }

            .car-image {
                width: 100%;
                height: 220px;
            }

            .car-depreciation-side {
                position: static;
                transform: none;
                margin-top: 12px;
                text-align: center;
            }

            .listings-header {
                flex-direction: column;
                align-items: flex-start;
            }
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0,0,0,0.7);
            animation: fadeIn 0.3s;
        }

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

        .modal-content {
            background: white;
            margin: 2% auto;
            width: 90%;
            max-width: 1200px;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: slideIn 0.3s;
            position: relative;
        }

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

        .modal-close {
            position: absolute;
            right: 20px;
            top: 20px;
            font-size: 36px;
            font-weight: bold;
            color: #6e6e73;
            cursor: pointer;
            z-index: 10;
            transition: color 0.2s;
        }

        .modal-close:hover {
            color: #667eea;
        }

        /* Modal Navigation Buttons */
        .modal-nav {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.95);
            border: 2px solid #667eea;
            color: #667eea;
            padding: 16px 12px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 24px;
            font-weight: 700;
            z-index: 1001;
            transition: all 0.3s;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .modal-nav:hover {
            background: #667eea;
            color: white;
            transform: translateY(-50%) scale(1.05);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        .modal-nav-prev {
            left: 2%;
        }

        .modal-nav-next {
            right: 2%;
        }

        .modal-nav-label {
            font-size: 14px;
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .modal-nav {
                padding: 12px 8px;
            }

            .modal-nav-label {
                display: none;
            }
        }

        .modal-body {
            display: flex;
            gap: 30px;
            padding: 40px;
        }

        .modal-images {
            flex: 1;
        }

        .image-gallery {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .gallery-image {
            width: 100%;
            height: 200px;
            object-fit: cover;
            border-radius: 12px;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .gallery-image:hover {
            transform: scale(1.05);
        }

        .more-images-indicator {
            position: relative;
            width: 100%;
            height: 200px;
            cursor: pointer;
            border-radius: 12px;
            overflow: hidden;
        }

        .more-images-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            z-index: 2;
            transition: background 0.3s;
        }

        .more-images-indicator:hover .more-images-overlay {
            background: rgba(0, 0, 0, 0.85);
        }

        .more-images-icon {
            font-size: 40px;
        }

        .more-images-text {
            color: white;
            font-size: 18px;
            font-weight: 700;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        .more-images-indicator img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 1;
        }

        .gallery-image:first-child {
            grid-column: span 2;
            height: 300px;
        }

        .no-images {
            grid-column: span 2;
            padding: 60px;
            text-align: center;
            color: #6e6e73;
            background: #f5f5f7;
            border-radius: 12px;
        }

        .modal-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .modal-info h2 {
            margin: 0;
            font-size: 28px;
            font-weight: 800;
            color: #1d1d1f;
        }

        .modal-price {
            font-size: 36px;
            font-weight: 800;
            color: #667eea;
        }

        .modal-vat-info {
            font-size: 18px;
            font-weight: 600;
            color: #2e7d32;
            margin-top: 8px;
        }

        .modal-vat-percent {
            font-size: 16px;
            color: #666;
            font-weight: 500;
        }

        .modal-vat-info.modal-no-vat {
            color: #e65100;
            font-size: 16px;
        }

        .modal-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .modal-badge {
            display: inline-block;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 700;
            white-space: nowrap;
        }

        .modal-badge.badge-excellent {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .modal-badge.badge-good {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .modal-badge.badge-neutral {
            background: #fff3e0;
            color: #e65100;
            border: 1px solid #ffb74d;
        }

        .modal-badge.modal-badge-neutral {
            background: #f5f5f5;
            color: #424242;
            border: 1px solid #e0e0e0;
        }

        .modal-badge.badge-bad {
            background: #ffebee;
            color: #c62828;
        }

        .modal-badge.badge-leverage-low {
            background: #ffebee;
            color: #c62828;
        }

        .modal-badge.badge-leverage-fair {
            background: #e3f2fd;
            color: #1565c0;
        }

        .modal-badge.badge-leverage-good {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .modal-badge.badge-leverage-high {
            background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
            color: white;
        }

        .modal-specs {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 20px;
            background: #f5f5f7;
            border-radius: 12px;
        }

        .spec-row {
            display: flex;
            justify-content: space-between;
            font-size: 15px;
        }

        .spec-label {
            font-weight: 600;
            color: #6e6e73;
        }

        .spec-value {
            font-weight: 600;
            color: #1d1d1f;
        }

        .modal-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .modal-section h3 {
            margin: 0;
            font-size: 20px;
            font-weight: 700;
            color: #1d1d1f;
        }

        .ai-insights {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            padding: 20px;
            border-radius: 12px;
            border: 2px solid rgba(102, 126, 234, 0.2);
        }

        .ai-text {
            margin: 0;
            font-size: 15px;
            line-height: 1.7;
            color: #1d1d1f;
        }

        .ai-loader {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #6e6e73;
            font-size: 14px;
        }

        .spinner-small {
            width: 16px;
            height: 16px;
            border: 2px solid #f3f3f3;
            border-top: 2px solid #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        .ai-error {
            margin: 0;
            color: #c62828;
            font-size: 14px;
        }

        /* Vehicle Options Styles */
        .vehicle-options {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 12px;
            border: 2px solid #e8e8e8;
        }

        .options-grid {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .options-category {
            background: white;
            padding: 16px;
            border-radius: 10px;
            border: 1px solid #e8e8e8;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .options-category-title {
            font-size: 16px;
            font-weight: 700;
            color: #1d1d1f;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 2px solid #667eea;
        }

        .options-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .option-item {
            display: inline-block;
            padding: 6px 12px;
            background: linear-gradient(135deg, #e3f2fd 0%, #e8f5e9 100%);
            color: #1565c0;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            border: 1px solid #bbdefb;
            transition: all 0.2s;
        }

        .option-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
        }

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

        .options-column .option-item {
            display: block;
            text-align: left;
        }

        .option-badge {
            display: inline-block;
            padding: 6px 12px;
            background: linear-gradient(135deg, #e3f2fd 0%, #e8f5e9 100%);
            color: #1565c0;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            border: 1px solid #bbdefb;
            transition: all 0.2s;
        }

        .option-badge:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
        }

        .modal-actions {
            display: flex;
            gap: 12px;
            margin-top: auto;
        }

        .modal-btn-primary {
            flex: 1;
            padding: 16px 24px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            text-decoration: none;
            border-radius: 12px;
            font-weight: 700;
            text-align: center;
            transition: transform 0.2s;
        }

        .modal-btn-primary:hover {
            transform: translateY(-2px);
        }

        .modal-btn-secondary {
            padding: 16px 24px;
            background: white;
            color: #667eea;
            border: 2px solid #667eea;
            border-radius: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
        }

        .modal-btn-secondary:hover {
            background: #667eea;
            color: white;
        }

        /* Listing Analytics Styles */
        .listing-analytics {
            margin-top: 12px;
        }

        .listing-analytics .analytics-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }

        .analytics-item {
            background: #f8f9fa;
            padding: 12px 16px;
            border-radius: 8px;
            border-left: 3px solid #667eea;
        }

        .analytics-label {
            font-size: 12px;
            color: #666;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .analytics-value {
            font-size: 18px;
            font-weight: 700;
            color: #1d1d1f;
        }

        .analytics-value.positive {
            color: #10b981;
        }

        .analytics-value.negative {
            color: #ef4444;
        }

        .analytics-value.neutral {
            color: #f59e0b;
        }

        /* Lightbox Styles */
        .lightbox {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            animation: fadeIn 0.3s ease-in;
        }

        .lightbox-content {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 60px;
        }

        .lightbox-content img {
            max-width: 90%;
            max-height: 90%;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .lightbox-close {
            position: absolute;
            top: 20px;
            right: 40px;
            color: white;
            font-size: 48px;
            font-weight: 300;
            cursor: pointer;
            z-index: 2001;
            transition: color 0.2s;
        }

        .lightbox-close:hover {
            color: #667eea;
        }

        .lightbox-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: none;
            font-size: 48px;
            padding: 20px 30px;
            cursor: pointer;
            transition: all 0.3s;
            border-radius: 8px;
            z-index: 2001;
        }

        .lightbox-nav:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-50%) scale(1.1);
        }

        .lightbox-prev {
            left: 40px;
        }

        .lightbox-next {
            right: 40px;
        }

        .lightbox-caption {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            color: white;
            font-size: 16px;
            text-align: center;
            background: rgba(0, 0, 0, 0.7);
            padding: 12px 24px;
            border-radius: 20px;
        }

        .gallery-image {
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .gallery-image:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }

        @media (max-width: 768px) {
            .modal-body {
                flex-direction: column;
            }

            .lightbox-content {
                padding: 20px;
            }

            .lightbox-nav {
                font-size: 32px;
                padding: 10px 20px;
            }

            .lightbox-prev {
                left: 10px;
            }

            .lightbox-next {
                right: 10px;
            }

            .listing-analytics .analytics-grid {
                grid-template-columns: 1fr;
            }
        }

        #pagination button {
            padding: 12px 20px;
            border: 2px solid #667eea;
            background: white;
            color: #667eea;
            border-radius: 50px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.2s;
        }

        #pagination button:hover {
            background: #667eea;
            color: white;
            transform: translateY(-2px);
        }

        #pagination button.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        @media (max-width: 768px) {
            #carListings {
                grid-template-columns: 1fr;
            }

            #carListingsSection {
                padding: 0 20px !important;
            }

            .analytics-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 480px) {
            .analytics-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Print styles for PDF generation */
        @media print {
            body {
                background: white;
            }

            /* Hide navigation and non-analytics elements */
            nav, .nav-links, #downloadPdfBtn, #shareReportBtn, #shareMenu, 
            .car-list-container, .modal, .lightbox, footer {
                display: none !important;
            }

            /* Show analytics content */
            #analyticsSection {
                display: block !important;
                padding: 0;
                margin: 0;
            }

            #analyticsContent {
                display: block !important;
            }

            .analytics-container {
                box-shadow: none;
                border-radius: 0;
                padding: 20px;
            }

            /* Adjust grid for print */
            .analytics-grid {
                grid-template-columns: repeat(2, 1fr);
                page-break-inside: avoid;
            }

            .stat-card {
                page-break-inside: avoid;
            }

            /* Country cards */
            .country-cards-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .country-card {
                page-break-inside: avoid;
                margin-bottom: 10px;
            }

            /* Market insights */
            .market-insights {
                page-break-inside: avoid;
            }

            /* Analytics section */
            .analytics-section {
                page-break-inside: avoid;
                margin-bottom: 20px;
            }

            /* Ensure proper page breaks */
            h2, h3 {
                page-break-after: avoid;
            }

            /* Add page header */
            @page {
                margin: 1.5cm;
            }
        }

        /* Icon Button Styles */
        .icon-button:hover {
            background: #e5e7eb !important;
            border-color: #d1d5db !important;
            transform: translateY(-1px);
        }
        
        .icon-button:active {
            transform: translateY(0);
        }
        
        /* Share Menu Styles */
        #shareMenu {
            animation: slideDown 0.2s ease-out;
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        #shareMenu button:hover {
            background: #f9fafb !important;
        }
        
        /* Toast Container - Uses scrape-status component */
        #toastContainer {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 10px;
            pointer-events: none;  /* Allow clicks through container */
        }

        #toastContainer > * {
            pointer-events: auto;  /* Re-enable clicks on toasts */
        }

        @media (max-width: 480px) {
            #toastContainer {
                bottom: 10px;
                right: 10px;
                left: 10px;
            }
        }

        @media print {
            #toastContainer {
                display: none !important;
            }
        }

