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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

.hidden {
    display: none !important;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* Error State */
.error-container {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error-icon {
    width: 60px;
    height: 60px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.error-container h2 {
    color: #dc2626;
    margin-bottom: 10px;
}

.error-container p {
    color: #666;
    margin-bottom: 20px;
}

/* Header */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

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

.shield-icon {
    color: #6b7280;
}

.report-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

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

.verified-badge {
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.provider-name {
    color: #6b7280;
    font-size: 14px;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.toggle-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

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

.translate-icon {
    display: flex;
    align-items: center;
}

/* Report Card */
.report-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Sections */
.section {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 40px;
}

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

.info-item {
    display: flex;
    gap: 8px;
}

.info-label {
    color: #6b7280;
    font-size: 14px;
    min-width: 100px;
}

.info-value {
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
}

/* Grade Banner */
.grade-banner {
    padding: 16px 24px;
    background: #eff6ff;
}

.grade-banner.grade-a {
    background: #dcfce7;
}

.grade-banner.grade-b {
    background: #dbeafe;
}

.grade-banner.grade-c {
    background: #fef9c3;
}

.grade-banner.grade-d {
    background: #eff6ff;
}

.grade-banner.grade-e {
    background: #fee2e2;
}

.grade-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.grade-description {
    font-size: 14px;
    color: #4b5563;
}

/* Conclusion Badges */
.conclusion-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.badge-icon {
    display: flex;
    align-items: center;
}

.badge-success {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.badge-success .badge-icon {
    color: #22c55e;
}

.badge-warning {
    background: #dc2626;
    color: white;
    border: 1px solid #dc2626;
}

.badge-warning .badge-icon {
    color: white;
}

.badge-loading {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #9ca3af;
}

/* Description */
.description-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}

/* Report Footer */
.report-footer {
    padding: 24px;
    background: #f9fafb;
}

.report-footer p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 8px;
}

.report-footer strong {
    color: #1f2937;
}

.disclaimer {
    color: #f59e0b !important;
    font-style: italic;
    margin-top: 16px !important;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

/* Original Report Link */
.original-report-link {
    margin-top: 20px;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
}

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

.btn-outline {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Chinese text styling */
.chinese-text {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

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

    .language-toggle {
        flex-direction: column;
    }

    .toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: 16px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-icon {
    color: #f59e0b;
    margin-bottom: 16px;
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-content .btn {
    min-width: 120px;
}

/* Home Page */
.home-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.home-card {
    background: white;
    border-radius: 16px;
    padding: 48px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.home-icon {
    color: #2563eb;
    margin-bottom: 24px;
}

.home-card h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.home-card > p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
}

.vin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vin-form input {
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.vin-form input:focus {
    border-color: #2563eb;
}

.vin-form input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vin-form .btn {
    padding: 14px 24px;
    font-size: 16px;
}

.home-hint {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .home-card {
        padding: 32px 24px;
    }

    .home-card h1 {
        font-size: 24px;
    }
}
