/* Global Reset */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /* Use the tiled background for the nostalgic look */
    background: url('compatibility_test_bg.png') repeat;
    font-family: 'Arial', sans-serif; /* Fallback */
    color: #000080; /* Navy Blue - common retro text color */
}

/* Retro Font Simulation */
@font-face {
    font-family: 'PixelEmulator';
    src: url('https://fonts.cdn.assets.ansar.com/css/PressStart2P.ttf') format('truetype');
    /* Note: Using a CDN font that mimics pixel art for easy retro feel */
}

body {
    font-family: 'PixelEmulator', monospace;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

#app-container {
    width: 100%;
    max-width: 800px; /* Constrain main container for the retro desktop look */
    background-color: #C0C0C0; /* Standard Windows 95 gray */
    border: 3px solid #FFFFFF;
    box-shadow: 
        inset -3px -3px #000000,
        inset 3px 3px #FFFFFF,
        -5px 5px 15px rgba(0, 0, 0, 0.5); /* Drop shadow for floating effect */
    padding: 10px;
    box-sizing: border-box;
}

/* Header/Title Bar */
header {
    background-color: #000080; /* Navy Blue title bar */
    color: #FFFFFF;
    padding: 5px;
    margin-bottom: 15px;
    border: 2px solid #000000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 60px;
}

header h1 {
    font-size: 1.2em;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 1px 1px #00FFFF; /* Cyan shadow */
    flex-grow: 1;
}

.header-deco {
    height: 100%;
    object-fit: cover;
    width: 50px;
    image-rendering: pixelated;
}

/* Window Component */
.window {
    border: 3px solid #FFFFFF;
    box-shadow: 
        inset -3px -3px #000000,
        inset 3px 3px #FFFFFF;
    background-color: #FFFFFF;
    margin-bottom: 20px;
    padding: 1px;
}

.window-title {
    background-color: #008080; /* Teal/Aqua Title Bar */
    color: #FFFFFF;
    padding: 3px 10px;
    font-size: 0.8em;
    font-weight: bold;
    border: 2px solid #000000;
    margin: 5px;
}

.window-content {
    padding: 15px;
    background-color: #FFFFFF;
}

/* Form Elements */
.input-group {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

label {
    width: 120px;
    text-align: right;
    margin-right: 10px;
    color: #FF0000; /* Red labels */
}

input[type="text"] {
    flex-grow: 1;
    padding: 5px;
    border: 2px solid #000000;
    background-color: #F0F0F0;
    box-shadow: inset 2px 2px #808080;
    font-family: 'PixelEmulator', monospace;
    font-size: 0.9em;
}

/* Buttons */
.action-button {
    background-color: #00FFFF; /* Bright Cyan button */
    color: #000080; /* Navy text */
    border: 3px solid #000080;
    padding: 8px 15px;
    margin-top: 15px;
    cursor: pointer;
    font-family: 'PixelEmulator', monospace;
    font-size: 0.8em;
    text-shadow: 1px 1px #FFFFFF;
    box-shadow: 
        -2px -2px #FFFFFF,
        2px 2px #000000;
    transition: all 0.05s linear;
}

.action-button:hover:not(:disabled) {
    background-color: #FFFF00; /* Yellow hover */
}

.action-button:active:not(:disabled) {
    box-shadow: 
        inset 2px 2px #000000,
        inset -2px -2px #FFFFFF;
    transform: translate(2px, 2px);
}

.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #AAAAAA;
}

/* Results Display */
#results-area {
    min-height: 200px;
    position: relative;
}

#report-content {
    display: none;
}

#report-title {
    color: #008000; /* Green success text */
    font-size: 1.1em;
    border-bottom: 2px dashed #808080;
    padding-bottom: 5px;
    margin-top: 0;
}

#score-display {
    text-align: center;
    margin: 20px 0;
    background-color: #F0F0F0;
    border: 3px solid #000080;
    padding: 10px;
}

#score-number {
    font-size: 3em;
    font-weight: bold;
    color: #FF00FF; /* Bright Pink */
    margin-right: 5px;
    text-shadow: 2px 2px #000000;
}

.score-label {
    font-size: 1.5em;
    color: #000080;
}

#reason-categories h3 {
    background-color: #E0E0E0;
    color: #000000;
    padding: 5px;
    border-left: 5px solid #FF00FF;
    font-size: 0.9em;
    margin-top: 15px;
    margin-bottom: 5px;
}

#reason-categories p {
    margin-left: 10px;
    line-height: 1.4;
    font-size: 0.85em;
    color: #333;
}

/* Loading Overlay */
#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #FF00FF; /* Pink spinner */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 10px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.blink {
    animation: blinker 1s steps(1, end) infinite;
    color: #FF0000;
}

@keyframes blinker {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

/* Utility */
.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    font-size: 0.7em;
    padding-top: 10px;
    border-top: 2px solid #808080;
    color: #555;
}