/* ═══════════════════════════════════════════════════════════
   vishaljayaprakash.com — full Windows desktop UI
   ─────────────────────────────────────────────────────────── */

:root {
  --face:  #c0c0c0;  /* Win98 chrome */
  --hi:    #ffffff;
  --lo:    #808080;
  --deep:  #000000;
  --title-a: #000080;
  --title-b: #1084d0;
  --title-inactive-a: #7b7b7b;
  --title-inactive-b: #a0a0a0;
  --link:  #0000ee;
  --link-visited: #551a8b;

  --font-ui: 'Pixelated MS Sans Serif','MS Sans Serif','Tahoma','Segoe UI',sans-serif;
  --font-mono: 'Courier New',Courier,monospace;

  --taskbar-h: 32px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;                      /* the desktop doesn't scroll */
  font-family: var(--font-ui);
  font-size: 12px;
  color: #000;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  user-select: none;
}

button { font-family: var(--font-ui); font-size: 12px; }
a { color: var(--link); }
a:visited { color: var(--link-visited); }

/* ═══════════════════════ DESKTOP ═══════════════════════ */

.desktop {
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
  /* Custom wallpaper if the user has dropped one, else classic teal */
  background: #008080 url('assets/wallpaper.jpg') center/cover no-repeat;
  overflow: hidden;
}

/* If no wallpaper is uploaded yet, a subtle CSS pattern makes it feel intentional */
.desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  background-position: 0 0, 2px 2px;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════ DOCK (right-side icons) ═══════════════════════ */

.dock {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: 90px;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
  overflow-y: auto;
}
.dock li { display: flex; }

.dock__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 6px 4px;
  background: transparent;
  color: #fff;
  border: 1px dotted transparent;
  cursor: pointer;
  text-align: center;
  text-shadow: 1px 1px 0 #000, 0 0 3px rgba(0,0,0,0.8);
  font-size: 11px;
  line-height: 1.1;
}
.dock__item:hover  { background: rgba(0,0,128,0.25); border-color: rgba(255,255,255,0.4); }
.dock__item:active,
.dock__item.is-open { background: rgba(0,0,128,0.55); border-color: rgba(255,255,0,0.7); }
.dock__item img { display: block; image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor; }
.dock__ico-sm { transform: scale(1.8); transform-origin: center; margin: 6px 0; }

/* ═══════════════════════ WINDOWS ═══════════════════════ */

.window-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.window {
  position: absolute;
  min-width: 260px;
  max-width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - var(--taskbar-h) - 40px);
  background: var(--face);
  border: 1px solid var(--deep);
  box-shadow:
    inset  1px  1px 0 0 var(--hi),
    inset -1px -1px 0 0 var(--lo),
    inset  2px  2px 0 0 #dfdfdf,
    inset -2px -2px 0 0 var(--deep),
    3px 3px 0 rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.window__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 3px 3px 4px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  height: 22px;
  cursor: grab;
  user-select: none;
}
.window--inactive .window__titlebar {
  background: linear-gradient(90deg, var(--title-inactive-a), var(--title-inactive-b));
}
.window__titlebar:active { cursor: grabbing; }

.window__label { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window__label img { width: 14px; height: 14px; image-rendering: pixelated; }

.window__controls { display: flex; gap: 2px; }
.win-ctl {
  width: 18px;
  height: 16px;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  background: var(--face);
  color: var(--deep);
  border: 1px solid var(--deep);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--lo);
  cursor: pointer;
}
.win-ctl:active {
  box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 #fff;
}

.window__menubar {
  display: flex;
  gap: 12px;
  padding: 2px 6px;
  border-bottom: 1px solid var(--lo);
  background: var(--face);
  font-size: 11px;
}
.window__menubar span u { text-decoration: underline; }

.window__body {
  flex: 1;
  padding: 12px 14px;
  background: var(--face);
  overflow: auto;
  font-size: 12px;
}

