/* MlinuxsOS styles */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: 'Minecraft', 'Courier New', monospace;
  font-size: 16px;
  color: #fff;
}

/* ---------- desktop ---------- */

#desktop {
  position: relative;
  width: 100%;
  height: calc(100% - 48px);
  background-image: url('assets/bg.png');
  background-size: cover;
  background-position: center;
}

/* ---------- desktop icons ---------- */

.icon {
  position: absolute;
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  cursor: grab;
  user-select: none;
}

.icon:hover {
  background: rgba(0, 60, 200, 0.3);
  border-radius: 4px;
}

.icon .glyph {
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon .label {
  font-size: 14px;
  color: #fff;
  text-align: center;
  text-shadow: 2px 2px 2px #000;
}

/* ---------- windows ---------- */

.window {
  position: absolute;
  min-width: 300px;
  min-height: 200px;
  background: #ece9d8;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.titlebar {
  background: linear-gradient(180deg, #3f8ff5, #0a246a);
  color: #fff;
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 6px;
  cursor: grab;
  border-bottom: 2px solid #000;
}

.titlebar .title-text {
  flex: 1;
  font-size: 15px;
  text-shadow: 1px 1px 1px #000;
}

.win-btn {
  width: 26px;
  height: 24px;
  border: 2px solid #000;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.win-btn.close {
  background: #d5301a;
}

.win-btn.min,
.win-btn.max {
  background: #2f6fd0;
}

.window-body {
  flex: 1;
  overflow: auto;
  padding: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #111;
}

.window.hidden {
  display: none;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  background: repeating-linear-gradient(
    135deg,
    #000,
    #000 2px,
    transparent 2px,
    transparent 5px
  );
}

/* ---------- app specific bits ---------- */

.tag {
  display: inline-block;
  background: #4c9f2f;
  color: #fff;
  border: 2px solid #000;
  padding: 2px 8px;
  font-size: 12px;
  margin-right: 6px;
}

.kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 10px;
  margin-top: 10px;
  font-size: 14px;
}

.kv b {
  color: #0a246a;
}

textarea.note {
  width: 100%;
  height: 100%;
  border: 2px solid #000;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  padding: 10px;
  resize: none;
  color: #111;
}

.terminal {
  background: #000;
  color: #4dff4d;
  font-family: inherit;
  font-size: 15px;
  height: 100%;
  padding: 10px;
  overflow-y: auto;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-input-row {
  display: flex;
  gap: 6px;
}

.terminal-input-row .prompt {
  color: #ffd24c;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #4dff4d;
  font-family: inherit;
  font-size: 15px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #000;
  padding: 8px;
  background: #fff;
  font-size: 14px;
  margin-bottom: 6px;
}

.tray-icon {
  display: flex;
  align-items: center;
}

.setting-row {
  margin-bottom: 12px;
}

.setting-row button {
  font-family: inherit;
  font-size: 14px;
  padding: 6px 12px;
  border: 2px solid #000;
  background: #d9d9d9;
  cursor: pointer;
}

.browser-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.browser-bar input {
  flex: 1;
  padding: 6px;
  font-family: inherit;
  font-size: 14px;
  border: 2px solid #000;
}

#browser-frame {
  width: 100%;
  height: 180px;
  border: 2px solid #000;
  background: #fff;
}

.browser-hint {
  font-size: 11px;
  color: #555;
  margin-top: 6px;
}
#cat-mascot {
  position: fixed;
  bottom: 48px;
  left: 90%;
  transform: translateX(-50%);
  width: 70px;
  z-index: 5;
  pointer-events: none;
}

/* ---------- lock screen ---------- */

#lock-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  cursor: pointer;
  overflow: hidden;
}

#lock-screen.hidden {
  display: none;
}

#lock-bg {
  position: absolute;
  inset: -20px;
  background-image: url('assets/bg.png');
  background-size: cover;
  background-position: center;
  filter: blur(10px);
}

.lock-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 2px 2px 4px #000;
  text-align: center;
}

.lock-content h1 {
  font-size: 42px;
  margin: 0 0 10px 0;
}

.lock-content p {
  font-size: 15px;
  margin: 0;
}

/* ---------- taskbar ---------- */

#taskbar {
  height: 48px;
  background: linear-gradient(180deg, #3f8cf3, #0d3aa8);
  border-top: 3px solid #000;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
}

#start-btn {
  font-family: inherit;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, #8fd35e, #2d6e0e);
  border: 2px solid #000;
  padding: 8px 14px;
  cursor: pointer;
}

#taskbar-apps {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  height: 100%;
  align-items: center;
}

.task-chip {
  font-size: 13px;
  color: #fff;
  background: #2f66d0;
  border: 2px solid #000;
  padding: 6px 10px;
  cursor: pointer;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-chip.active {
  background: #0a2260;
}

#tray {
  display: flex;
  align-items: center;
  gap: 10px;
}

#clock {
  font-size: 14px;
  color: #fff;
  background: #0e2f8f;
  border: 2px solid #000;
  padding: 6px 10px;
}

/* ---------- start menu ---------- */

#start-menu {
  position: absolute;
  bottom: 52px;
  left: 8px;
  width: 220px;
  background: #ece9d8;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 999;
}

#start-menu.open {
  display: flex;
}

.sm-head {
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, #8fd35e, #2d6e0e);
  padding: 12px;
  border-bottom: 2px solid #000;
}

.sm-item {
  padding: 10px 12px;
  font-size: 14px;
  color: #111;
  cursor: pointer;
  border-bottom: 1px solid #000;
  background: #fff;
}

.sm-item:hover {
  background: #a6caf0;
}