/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --max-width: 1200px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Content Sections */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* Card Grids */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.model-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.model-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.brand-name {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.spec {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0.25rem 0;
}

.model-year {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

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

.btn-secondary:hover {
    background: #475569;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.brand-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.brand-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.brand-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.brand-card-large {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.brand-card-large:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.brand-stats {
    margin-top: 1rem;
}

.brand-stats p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

/* Brand Sections */
.brand-section {
    margin-bottom: 3rem;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.brand-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.brand-section h2 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s;
}

.brand-section h2 a:hover {
    color: var(--primary-color);
}

.model-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.model-list-item a {
    display: block;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.model-list-item a:hover {
    background: #e0e7ff;
}

.year {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Model Detail Pages */
.model-detail {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.model-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.model-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.model-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.model-description {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.model-specs {
    margin-bottom: 2rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.spec-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.spec-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

/* P-Settings */
.p-settings-guide {
    margin-bottom: 2rem;
}

.guide-intro {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
    border-radius: var(--radius);
}

.p-settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.p-setting-item {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.p-setting-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.setting-description {
    margin-bottom: 1rem;
}

.setting-recommendation {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #d1fae5;
    border-radius: var(--radius);
}

.setting-warning {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fee2e2;
    border-radius: var(--radius);
    color: #991b1b;
}

/* Error Codes */
.error-codes-guide {
    margin-bottom: 2rem;
}

.error-codes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.error-code-item {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary-color);
}

.error-code-item.severity-critical {
    border-left-color: var(--danger-color);
    background: #fee2e2;
}

.error-code-item.severity-high {
    border-left-color: var(--warning-color);
    background: #fef3c7;
}

.error-code-item.severity-medium {
    border-left-color: #3b82f6;
}

.error-code-item.severity-low {
    border-left-color: var(--success-color);
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.error-header h3 {
    font-size: 1.2rem;
    color: var(--text-color);
}

.severity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-badge.severity-critical {
    background: var(--danger-color);
    color: white;
}

.severity-badge.severity-high {
    background: var(--warning-color);
    color: white;
}

.severity-badge.severity-medium {
    background: #3b82f6;
    color: white;
}

.severity-badge.severity-low {
    background: var(--success-color);
    color: white;
}

.error-description {
    margin-bottom: 1rem;
}

.error-section {
    margin-top: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius);
}

.error-section strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.error-section p {
    margin: 0;
}

/* Related Models */
.related-models {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.related-models h2 {
    margin-bottom: 1.5rem;
}

.model-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 1rem 0 2rem;
    font-size: 0.9rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.5rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-light);
}

/* Page Intro */
.page-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Footer */
.site-footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

    .brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .model-header h1 {
        font-size: 1.5rem;
    }

    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .error-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Comparison Pages */
.comparison-selector {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.selectable-model {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.selectable-model:hover {
    background: #e0e7ff;
}

.selectable-model .price {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.comparison-detail {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.comparison-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.comparison-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.comparison-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

.comparison-column {
    display: flex;
    flex-direction: column;
}

.model-card-compare {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
}

.model-card-compare h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.model-card-compare img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius);
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.vs-divider span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.quick-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.comparison-table {
    margin-bottom: 3rem;
}

.comparison-table h2 {
    margin-bottom: 1.5rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--bg-light);
    font-weight: 600;
}

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

.comparison-verdict {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius);
}

.comparison-verdict h2 {
    margin-bottom: 1rem;
}

.verdict-summary {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius);
}

.verdict-summary strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vs-divider {
        padding: 1rem 0;
    }

    .vs-divider span {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }

    .comparison-table {
        overflow-x: auto;
    }

    .comparison-table table {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
}