.window__statusbar {
  padding: 2px 8px;
  border-top: 1px solid var(--hi);
  box-shadow: inset 0 1px 0 var(--lo);
  font-size: 11px;
  color: #333;
  background: var(--face);
}

/* ═══════════════════════ TASKBAR ═══════════════════════ */

.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--taskbar-h);
  background: var(--face);
  border-top: 1px solid var(--hi);
  box-shadow: inset 0 1px 0 #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  z-index: 100;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  height: 24px;
  background: var(--face);
  color: var(--deep);
  font-weight: 700;
  border: 1px solid var(--deep);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--lo);
  cursor: pointer;
  font-size: 12px;
}
.start-btn:active,
.start-btn.is-open {
  box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 #fff;
}
.start-btn img { image-rendering: pixelated; }

.task-buttons {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: center;
  overflow-x: auto;
  min-width: 0;
}

.task-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  min-width: 120px;
  max-width: 200px;
  padding: 0 8px;
  background: var(--face);
  color: var(--deep);
  border: 1px solid var(--deep);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--lo);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.task-btn.is-active {
  box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 #fff;
  background: #dfdfdf;
}
.task-btn img { image-rendering: pixelated; flex-shrink: 0; }

.tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 24px;
  border: 1px solid var(--lo);
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
  font-size: 11px;
}
.tray img { image-rendering: pixelated; }
.clock { font-variant-numeric: tabular-nums; }

.visitor {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  padding: 0 2px 0 0;
}
.visitor #visitor-count { min-width: 2ch; text-align: right; }

/* ═══════════════════════ START MENU ═══════════════════════ */

.start-menu {
  position: fixed;
  left: 4px;
  bottom: calc(var(--taskbar-h) + 2px);
  min-width: 200px;
  background: var(--face);
  border: 1px solid var(--deep);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--lo), 4px 4px 0 rgba(0,0,0,0.3);
  display: flex;
  z-index: 101;
}
.start-menu__side {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 12px 6px;
  background: linear-gradient(0deg, var(--title-a), var(--title-b));
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 4px;
}
.start-menu__list {
  list-style: none;
  padding: 4px;
  margin: 0;
  flex: 1;
}
.start-menu__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  font-size: 12px;
}
.start-menu__list li:hover {
  background: var(--title-a);
  color: #fff;
}
.start-menu__list li img { image-rendering: pixelated; }
.start-menu__sep {
  height: 0 !important;
  border-top: 1px solid var(--lo);
  box-shadow: 0 1px 0 #fff;
  margin: 4px 0;
  padding: 0 !important;
  pointer-events: none;
}
.start-menu__sep:hover { background: transparent !important; }

/* ═══════════════════════ WINDOW CONTENT SHARED ═══════════════════════ */

.window__body p { margin: 0 0 10px; line-height: 1.5; }
.window__body p:last-child { margin-bottom: 0; }
.window__body b { font-weight: 700; }
.window__body i { font-style: italic; }

