:root {
    --win-grey: #c0c0c0;
    --win-dark: #808080;
    --win-light: #ffffff;
    --win-blue: #000080;
    --text-color: #000000;
}

body {
    background-color: #008080; /* Classic Teal Background */
    font-family: "Courier New", Courier, monospace; /* Retro font */
    margin: 0;
    padding: 20px;
    color: var(--text-color);
}

.main-container {
    background-color: var(--win-grey);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border: 2px outset var(--win-light);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
}

/* Header */
.header-bar {
    background: linear-gradient(90deg, var(--win-blue), #1084d0);
    padding: 5px 10px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-area h1 {
    font-size: 18px;
    margin: 0;
    font-family: Tahoma, sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
}

.version {
    font-size: 10px;
    opacity: 0.8;
}

.flags {
    display: flex;
    gap: 5px;
}

.flag-icon {
    border: 1px outset white;
    cursor: pointer;
    opacity: 0.6;
    width: 25px;
    height: auto;
}

.flag-icon.active, .flag-icon:hover {
    opacity: 1;
    border: 1px inset white;
}

/* Content */
.content-box {
    padding: 15px;
}

.bevel-box {
    border: 2px inset var(--win-light);
    background: #dcdcdc;
    padding: 15px;
    margin-bottom: 20px;
}

marquee {
    background-color: black;
    color: lime;
    font-family: "Consolas", monospace;
    margin-bottom: 10px;
    border: 2px inset var(--win-dark);
    padding: 2px;
}

.upload-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

input[type="file"] {
    background: white;
    border: 1px inset grey;
    padding: 5px;
    width: 80%;
}

/* Retro Button Style */
.retro-btn {
    background-color: var(--win-grey);
    border: 2px outset var(--win-light);
    color: black;
    padding: 5px 20px;
    font-family: Tahoma, sans-serif;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
}

.retro-btn:active {
    border: 2px inset var(--win-light);
    transform: translate(1px, 1px);
}

.retro-btn:disabled {
    color: var(--win-dark);
    border: 2px solid var(--win-dark);
    cursor: not-allowed;
    background-color: #e0e0e0;
}

.error-text {
    color: red;
    font-weight: bold;
    margin-top: 10px;
    font-family: Tahoma, sans-serif;
    font-size: 12px;
}

/* Loading Overlay */
#loading-overlay {
    display: none;
    text-align: center;
    margin: 20px 0;
    font-family: "Consolas", monospace;
    color: var(--win-blue);
    background: white;
    border: 2px inset grey;
    padding: 10px;
}

.progress-bar {
    width: 0%;
    height: 20px;
    background-color: var(--win-blue);
    margin-top: 5px;
    transition: width 0.1s;
}

/* VIN Plate Visuals */
.vin-plate-wrapper {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.plate-metal {
    background: radial-gradient(circle, #b0b0b0 0%, #707070 100%);
    width: 100%;
    max-width: 500px;
    border: 2px solid #333;
    padding: 10px;
    border-radius: 4px;
    box-shadow: inset 0 0 20px #000, 2px 2px 5px rgba(0,0,0,0.5);
    font-family: Arial, sans-serif;
    color: #111;
    position: relative;
}

/* Rivets */
.plate-metal::before, .plate-metal::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #fff 0%, #333 100%);
    border-radius: 50%;
    border: 1px solid #222;
}
.plate-metal::before { top: 5px; left: 5px; }
.plate-metal::after { top: 5px; right: 5px; }

.plate-header {
    border-bottom: 2px solid black;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.logo {
    font-weight: 900;
    font-style: italic;
    font-size: 24px;
    border: 2px solid black;
    padding: 0 5px;
    background: #a0a0a0;
}

.company-text {
    font-size: 9px;
    text-align: right;
    font-weight: bold;
    line-height: 1.1;
}

.plate-row {
    display: flex;
    justify-content: space-between;
    gap: 2px;
}

.header-row .cell-label {
    font-size: 10px;
    color: #444; 
    text-transform: uppercase;
    flex: 1;
    text-align: center;
    padding-bottom: 2px;
}

.data-row {
    margin-bottom: 5px;
    display: flex;
    gap: 2px;
}

.stamped {
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 18px;
    color: #1a1a1a;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.2);
    flex: 1;
    text-align: center;
    background-color: #a8a8a8;
    border: 1px inset #555;
    padding: 4px 0;
}

.bottom-row .stamped {
    font-size: 14px;
}

/* Table Specs */
.retro-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px outset white;
    background-color: white;
    font-size: 14px;
}

.retro-table th {
    background-color: var(--win-grey);
    border: 1px outset white;
    padding: 5px;
    text-align: left;
    font-family: Tahoma, sans-serif;
}

.retro-table td {
    border: 1px inset grey;
    padding: 4px;
}

.row-highlight {
    background-color: #ffffcc; /* Highlight rare specs */
}

h3 {
    font-family: Tahoma, sans-serif;
    border-bottom: 2px groove var(--win-light);
    padding-bottom: 5px;
}

.footer {
    text-align: center;
    padding: 10px;
    font-size: 12px;
    border-top: 2px groove white;
    margin-top: 20px;
    font-family: Tahoma, sans-serif;
}

/* --- WINDOWS 98 ERROR MODAL STYLES --- */
.win98-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.win98-window {
    background-color: var(--win-grey);
    border: 2px outset var(--win-light);
    width: 350px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    font-family: Tahoma, sans-serif;
    display: flex;
    flex-direction: column;
}

.win98-title-bar {
    background: linear-gradient(90deg, var(--win-blue), #1084d0);
    padding: 3px 3px 3px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.win98-title-text {
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.win98-close-btn {
    background-color: var(--win-grey);
    border: 2px outset var(--win-light);
    width: 16px;
    height: 14px;
    font-size: 10px;
    line-height: 12px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
}

.win98-close-btn:active {
    border: 2px inset var(--win-light);
}

.win98-body {
    padding: 20px 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.win98-icon-container {
    flex-shrink: 0;
}

.error-icon-circle {
    width: 32px;
    height: 32px;
    background-color: red;
    border-radius: 50%;
    border: 2px solid #800000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    font-family: Arial, sans-serif;
}

.error-icon-x {
    display: block;
    margin-top: -2px;
}

.win98-message {
    font-size: 13px;
    color: black;
}

.win98-btn-row {
    display: flex;
    justify-content: center;
    padding-bottom: 15px;
}

.win98-btn {
    background-color: var(--win-grey);
    border: 2px outset var(--win-light);
    color: black;
    padding: 4px 25px;
    font-family: Tahoma, sans-serif;
    font-size: 12px;
    cursor: pointer;
    outline: 1px dotted black;
    outline-offset: -5px;
}

.win98-btn:active {
    border: 2px inset var(--win-light);
    transform: translate(1px, 1px);
    outline: none;
}