/* Custom Styles, die 98.css ergänzen */

body {
    background-color: #008080; /* Teal Background */
    margin: 0;
    overflow: hidden; /* Kein Scrollen auf Body-Ebene */
    height: 100vh;
    font-family: 'Pixel', sans-serif;
}

.desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Icons */
.desktop-icon {
    width: 90px;
    margin: 20px;
    text-align: center;
    color: white;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    border: 1px solid transparent;
}

    .desktop-icon img {
        width: 32px;
        height: 32px;
        margin-bottom: 5px;
    }

    .desktop-icon span {
        font-family: 'MS Sans Serif', sans-serif;
        font-size: 14px;
        padding: 2px;
        border: 1px dotted transparent;
        word-break: break-word;
        max-width: 100%;
        box-sizing: border-box;
    }

    .desktop-icon:active span {
        background-color: #000080;
        border: 1px dotted yellow;
    }

    .desktop-icon.selected {
        background-color: #000080; /* Win Blue */
        border: 1px dotted yellow;
        z-index: 1000;
    }

        .desktop-icon.selected span {
            background-color: #000080;
            color: white;
            border: none; /* Das Span-Border vom Hover entfernen */
        }

    /* Hover-Effekt nur wenn NICHT selektiert */
    .desktop-icon:hover:not(.selected) span {
        background-color: #000080;
        border: 1px dotted yellow;
    }

/* Fenster Anpassungen */
.window {
    position: absolute; /* Wichtig für Drag & Drop */
    display: flex;
    flex-direction: column;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.window-body {
    overflow: auto; /* Scrollen INNERHALB des Fensters */
    max-height: 70vh;
}

.bg-white {
    background-color: white !important;
    color: black;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.milestone-fs{
    font-size: 18px;
}

.h-scroll {
    height: 400px;
}

.h-scroll-large {
    height: 600px;
}

/* Grid im Fenster */
.win-masonry {
    column-count: 3;
    column-gap: 10px;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 34px; /* 98.css style height */
    background: silver;
    border-top: 2px solid white;
    display: flex;
    align-items: center;
    padding: 3px;
    z-index: 10000;
    box-shadow: inset 1px 1px #dfdfdf, 1px 0 #000, 0 1px #000, 1px 1px #000;
}

.start-button {
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 2px 6px;
    min-width: 80px;
}

.time-tray {
    margin-left: auto;
    background: white;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 2px 10px;
    margin-right: 5px;
    font-family: sans-serif;
    font-size: 14px;
}

/* Taskbar Items (Tabs) */
.taskbar-tab {
    min-width: 150px;
    text-align: left;
    margin-left: 5px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .taskbar-tab.active {
        background: #e0e0e0;
        border-style: inset; /* Gedrückt-Look */
    }

/* Start Menu Styling */
#start-menu {
    flex-direction: row;
}

.sidebar-stripe {
    width: 25px;
    background: #000080; /* Win Blue */
    color: white;
    display: flex;
    flex-direction: column-reverse; /* Text von unten nach oben */
    align-items: center;
    padding-bottom: 30px;
    font-weight: bold;
    font-size: 1.2rem;
}

    .sidebar-stripe span {
        transform: rotate(-90deg); /* Text drehen */
        margin-top: 10px;
        white-space: nowrap;
    }

.menu-items {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.menu-item {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

    .menu-item:hover {
        background-color: #000080;
        color: white;
    }

    .menu-item img {
        width: 24px;
        height: 24px;
    }

/* --- Maximized State --- */
.window.is-maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 34px) !important; /* Minus Taskbar Höhe */
    transform: none !important;
}

    /* Damit der Inhalt auch wächst */
    .window.is-maximized .window-body {
        height: 100%;
        max-height: none !important; /* Hebt die Beschränkung auf */
        flex-grow: 1;
    }

/* Optional: Window-Body generell flexibler machen */
.window-body {
    flex-grow: 1;
}

/* --- RUBBER BAND SELECTION (Win95 Style) --- */
.selection-box {
    position: fixed;
    border: 1px dotted white; /* Klassisch Win95: Weiße oder schwarze Punkte */
    outline: 1px dotted black; /* Trick für Zweifarbigkeit auf jedem Hintergrund */
    background: transparent;
    z-index: 9999;
    pointer-events: none; /* Klicks gehen durch */
}

/* --- CONTEXT MENU --- */
.context-menu {
    position: fixed;
    z-index: 20000;
    width: 150px;
    background: #c0c0c0;
    border-top: 2px solid white;
    border-left: 2px solid white;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 2px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

    .context-menu .menu-item {
        padding: 2px 10px;
        cursor: default;
        font-family: 'MS Sans Serif', sans-serif;
        font-size: 13px;
        color: black;
    }

        .context-menu .menu-item:hover:not(.disabled) {
            background-color: #000080;
            color: white;
        }

        .context-menu .menu-item.disabled {
            color: #808080;
            text-shadow: 1px 1px white;
        }

        .context-menu .menu-item.bold {
            font-weight: bold;
        }

    .context-menu .divider {
        border-top: 1px solid #808080;
        border-bottom: 1px solid white;
        margin: 3px 2px;
    }

/* --- BLUE SCREEN OF DEATH (BSOD) --- */
#bsod-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0000AA; /* Das klassische Win95 Blau */
    color: white;
    z-index: 999999; /* Muss über ALLEM liegen */
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 18px; /* Große, lesbare Schrift */
    cursor: none; /* Mauszeiger verstecken für echten Freeze-Look */
}

.bsod-container {
    padding: 10vh 5vw; /* Abstand vom Rand */
    max-width: 950px;
    margin: 0 auto;
}

.bsod-header {
    text-align: center;
    margin-bottom: 2rem;
}

.bsod-label {
    background-color: #AAAAAA; /* Grauer Hintergrund */
    color: #0000AA; /* Blaue Schrift */
    padding: 2px 6px;
    font-weight: bold;
}

#bsod-screen ul {
    list-style-type: none; /* Keine Bulletpoints im Original */
    padding: 0;
}

#bsod-screen li {
    margin-bottom: 1rem;
}