.quiet { color: #444; font-size: 11px; }

.list-plain { padding-left: 20px; margin: 0 0 10px; }
.list-plain li { margin-bottom: 4px; line-height: 1.4; }

.groupbox {
  border: 1px solid var(--hi);
  box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
  padding: 12px;
  margin: 10px 0;
  background: var(--face);
}
.groupbox legend {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 5px 14px;
  background: var(--face);
  color: var(--deep);
  border: 1px solid var(--deep);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--lo);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  min-width: 75px;
  text-align: center;
}
.btn:hover  { background: #d0d0d0; color: var(--deep); }
.btn:active { box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 #fff; }
.btn:visited { color: var(--deep); }
.btn--default { outline: 1px dotted var(--deep); outline-offset: -4px; }
.btn--big    { padding: 8px 22px; font-size: 13px; min-width: 180px; }
.btn--copied { background: #ccffcc; color: #003300; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row--right { justify-content: flex-end; }

/* Form inputs */
.input-98 {
  width: 100%;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid var(--deep);
  box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
  font-family: var(--font-ui);
  font-size: 12px;
  color: #000;
  -webkit-font-smoothing: none;
}

.form-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.form-row label { font-size: 12px; }

/* Files table (Windows Explorer details view) */
.files {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--lo);
  box-shadow: inset 1px 1px 0 var(--deep), inset -1px -1px 0 var(--hi);
  font-size: 11px;
  margin: 8px 0;
}
.files thead th {
  background: var(--face);
  border-right: 1px solid var(--lo);
  border-bottom: 1px solid var(--lo);
  padding: 4px 8px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--lo);
}
.files td {
  padding: 4px 8px;
  border-bottom: 1px dotted #ddd;
  vertical-align: middle;
}
.files tbody tr:hover { background: #eef4ff; }

.tag { display: inline-block; padding: 0 6px; border: 1px solid var(--lo); background: var(--face); font-size: 10px; font-weight: 700; }
.tag--green { background: #ccffcc; border-color: #008800; color: #003300; }

.row--tbd td { color: #666; }

/* ═══════════════════════ APP: PROFILE ═══════════════════════ */

.app-profile__top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lo);
  margin-bottom: 12px;
}

.avatar-frame {
  flex: 0 0 auto;
  padding: 4px;
  background: var(--face);
  border: 1px solid var(--deep);
  box-shadow: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
}
.avatar {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  background: #008080;
  border: 1px solid var(--lo);
  box-shadow: inset 1px 1px 0 var(--deep), inset -1px -1px 0 var(--hi);
}
.avatar--placeholder {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}

.app-profile__ident { flex: 1; }
.app-profile__ident h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.app-profile__tag { color: #333; margin: 0 0 8px; font-size: 11px; }

/* ═══════════════════════ APP: LOGIN ═══════════════════════ */

.app-login__title {
  display: flex;
  align-items: center;
  font-size: 12px;
  margin: 0 0 12px !important;
}

/* ═══════════════════════ APP: PROMPTS ═══════════════════════ */

.app-simple__lede { font-weight: 700; font-size: 12px; margin: 0 0 10px !important; }

.prompt-row:not(.prompt-row--coming) { cursor: pointer; }
.prompt-row.is-open { background: #d4e4ff !important; }
.prompt-row--coming td { color: #666; }
.prompt-row--coming:hover { background: transparent !important; cursor: default; }

.prompt-expand td { padding: 0; background: #f4f4f4; }
.prompt-panel { padding: 12px; }
.prompt-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.prompt-meta { font-size: 10px; color: #444; }

.prompt-box {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: #000;
  background: #fff;
  border: 1px solid var(--hi);
  box-shadow: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
  resize: vertical;
  min-height: 220px;
  white-space: pre;
  overflow: auto;
  -webkit-font-smoothing: none;
}
.prompt-box:focus { outline: 2px dotted var(--title-a); outline-offset: 2px; }

.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.new-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  background: #ff0;
  color: #d00;
  border: 1px solid #d00;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
}
.coming-tag {
  display: inline-block;
  padding: 0 6px;
  background: var(--face);
  color: var(--lo);
  border: 1px solid var(--lo);
  font-size: 9px;
  font-weight: 700;
}

/* ═══════════════════════ MOBILE ═══════════════════════ */

@media (max-width: 720px) {
  .dock {
    top: auto;
    bottom: calc(var(--taskbar-h) + 8px);
    right: 8px;
    left: 8px;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-height: 40vh;
  }
  .dock li { flex: 0 0 auto; }
  .dock__item { width: 74px; }

  .window {
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none;
    max-height: calc(100vh - var(--taskbar-h) - 46vh);
  }
  .window__titlebar { cursor: default; }

  .app-profile__top { flex-direction: column; align-items: center; text-align: center; }
  .form-row { grid-template-columns: 1fr; gap: 2px; }
  .start-menu__side { display: none; }
}

/* ═══════════════════════ TWEAKS ═══════════════════════ */

/* Make the desktop icons text readable on any wallpaper */
.dock__item span {
  padding: 1px 3px;
  border-radius: 1px;
  max-width: 82px;
  overflow-wrap: break-word;
}
