/* ==========================================================================
   Windows-XP-„Luna“-Feinschliff (wird nach xp.css geladen)
   - Allgemeine Regeln: XP-Formen, Schrift, Symbole, Startmenü-Aufbau
   - html.luna: exakte Originalfarben des Standarddesigns „Luna Blau“
   ========================================================================== */
:root { --fs: 11px; --taskbar-h: 30px; }
html[data-fontsize="large"] { --fs: 13px; }
html[data-fontsize="xlarge"] { --fs: 15px; }
html[data-iconsize="small"] { --icon-px: 32px; }
html[data-iconsize="medium"] { --icon-px: 32px; }
html[data-iconsize="large"] { --icon-px: 48px; }
html.luna { --sel-bg: #316ac5; --hover-bg: #e8eef9; }

/* ---------- Desktopsymbole (Öffnen per Einfachklick, Markieren durch Zeigen) ---------- */
.desk-icon { gap: 4px; padding: 2px 1px; border: 0; cursor: pointer; }
.desk-icon img { width: var(--icon-px); height: var(--icon-px); filter: none; image-rendering: auto; }
.desk-icon span { font: var(--fs)/1.25 Tahoma, Verdana, sans-serif; color: #fff; text-shadow: 1px 1px 1px #000; padding: 0 1px; }
.desk-icon:hover span { text-decoration: underline; }
.desk-icon.selected img, .desk-icon.selected span { filter: none; background: none; }
.desk-icon.launching img { opacity: .55; }
.desk-icon:focus-visible { outline: 1px dotted #fff; outline-offset: -1px; }

/* ---------- Taskleiste ---------- */
.taskbar::before { opacity: 1; border-top: 0;
  background: linear-gradient(180deg, var(--acc-d3) 0, var(--acc-l1) 3%, var(--acc-l2) 6%, var(--acc-l1) 10%, var(--acc) 18%, var(--acc-d1) 40%, var(--acc) 86%, var(--acc-d1) 95%, var(--acc-d2) 100%); }
html.luna .taskbar::before {
  background: linear-gradient(180deg, #1f2f86 0, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%, #2663da 18%,
    #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%, #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%); }
html:not(.no-transparency) .taskbar::before { opacity: .94; }

.start-btn { gap: 4px; height: 100%; margin-right: 8px; padding: 0 24px 0 8px; border-radius: 0 12px 12px 0;
  font: italic bold 19px/1 "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; letter-spacing: .5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,.65);
  background: radial-gradient(ellipse 85% 120% at 45% 0%, #7ad070 0%, #4fae48 30%, #3c983a 60%, #2f8a2e 85%, #276f27 100%);
  box-shadow: inset 0 1px 1px #8fe28a, inset -3px 0 3px rgba(0,0,0,.28), 1px 0 1px #1c4d1c, 3px 0 4px rgba(0,0,0,.25); }
.start-btn img { width: 22px; height: 22px; margin-top: 1px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.45)); }
.start-btn span { padding-bottom: 2px; }
.start-btn:hover { filter: brightness(1.08); }
.start-btn.pressed { background: radial-gradient(ellipse 85% 120% at 45% 0%, #4c9c46 0%, #357f33 60%, #2a6b28 100%); box-shadow: inset 1px 1px 4px rgba(0,0,0,.6); }

.quicklaunch { padding: 0 6px 0 4px; border-right: 0; box-shadow: none; position: relative; }
.quicklaunch::before, .quicklaunch::after { content: ""; position: absolute; top: 5px; bottom: 5px; width: 3px;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.5) 0 1px, transparent 1px 2px, rgba(0,0,0,.35) 2px 3px, transparent 3px 4px); }
.quicklaunch::before { left: -2px; } .quicklaunch::after { right: 0; }
.ql-btn { width: 22px; height: 22px; padding: 2px; border-radius: 2px; }
.ql-btn img { width: 16px; height: 16px; }

.task { flex: 0 1 160px; height: 24px; padding: 0 8px; gap: 6px; border: 0; border-radius: 2px; text-shadow: none;
  font: var(--fs) Tahoma, sans-serif; color: #fff;
  background: var(--acc-l1); box-shadow: inset -1px 0 rgba(0,0,0,.3), inset 1px 1px 1px rgba(255,255,255,.2); }
.task:hover { filter: none; background: var(--acc-l2); }
.task.active { background: var(--acc-d2); box-shadow: inset 0 0 1px 1px rgba(0,0,0,.3), inset 1px 0 1px rgba(0,0,0,.7); }
html.luna .task { background: #3c81f3; }
html.luna .task:hover { background: #53a3ff; }
html.luna .task.active { background: #1e52b7; }

.tray { padding: 0 10px 0 10px; gap: 3px; }
html.luna .tray {
  background: linear-gradient(180deg, #0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%,
    #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9 100%);
  border-left: 1px solid #1042af; box-shadow: inset 1px 0 1px #18bbff; }
.tray-btn { width: 20px; height: 20px; font-size: 13px; }
.tray-clock { font: var(--fs) Tahoma, sans-serif; text-shadow: none; padding: 0 2px 0 6px; }

/* ---------- Startmenü ---------- */
.startmenu { width: 384px; border-radius: 7px 7px 0 0; border: 0; background: var(--acc);
  box-shadow: 0 0 0 1px var(--acc-d1), 3px 3px 9px rgba(0,0,0,.55); font: var(--fs) Tahoma, sans-serif; }
.sm-head { height: 66px; gap: 8px; padding: 6px 10px; border-radius: 7px 7px 0 0; position: relative;
  background: linear-gradient(180deg, var(--acc-d1) 0%, var(--acc-d1) 20%, var(--acc) 55%, var(--acc-l1) 100%); }
html.luna .sm-head { background: linear-gradient(180deg, #1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%,
  #1e70d9 54%, #2476dc 60%, #297ae0 65%, #3482e3 77%, #3786e5 79%, #428ee9 90%, #4791eb 100%); }
.sm-pic { width: 48px; height: 48px; border: 2px solid #f0f0f0; border-radius: 4px; box-shadow: 1px 1px 3px rgba(0,0,0,.55); background: #fff; }
.sm-name { font: bold 14px Tahoma, sans-serif; color: #fff; text-shadow: 1px 1px 2px #0f1089; }
.sm-cols { border-top: 0; position: relative; }
.sm-cols::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, #da884a 50%, transparent); }
.sm-left { flex: 0 0 190px; padding: 6px 0 4px; }
.sm-right { flex: 1; padding: 6px 0; border-left: 1px solid #95bdee; }
html.luna .sm-right { background: #d3e5fa; }
html.dark .sm-right { border-left-color: #3a3f48; }
.sm-item { gap: 6px; padding: 3px 6px; min-height: 28px; }
.sm-item img { width: 24px; height: 24px; }
.sm-item.big { min-height: 40px; }
.sm-item.big img { width: 32px; height: 32px; }
.sm-item small { color: #616161; font-size: var(--fs); }
.sm-right .sm-item b { font-weight: bold; color: #00136b; }
html.dark .sm-right .sm-item b { color: #cfe0ff; }
.sm-left .sm-item b { color: #000; } html.dark .sm-left .sm-item b { color: #eee; }
.sm-left .sm-item:not(.big) b { font-weight: normal; }
.sm-item:hover, .sm-item:focus-visible, .sm-all:hover { background: var(--sel-bg); }
.sm-sep { margin: 4px 10px; background: linear-gradient(90deg, transparent, #c5c2b2 20%, #c5c2b2 80%, transparent); }
.sm-sep.light { margin: 4px 10px; background: linear-gradient(90deg, transparent, #9fbfe8 20%, #9fbfe8 80%, transparent); }
.sm-all { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 5px 8px; margin: 2px 6px 0; }
.sm-all img { width: 16px; height: 16px; }
.sm-foot { height: 40px; align-items: center; gap: 4px; padding: 0 8px;
  background: linear-gradient(180deg, var(--acc-l1) 0%, var(--acc) 30%, var(--acc-d1) 100%); }
html.luna .sm-foot { background: linear-gradient(180deg, #4282d6 0%, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%,
  #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d5 75%, #1165d3 83%, #0f61cb 88%); }
.sm-foot-btn { gap: 5px; padding: 3px 6px; font: var(--fs) Tahoma, sans-serif; }
.sm-foot-btn img { width: 22px; height: 22px; }
.sm-foot-btn:hover { background: rgba(255,255,255,.2); }

/* ---------- Fenster (Luna) ---------- */
.win { padding: 0 3px 3px; border-radius: 8px 8px 0 0;
  box-shadow: inset -1px -1px var(--acc-d3), inset 1px 1px var(--acc-d1), inset -2px -2px var(--acc-d2), inset 2px 2px var(--acc-l1),
    inset -3px -3px var(--acc-d1), inset 3px 3px var(--acc), 2px 4px 14px rgba(0,0,0,.4); }
.win-title { height: 28px; margin: 0 -3px; padding: 0 5px 0 6px; gap: 4px; border-radius: 8px 8px 0 0;
  border-top: 1px solid var(--acc-d1); border-left: 1px solid var(--acc-d1); border-right: 1px solid var(--acc-d2);
  font: bold 13px "Trebuchet MS", Tahoma, sans-serif; text-shadow: 1px 1px var(--acc-d3);
  background: linear-gradient(180deg, var(--acc-l2) 0%, var(--acc) 8%, var(--acc) 40%, var(--acc-l1) 88%, var(--acc-l1) 93%, var(--acc) 95%, var(--acc-d1) 96%, var(--acc-d1) 100%); }
.win-text { font-size: 13px; letter-spacing: .2px; }
html.luna .win { background: #0054e3;
  box-shadow: inset -1px -1px #00138c, inset 1px 1px #0831d9, inset -2px -2px #001ea0, inset 2px 2px #166aee,
    inset -3px -3px #003bda, inset 3px 3px #0855dd, 2px 4px 14px rgba(0,0,0,.4); }
html.luna .win-title { border-top-color: #0831d9; border-left-color: #0831d9; border-right-color: #001ea0; text-shadow: 1px 1px #0f1089;
  background: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7); }
html.luna .win:not(.active) { background: #7b9ae4;
  box-shadow: inset -1px -1px #5872c8, inset 1px 1px #8aa5ec, inset -2px -2px #6d89d8, inset 2px 2px #a2baf2, 2px 4px 10px rgba(0,0,0,.25); }
html.luna .win:not(.active) > .win-title { filter: none; color: #d8e4f8; text-shadow: none; border-color: #7d99e2;
  background: linear-gradient(180deg, #a9c1f5, #7b98e0 8%, #7d99e2 40%, #8ca8ec 88%, #8ca8ec 93%, #7f9be4 95%, #6a84d6 96%, #6a84d6); }
.win-body { border: 1px solid var(--acc-d1); }
html.luna .win-body { border-color: #0831d9; }
.win.maximized { padding: 0 3px 3px; }
.win.maximized .win-title { border-radius: 0; }

.wb { width: 21px; height: 21px; border: 1px solid #fff; border-radius: 3px; box-shadow: none;
  background: radial-gradient(circle at 90% 90%, var(--acc-d1) 0%, var(--acc) 55%, var(--acc-l1) 70%, var(--acc-l2) 90%, #fff 100%); }
html.luna .wb { background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%); }
.wb-close, html.luna .wb-close { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.wb:hover { filter: brightness(1.12); }
.wb:active { filter: brightness(.85); }
html.luna .win:not(.active) .wb { opacity: .75; }
.wb-min::before { left: 4px; bottom: 4px; width: 7px; height: 3px; }
.wb-max::before { left: 4px; top: 4px; width: 11px; height: 11px; border-top-width: 3px; }
.wb-max.is-max::before { left: 7px; top: 3px; width: 8px; height: 8px; border-top-width: 2px; }
.wb-max.is-max::after { left: 3px; top: 7px; width: 8px; height: 8px; border-top-width: 2px; }
html.luna .wb-max.is-max::after { background: #2263d5; }
.wb-close::before, .wb-close::after { left: 8.5px; top: 3px; width: 2px; height: 13px; }

/* ---------- Bedienelemente (Originalschatten von XP) ---------- */
.btn { font: var(--fs) Tahoma, sans-serif; min-width: 75px; height: 23px; border: 1px solid #003c74; border-radius: 3px; color: #000;
  background: linear-gradient(180deg, #fff, #ecebe6 86%, #d6d0c5); box-shadow: none; }
.btn:hover:not(:disabled) { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.btn:focus-visible, .btn-primary { box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; outline: 1px dotted #000; outline-offset: -4px; }
.btn-primary { font-weight: normal; outline: 0; }
.btn:active:not(:disabled) { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); box-shadow: none; }
.btn:disabled { color: #a1a192; border-color: #c9c7ba; background: #f5f4ea; }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="time"], input:not([type]), select, textarea { border-color: #7f9db9; }
html.dark input[type="text"], html.dark input[type="password"], html.dark input[type="search"], html.dark input[type="number"],
html.dark select, html.dark textarea { border-color: var(--input-border); }

/* ---------- Bildlaufleisten im Luna-Stil ---------- */
html.luna:not(.dark) ::-webkit-scrollbar { width: 17px; height: 17px; }
html.luna:not(.dark) ::-webkit-scrollbar-track { background: linear-gradient(90deg, #f3f1ec, #fefefe); }
html.luna:not(.dark) ::-webkit-scrollbar-track:horizontal { background: linear-gradient(180deg, #f3f1ec, #fefefe); }
html.luna:not(.dark) ::-webkit-scrollbar-thumb { border: 1px solid #fff; border-radius: 3px; box-shadow: inset 0 0 0 1px #b8ccf8;
  background: #c8d7fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M0 1h8M0 3h8M0 5h8M0 7h8' stroke='%23eef4ff' stroke-width='1'/%3E%3Cpath d='M1 2h7M1 4h7M1 6h7' stroke='%238cb0f8' stroke-width='1'/%3E%3C/svg%3E") center no-repeat; }
html.luna:not(.dark) ::-webkit-scrollbar-thumb:hover { background-color: #dae5fe; }
html.luna:not(.dark) ::-webkit-scrollbar-button:single-button { display: block; width: 17px; height: 17px; border: 1px solid #fff; border-radius: 3px;
  box-shadow: inset 0 0 0 1px #b8ccf8; background-color: #c8d7fc; background-repeat: no-repeat; background-position: center; }
html.luna:not(.dark) ::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6'%3E%3Cpath d='M1 5l3.5-3.5L8 5' fill='none' stroke='%234d6185' stroke-width='2'/%3E%3C/svg%3E"); }
html.luna:not(.dark) ::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%234d6185' stroke-width='2'/%3E%3C/svg%3E"); }
html.luna:not(.dark) ::-webkit-scrollbar-button:single-button:horizontal:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='9'%3E%3Cpath d='M5 1L1.5 4.5 5 8' fill='none' stroke='%234d6185' stroke-width='2'/%3E%3C/svg%3E"); }
html.luna:not(.dark) ::-webkit-scrollbar-button:single-button:horizontal:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='9'%3E%3Cpath d='M1 1l3.5 3.5L1 8' fill='none' stroke='%234d6185' stroke-width='2'/%3E%3C/svg%3E"); }
html.luna:not(.dark) ::-webkit-scrollbar-corner { background: #f3f1ec; }

/* ---------- Kontextmenü & Sprechblasen ---------- */
.ctxmenu { font: var(--fs) Tahoma, sans-serif; border-color: #aca899; box-shadow: 2px 2px 3px rgba(0,0,0,.35); }
.ctx-item { padding: 3px 20px 3px 2px; }
.balloon { font: var(--fs) Tahoma, sans-serif; border-radius: 7px; }

/* ---------- Dialoge „Abmelden“ / „Computer ausschalten“ ---------- */
.screen.xp-dim > #desktop, .screen.xp-dim > #taskbar { filter: grayscale(1) brightness(.9); transition: filter 1.2s ease; }
.xp-exit-overlay { position: absolute; inset: 0; z-index: 9800; display: flex; align-items: center; justify-content: center; }
.xp-exit { width: 314px; max-width: calc(100% - 16px); border: 1px solid #00309c; box-shadow: 3px 3px 12px rgba(0,0,0,.5); font-family: Tahoma, sans-serif; }
.xp-exit-head { height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 14px; background: #00309c; color: #fff;
  font: 19px "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; }
.xp-exit-head img { width: 30px; height: 30px; }
.xp-exit-body { display: flex; justify-content: space-around; gap: 6px; padding: 26px 12px 22px;
  background: linear-gradient(180deg, #5a7edc 0%, #7f9de6 45%, #5a7edc 100%); border-top: 2px solid #8fb2f5; border-bottom: 2px solid #f99736; }
.xp-exit-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: #fff; padding: 4px 6px; border-radius: 4px;
  font: 12px Tahoma, sans-serif; min-width: 72px; }
.xp-exit-btn img { width: 34px; height: 34px; border-radius: 5px; box-shadow: 0 0 0 2px rgba(255,255,255,.75), 1px 2px 3px rgba(0,0,0,.4); }
.xp-exit-btn:hover img, .xp-exit-btn:focus-visible img { filter: brightness(1.15); box-shadow: 0 0 0 2px #fff, 0 0 8px #fff; }
.xp-exit-btn:focus-visible { outline: 1px dotted #fff; }
.xp-exit-foot { display: flex; justify-content: flex-end; padding: 9px 12px; background: #00309c; }
.xp-standby { position: absolute; inset: 0; z-index: 99999; background: #000; cursor: pointer; }

/* ---------- Konto: XP-Benutzerbilder ---------- */
.acct-pic { width: 72px; height: 72px; border: 3px solid #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.35); flex: none; image-rendering: auto; }
.pic-grid { display: grid; grid-template-columns: repeat(auto-fill, 56px); gap: 6px; max-width: 760px; margin-top: 6px; }
.pic { width: 56px; height: 56px; padding: 2px; border: 2px solid transparent; border-radius: 4px; background: none; }
.pic img { width: 48px; height: 48px; display: block; border-radius: 2px; }
.pic:hover { border-color: var(--border); }
.pic.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }

/* ---------- Anmeldebildschirm: XP-Schrift ---------- */
.login-title { font-family: "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; font-weight: normal; font-size: 34px; }
.login-user > img { width: 48px; height: 48px; padding: 4px; background: #fff; }