.bsod-footer {
    text-align: center;
    margin-top: 2rem;
    animation: blink-cursor 1s step-end infinite;
}

/* --- EXPLORER STYLES --- */
.menu-bar {
    padding: 2px 5px;
    background: silver;
    border-bottom: 1px solid gray;
    display: flex;
    gap: 15px;
}

    .menu-bar span {
        cursor: default;
    }

        .menu-bar span:hover {
            background-color: #000080;
            color: white;
        }

.explorer-toolbar {
    padding: 5px;
    background: silver;
    border-bottom: 1px solid white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.address-input {
    flex-grow: 1;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 2px 5px;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 13px;
    background: white;
}

.explorer-body {
    display: flex;
    height: 100%;
}

.explorer-sidebar {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    border-right: 2px solid;
    border-color: #808080 #fff #fff #808080;
    overflow-y: auto;
    padding: 5px;
    border: 2px inset #dfdfdf;
    margin: 2px;
}

.explorer-content {
    flex-grow: 1;
    border: 2px inset #dfdfdf;
    margin: 2px;
    background: white;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 15px;
}

/* --- WIN95 SCROLLBARS --- */

/* Firefox Fallback (unterstützt nur Farben und Breite) */
* {
    scrollbar-width: auto;
    scrollbar-color: #c0c0c0 #dfdfdf;
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

/* Die Spur (Track) - Klassisches kariertes Dither-Muster */
::-webkit-scrollbar-track {
    background: #dfdfdf;
    background-image: linear-gradient(45deg, #c0c0c0 25%, transparent 25%, transparent 75%, #c0c0c0 75%, #c0c0c0), linear-gradient(45deg, #c0c0c0 25%, transparent 25%, transparent 75%, #c0c0c0 75%, #c0c0c0);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
}

/* Der Balken selbst (Thumb) - 3D Button Look */
::-webkit-scrollbar-thumb {
    background-color: #c0c0c0;
    border-top: 2px solid white;
    border-left: 2px solid white;
    border-bottom: 2px solid black;
    border-right: 2px solid black;
    box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf;
}

    /* Der Bereich, wenn man den Balken anklickt (Active) */
    ::-webkit-scrollbar-thumb:active {
        background-color: #c0c0c0;
        border-top: 2px solid black;
        border-left: 2px solid black;
        border-bottom: 2px solid white;
        border-right: 2px solid white;
        box-shadow: inset 1px 1px #808080;
    }

/* Die Pfeil-Buttons oben und unten */
::-webkit-scrollbar-button {
    background-color: #c0c0c0;
    border-top: 2px solid white;
    border-left: 2px solid white;
    border-bottom: 2px solid black;
    border-right: 2px solid black;
    box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf;
    display: block;
    width: 16px;
    height: 16px;
}

    ::-webkit-scrollbar-button:active {
        border-top: 2px solid black;
        border-left: 2px solid black;
        border-bottom: 2px solid white;
        border-right: 2px solid white;
        box-shadow: inset 1px 1px #808080;
    }

/* Die Ecken, wenn horizontaler und vertikaler Balken aufeinandertreffen */
::-webkit-scrollbar-corner {
    background: #c0c0c0;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    cursor: pointer;
    white-space: nowrap;
}

    .tree-item:hover {
        color: #000080;
        text-decoration: underline; /* Web-Style Hover im Tree */
    }

    .tree-item.active {
        background-color: #000080;
        color: white;
    }

/* File Icon im Grid */
.file-item {
    width: 70px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .file-item:hover span {
        background-color: #000080;
        color: white;
    }

    .file-item img {
        width: 32px;
        height: 32px;
        margin-bottom: 5px;
    }

    .file-item span {
        font-size: 12px;
        word-break: break-word;
        padding: 0 2px;
    }

@keyframes blink-cursor {
    50% {
        opacity: 0;
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}