/* Jahrgang 1998: Windows-98-Desktop auf 98.css.
   Laufschrift, Zähler, Baustelle und 88x31-Buttons kommen aus ../css/common.css. */

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 44px;              /* Platz für die Taskleiste */
  background: #008080;               /* der Original-Desktop */
  color: #222;
}

a { color: #0000ff; }
a:visited { color: #800080; }
a:hover { color: #ff0000; }

/* ---------- Desktop-Layout ---------- */

.desktop {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  box-sizing: border-box;
}

.icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding-top: 6px;
}

.icon {
  width: 84px;
  text-align: center;
  color: #fff;
  text-decoration: none;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  -webkit-font-smoothing: none;
}
.icon svg { width: 32px; height: 32px; display: block; margin: 0 auto 5px; }
.icon span { padding: 1px 2px; text-shadow: 1px 1px 0 #000; }
.icon:hover span,
.icon:focus-visible span { background: navy; outline: 1px dotted #fff; text-shadow: none; }
.icon.static { cursor: default; }
.icon.static:hover span { background: none; outline: none; text-shadow: 1px 1px 0 #000; }

.windows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.win-wide { grid-column: 1 / -1; }
.window { min-width: 0; }
.windows > .window:nth-child(3) { margin-top: 28px; }   /* leichte Kaskade */

/* Fenster-Chrome */
h2.title-bar-text {
  font-size: 11px;
  line-height: 1.2;
  margin: 0 24px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window-body { line-height: 1.5; }
.window-body p { margin: 0 0 8px; }
.window-body > :last-child { margin-bottom: 0; }
fieldset { margin: 0 0 10px; }
.window-body fieldset:last-child { margin-bottom: 0; }

.menubar {
  list-style: none;
  margin: 0;
  padding: 3px 4px 1px;
  display: flex;
  gap: 12px;
  font-size: 11px;
}
.menubar li { cursor: default; }

/* angesprungenes Fenster ist aktiv, alle anderen werden grau */
body:has(.window:target) .window:not(:target) > .title-bar {
  background: linear-gradient(90deg, grey, #b5b5b5);
}
.window:target { scroll-margin-top: 12px; }

/* ---------- Willkommen (Editor) ---------- */

.notepad {
  font-family: "Fixedsys", "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 10px;
}

/* ---------- Über mich ---------- */

.profile { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 10px; }
.photo {
  flex: 0 0 auto;
  width: 80px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.photo svg { width: 64px; height: 80px; }
.props { background: transparent; white-space: normal; }
.props th { text-align: left; padding: 1px 8px 1px 0; vertical-align: top; }
.props td { padding: 1px 0; }

.buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }

/* Links, die wie 98-Buttons aussehen (98.css stylt nur <button>) */
.btn, .task, .start {
  box-sizing: border-box;
  display: inline-block;
  min-width: 75px;
  padding: 3px 12px;
  background: silver;
  color: #222;
  text-align: center;
  text-decoration: none;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  -webkit-font-smoothing: none;
  border: none;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}
.btn:hover, .task:hover, .start:hover { color: #222; }
.btn:active, .task:active, .start:active {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

/* ---------- Projekte (Explorer) ---------- */

.address { margin: 0 0 8px; }
.address input { flex: 1; min-width: 0; }
.tree-view { min-height: 120px; }
.tree-view li { line-height: 1.5; }

/* ---------- Links ---------- */

.linklist { margin: 0; padding-left: 18px; }
.webring { text-align: center; font-weight: bold; }
.small { font-size: 10px; color: #444; }

/* ---------- Gästebuch ---------- */

.entries { min-height: 60px; margin: 0 0 10px; padding: 10px; background: #fff; }
.entries .empty { margin: 0; color: #666; font-style: italic; }

/* ---------- Taskleiste ---------- */

.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  height: 30px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 2px;
  background: silver;
  border-top: 1px solid #dfdfdf;
  box-shadow: inset 0 1px #fff;
  overflow-x: auto;
  overflow-y: hidden;
}
.start {
  flex: 0 0 auto;
  min-width: 0;
  padding: 2px 6px 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
}
.start svg { width: 16px; height: 14px; }
.divider {
  flex: 0 0 auto;
  width: 0;
  height: 22px;
  margin: 0 2px;
  border-left: 1px solid grey;
  border-right: 1px solid #fff;
}
.task {
  flex: 0 1 150px;
  min-width: 60px;
  padding: 2px 6px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body:has(#willkommen:target) .task[href="#willkommen"],
body:has(#ueber-mich:target) .task[href="#ueber-mich"],
body:has(#projekte:target)   .task[href="#projekte"],
body:has(#links:target)      .task[href="#links"],
body:has(#gaestebuch:target) .task[href="#gaestebuch"] {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  background-image: repeating-conic-gradient(#fff 0 25%, silver 0 50%);
  background-size: 2px 2px;
  font-weight: bold;
}
.tray {
  flex: 0 0 auto;
  margin-left: auto;
  height: 22px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
}
.tray svg { width: 16px; height: 16px; }

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 820px) {
  .desktop { grid-template-columns: minmax(0, 1fr); padding: 12px 10px 20px; }
  .icons { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 4px; padding-top: 0; }
  .windows { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .windows > .window:nth-child(3) { margin-top: 0; }
  .profile { flex-direction: column; }
  .task { flex-basis: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
