/* Windows 98 retro theme for Lumine */

:root {
  --w98-grey: #c0c0c0;
  --w98-blue: #000080;
  --w98-nav: linear-gradient(90deg, #000080, #1084d0);
  --w98-face: #c0c0c0;
  --w98-shadow-dark: #808080;
  --w98-shadow-light: #ffffff;
  --w98-black: #000;
  --w98-text: #000;
  --desktop: #3a6ea5;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "MS Sans Serif", Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
  overflow: hidden;
  background: var(--desktop);
}

.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.15) 100%),
    var(--desktop);
}

/* --- Window chrome --- */
.win {
  background: var(--w98-face);
  border: 2px solid;
  border-color: var(--w98-shadow-light) var(--w98-black) var(--w98-black) var(--w98-shadow-light);
  box-shadow: 1px 1px 0 #000, inset 1px 1px 0 #fff;
}

.win-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--w98-nav);
  color: #fff;
  font-weight: bold;
  padding: 2px 4px;
  cursor: default;
  height: 18px;
}
.win-title { padding-left: 2px; font-size: 11px; }
.win-ctrl { display: flex; gap: 2px; }
.mini { display: inline-block; width: 14px; height: 12px; line-height: 12px; background: var(--w98-face); color: #000; text-align: center; border: 1px solid; border-color: #fff #000 #000 #fff; font-size: 9px; }

.win-body { padding: 6px; }

/* --- Login overlay --- */
#login-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  z-index: 1000;
}
#login-overlay .win-body { padding: 12px; }

/* --- App window layout --- */
.appwin {
  position: absolute;
  top: 20px;
  left: 20px;
  width: calc(100vw - 40px);
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}
.app-body {
  display: flex;
  flex: 1;
  gap: 6px;
  padding: 6px;
  min-height: 0;
}
.sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar .win-body { flex: 1; display: flex; flex-direction: column; overflow: auto; }
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.main .win-body { flex: 1; overflow: auto; }

/* --- Buttons --- */
.btn {
  font-family: inherit;
  font-size: 11px;
  background: var(--w98-face);
  border: 2px solid;
  border-color: var(--w98-shadow-light) var(--w98-black) var(--w98-black) var(--w98-shadow-light);
  padding: 3px 10px;
  cursor: pointer;
}
.btn:active { border-color: var(--w98-black) var(--w98-shadow-light) var(--w98-shadow-light) var(--w98-black); }

input {
  font-family: inherit;
  font-size: 11px;
  border: 2px solid;
  border-color: var(--w98-black) var(--w98-shadow-light) var(--w98-shadow-light) var(--w98-black);
  padding: 2px 4px;
  background: #fff;
}

/* --- Tag list --- */
.taglist { list-style: none; margin: 8px 0; padding: 0; }
.taglist li {
  display: flex;
  justify-content: space-between;
  padding: 2px 4px;
  cursor: pointer;
}
.taglist li:hover { background: var(--w98-blue); color: #fff; }
.taglist li.active { background: var(--w98-blue); color: #fff; }
.taglist .tag-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.taglist .tag-count { color: #555; }
.taglist li.active .tag-count { color: #cfe0ff; }

/* --- Memory list / detail --- */
.memlist { display: flex; flex-direction: column; gap: 4px; }
.mem-item {
  border: 1px solid #808080;
  background: #fff;
  padding: 4px 6px;
  cursor: pointer;
}
.mem-item:hover { border-color: var(--w98-blue); }
.mem-title { font-weight: bold; }
.mem-meta { color: #555; font-size: 10px; margin-top: 2px; }
.mem-content { margin-top: 4px; white-space: pre-wrap; }

.memdetail { border-top: 2px groove var(--w98-grey); padding-top: 8px; }
.detail-title { font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.detail-meta { color: #555; font-size: 10px; margin-bottom: 8px; }
.det-btn-row { margin-top: 10px; display: flex; gap: 4px; }

/* --- Status bar --- */
.statusbar {
  display: flex;
  justify-content: space-between;
  border-top: 2px inset var(--w98-face);
  background: var(--w98-face);
  padding: 2px 4px;
  color: #333;
  font-size: 10px;
}
