:root {
    --primary-color: #3a506b;
    --secondary-color: #5d7a9c;
    --accent-color: #a8323e; /* Muted red */
    --light-color: #f5f7fa;
    --dark-color: #2c3e50;
    --success-color: #2e7d32; /* Muted green */
    --warning-color: #b06d0e;
    --border-radius: 4px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Tahoma', 'Verdana', 'Arial', sans-serif;
    background: #eaeef3; /* Classic light blue-gray background */
    min-height: 100vh;
    padding: 20px;
    color: #333;
    overflow-y: auto;
    background-image: linear-gradient(to bottom, #f0f4f8 0%, #eaeef3 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    box-shadow: 0 0 0 1px #ccc, 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: auto;
    border: 1px solid #b0b7c0;
}

/* Header - Classic 2000s Style */
header {
    background: linear-gradient(to bottom, #4a6480 0%, #3a506b 100%);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    border-bottom: 2px solid #2c3e50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-container {
    height: 100px;
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.title-container {
    flex: 1;
    min-width: 300px;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.instructions {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
    color: #d0d7e0;
}

/* Full VIN Paste Section */
.full-vin-section {
    background: #f8f9fa;
    border: 1px solid #d1d7e0;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem;
    box-shadow: var(--box-shadow);
}

.full-vin-section label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.full-vin-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.full-vin-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #a0a7b0;
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    background: white;
    transition: var(--transition);
}

.full-vin-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(93, 122, 156, 0.3);
}

/* VIN Entry Section */
.vin-entry-section {
    margin: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #d1d7e0;
    border-radius: var(--border-radius);
}

.vin-entry-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid #e0e5eb;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.sections-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.vin-section {
    flex: 1;
    min-width: 120px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    border: 1px solid #d1d7e0;
    transition: var(--transition);
}

.vin-section:hover {
    border-color: var(--secondary-color);
    background: #f0f4f8;
}

.vin-section.wide {
    flex: 2;
}

.vin-section.full-width {
    flex: 3;
}

.vin-section label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.position-info {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.read-only-field {
    background: #e9ecef;
    border: 1px solid #b0b7c0;
    padding: 0.5rem;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1rem;
    border-radius: var(--border-radius);
    color: #495057;
}

.vin-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #b0b7c0;
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    transition: var(--transition);
    background-color: white;
}

.vin-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(93, 122, 156, 0.3);
}

.char-counter {
    text-align: right;
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.25rem;
}

.tip {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0f7ff;
    border: 1px solid #c2d9f0;
    border-radius: var(--border-radius);
    color: #2c5282;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.tip kbd {
    background: white;
    border: 1px solid #b0b7c0;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Buttons - Classic Style */
.buttons-section {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-small {
    padding: 0.5rem 1rem;
    border: 1px solid;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Button Colors */
.btn-primary {
    background: linear-gradient(to bottom, #5d7a9c 0%, #4a6480 100%);
    border-color: #3a506b;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #6a87ac 0%, #546e8c 100%);
}

.btn-secondary {
    background: linear-gradient(to bottom, #8a8e94 0%, #6c757d 100%);
    border-color: #5a6268;
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #989ca3 0%, #7a8288 100%);
}

.btn-danger {
    background: linear-gradient(to bottom, #c44545 0%, #a8323e 100%);
    border-color: #8c2830;
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(to bottom, #d45454 0%, #b8424e 100%);
}

.btn-success {
    background: linear-gradient(to bottom, #37833c 0%, #2e7d32 100%);
    border-color: #27632a;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(to bottom, #45924a 0%, #378d3c 100%);
}

/* Results Section */
.results-section {
    margin: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #d1d7e0;
    border-radius: var(--border-radius);
}

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

.results-container {
    background: #f8f9fa;
    border: 1px solid #d1d7e0;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.full-vin-display {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 0.75rem;
    background: #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    border: 1px solid #b0b7c0;
}

.results-content {
    min-height: 200px;
}

.results-text {
    font-family: 'Arial', sans-serif;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
}

.placeholder {
    color: #6c757d;
    text-align: center;
    font-style: italic;
    margin: 1rem 0;
}

/* Summary Section */
.summary-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f0f4f8;
    border-top: 1px solid #d1d7e0;
    margin: 0 1rem;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.position-count {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid #2c3e50;
}

/* Footer */
footer {
    background: #3a506b;
    color: white;
    text-align: center;
    padding: 0.75rem;
    border-top: 2px solid #2c3e50;
}

footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
}

.mwc-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.mwc-link:hover {
    text-decoration: underline;
}

/* Compact Results Styling */
.compact-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.result-category.compact {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    border: 1px solid #d1d7e0;
}

.compact-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--secondary-color);
    color: var(--primary-color);
    text-align: center;
    font-weight: 600;
}

.results-list {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.result-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.4rem;
    margin: 0.2rem 0;
    border-radius: 2px;
    background: white;
    border-left: 2px solid #dee2e6;
    transition: var(--transition);
    font-size: 0.8rem;
    cursor: pointer;
}

.result-item-compact:hover {
    background: #f0f7ff;
}

.result-item-compact.known {
    border-left-color: var(--success-color);
}

.result-item-compact.unknown {
    border-left-color: var(--accent-color);
}

.result-title {
    font-weight: 500;
    color: var(--primary-color);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-value {
    font-weight: 600;
    text-align: right;
    padding-left: 0.5rem;
    min-width: 3rem;
}

.result-item-compact.known .result-value {
    color: var(--success-color);
}

.result-item-compact.unknown .result-value {
    color: var(--accent-color);
    font-style: italic;
}

/* Compact Summary */
.compact-summary {
    display: flex;
    justify-content: space-around;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    border: 1px solid #2c3e50;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

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

.summary-value {
    font-weight: bold;
    font-size: 0.9rem;
}

.summary-value.known {
    color: #4CAF50;
}

.summary-value.unknown {
    color: #ff6b6b;
}

/* Options Modal - 2000s Style */
.options-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.options-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid #3a506b;
}

.modal-header {
    background: linear-gradient(to bottom, #4a6480 0%, #3a506b 100%);
    color: white;
    padding: 1rem;
    border-bottom: 2px solid #2c3e50;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.options-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.option-item {
    background: #f8f9fa;
    border: 1px solid #d1d7e0;
    border-radius: 3px;
    padding: 0.75rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.option-item:hover {
    background: #e9ecef;
    border-color: var(--secondary-color);
}

.option-code {
    display: block;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.option-desc {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

.current-code {
    background: #d4edda;
    border-color: var(--success-color);
    border-width: 2px;
}

.modal-footer {
    padding: 1rem;
    background: #f0f4f8;
    border-top: 1px solid #d1d7e0;
    text-align: center;
}

.modal-footer .code-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    border: 1px solid #b0b7c0;
    display: inline-block;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #a0a7b0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8a8e94;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-row {
        flex-direction: column;
    }
    
    .vin-section {
        min-width: 100%;
    }
    
    .buttons-section {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .summary-section {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .full-vin-input-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-small {
        width: 100%;
        justify-content: center;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .options-list {
        grid-template-columns: 1fr;
    }
}

/* Classic 2000s link styling */
a {
    color: #2c5282;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #1a365d;
}