/* style.css */

/* Basic Reset & Font */
body {
    margin: 0;
    padding: 0;
    font-family: 'MS Sans Serif', 'Arial', sans-serif; /* Classic Windows 95 font */
    background-color: #008080; /* Teal desktop background */
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Prevent body scrollbars */
}

/* Windows 95-like Container (Main Window) */
#game-container {
    background-color: #C0C0C0; /* Standard Windows 95 gray */
    border-top: 2px solid #FFF;
    border-left: 2px solid #FFF;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    box-shadow: 1px 1px 0 #000; /* Darker shadow for depth */
    padding: 5px;
    width: 90%;
    max-width: 800px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

/* Header (Window Title Bar) */
header {
    background: linear-gradient(to right, #0A246A, #A6CAF0); /* Blue gradient title bar */
    color: #FFF;
    padding: 3px 5px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000; /* Separator from content */
    margin-bottom: 5px;
}

header h1 {
    margin: 0;
    font-size: 1.1em;
    text-shadow: 1px 1px #000; /* Slight shadow for text */
}

/* Stats Area */
#stats {
    background-color: #C0C0C0;
    color: #000;
    padding: 2px 5px;
    border: 1px inset #808080;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Erlaubt das Umbrechen der Elemente in die nächste Zeile */
    gap: 5px; /* Fügt einen kleinen Abstand zwischen den Zeilen/Elementen hinzu */
}

.stat-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Progress Bar */
progress {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100px;
    height: 16px;
    background-color: #C0C0C0; /* Background of the bar */
    border: 1px solid #808080; /* Border around the bar */
    box-shadow: inset 1px 1px #000, inset -1px -1px #FFF; /* Inset shadow */
    vertical-align: middle;
    transition: width 0.3s ease; /* Weicherer Übergang für die Anzeige */
}

progress::-webkit-progress-bar {
    background-color: #C0C0C0;
}

progress::-webkit-progress-value {
    background-color: #0A246A; /* Blue fill */
    border-right: 1px solid #FFF; /* Light line on the right of the fill */
}

progress::-moz-progress-bar {
    background-color: #0A246A; /* Blue fill for Firefox */
}

/* Kritischer Stress-Zustand */
progress.critical::-webkit-progress-value {
    background-color: #AA0000; /* Rot */
}
progress.critical::-moz-progress-bar {
    background-color: #AA0000;
}

#satisfaction-bar::-webkit-progress-value {
    background-color: #E1E100; /* Gelb für Zufriedenheit */
}
#satisfaction-bar::-moz-progress-bar {
    background-color: #E1E100;
}

#mental-bar::-webkit-progress-value {
    background-color: #008000; /* Grün für Gesundheit */
}
#mental-bar::-moz-progress-bar {
    background-color: #008000;
}

/* Main Content Area */
main {
    display: flex;
    flex-grow: 1;
    gap: 5px;
}

/* Ticket List & Workspace (Inner Panels) */
#workspace {
    background-color: #C0C0C0;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #FFF;
    border-bottom: 2px solid #FFF;
    padding: 5px;
    flex: 1;
    overflow-y: auto; /* Scrollable if content overflows */
}

#workspace {
    display: flex;
    flex-direction: column;
}

#workspace h2 {
    margin-top: 0;
    font-size: 1.1em;
    padding-bottom: 5px;
    border-bottom: 1px solid #808080; /* Separator */
}

/* Status Bar for Feedback */
.status-bar {
    margin-top: 5px;
    background-color: #C0C0C0;
    border: 2px inset #FFF;
    padding: 3px 5px;
    font-size: 0.85em;
    min-height: 1.2em;
}

/* Buttons */
button {
    background-color: #C0C0C0;
    border-top: 2px solid #FFF;
    border-left: 2px solid #FFF;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 4px 10px;
    font-family: 'MS Sans Serif', 'Arial', sans-serif;
    font-size: 0.9em;
    cursor: pointer;
    outline: none; /* Remove focus outline */
}

button:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #FFF;
    border-bottom: 2px solid #FFF;
    padding: 5px 9px 3px 11px; /* Shift text slightly for pressed effect */
}

/* Ticket Detail Content (Input-like field) */
#ticket-detail-content {
    background-color: #FFF; /* White background for text area */
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #FFF;
    border-bottom: 1px solid #FFF;
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 5px;
}

#ticket-detail-content h3 {
    margin-top: 0;
    font-size: 1em;
}

#ticket-detail-content p {
    margin-bottom: 10px;
}

#ticket-detail-content button {
    margin-top: 10px;
}

/* Solution Buttons Container */
.solution-buttons {
    margin-top: 15px;
}

.solution-buttons button {
    display: block; /* Jede Schaltfläche in einer neuen Zeile */
    margin-bottom: 5px; /* Abstand zwischen den Schaltflächen */
    width: 100%; /* Schaltflächen füllen die Breite aus */
    box-sizing: border-box; /* Padding und Border in die Breite einbeziehen */
}

/* Basic Scrollbar styling (cross-browser compatibility is limited for full Win95 look) */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background-color: #C0C0C0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #FFF;
    border-bottom: 1px solid #FFF;
}

::-webkit-scrollbar-thumb {
    background-color: #C0C0C0;
    border-top: 2px solid #FFF;
    border-left: 2px solid #FFF;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
}

::-webkit-scrollbar-button {
    background-color: #C0C0C0;
    border-top: 2px solid #FFF;
    border-left: 2px solid #FFF;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    height: 16px;
    width: 16px;
}

::-webkit-scrollbar-button:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #FFF;
    border-bottom: 2px solid #FFF;
}

::-webkit-scrollbar-corner {
    background-color: #C0C0C0;
}

/* Game Over & Utility */
.hidden {
    display: none !important;
}

#game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0000AA; /* Classic BSOD Blue */
    color: #FFF;
    z-index: 10002; /* Höher als andere Overlays */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    padding: 20px;
    text-align: center;
}

.bsod-content h1 {
    background-color: #C0C0C0;
    color: #0000AA;
    display: inline-block;
    padding: 0 10px;
    margin-bottom: 20px;
}

.bsod-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Start Screen Overlay */
#start-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #008080; /* Teal Desktop */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.dialog-box header {
    margin-bottom: 0; /* Override default header margin */
}

.dialog-box {
    background-color: #C0C0C0;
    border-top: 2px solid #FFF;
    border-left: 2px solid #FFF;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    box-shadow: 1px 1px 0 #000;
    width: 400px;
    padding: 2px;
}

.dialog-content {
    padding: 20px 15px 15px 15px;
}

.start-screen-text-content p {
    margin-top: 0; /* Override default paragraph margin */
}

.setup-options {
    font-size: 0.9em;
    margin-top: 10px;
    border: 1px inset #808080;
    padding: 10px;
    background: #e0e0e0;
}

#category-selection label {
    display: block;
    margin-bottom: 2px;
}

/* Highscore Table */
.highscore-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFF;
    border: 1px inset #808080;
    font-size: 0.9em;
}

.highscore-table th {
    background: #C0C0C0;
    border: 1px outset #FFF;
    padding: 5px;
    text-align: left;
}

.highscore-table td {
    padding: 5px;
    border-bottom: 1px solid #C0C0C0;
}

#highscore-overlay {
    position: fixed;
    z-index: 10003; /* Höher als das Game-Over-Overlay (10002) */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}