* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent-orange: #e76f24;
  --accent-dark-orange: #9a3f12;
  --accent-yellow: #f4c95d;
  --text-primary: #ffffff;
  --text-muted: #b7b7c2;
  --window-bg: #191920;
  --window-border: #3a3030;
  --panel-bg: #101014;
  --taskbar-bg: #111116;
}

body {
  background:
    radial-gradient(circle at 18% 22%, rgba(244, 201, 93, 0.2), transparent 28%),
    linear-gradient(135deg, #111116 0%, #251914 46%, #0a0a0d 100%);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100vh;
  overflow: hidden;
}

#desktop {
  position: absolute;
  inset: 0 0 60px 0;
}

#desktop-icons {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.desktop-icon {
  width: 80px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.desktop-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.desktop-icon span {
  display: block;
  margin-top: 6px;
  color: white;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.desktop-icon:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.window {
  position: absolute;
  width: 360px;
  min-width: 240px;
  min-height: 180px;
  background: var(--window-bg);
  border: 1px solid var(--window-border);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #241f21;
  border-bottom: 1px solid #3a3030;
  color: var(--text-primary);
  font-weight: 600;
  cursor: move;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.window-body {
  padding: 16px;
}

.window-body h2,
.window-body h3,
.window-body h4 {
  margin-bottom: 10px;
}

.window-body p {
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.window-controls button {
  background: #343038;
  color: var(--text-primary);
  border: 1px solid #504650;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  margin-left: 4px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.window-controls button:hover {
  background: #473c3c;
  border-color: var(--accent-orange);
}

.window-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: se-resize;
  background: rgba(255, 255, 255, 0.15);
  border-bottom-right-radius: 8px;
}

.pomo-settings {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.pomo-time {
  font-size: 32px;
  font-weight: bold;
  color: var(--accent-orange);
  margin: 10px 0;
}

.pomo-progress {
  width: 100%;
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
}

#pomo-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-yellow);
}

.app-launch-btn {
  background: var(--accent-orange);
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.16s ease, transform 0.16s ease;
}

.app-launch-btn:hover {
  background: var(--accent-dark-orange);
  color: #fff;
  transform: translateY(-1px);
}

.xp-bar {
  width: 100%;
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
}

#xp-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-yellow);
}

button,
.app-launch-btn,
.xp-actions button,
.pomo-controls button {
  border-radius: 8px;
  border: none;
  outline: none;
  transition: background 0.16s ease, transform 0.16s ease, filter 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.xp-actions button {
  background: var(--accent-orange);
  color: #000;
  font-weight: 600;
  padding: 6px 12px;
}

.xp-actions button:hover {
  background: var(--accent-dark-orange);
  color: #fff;
}

.pomo-controls button {
  background: var(--accent-orange);
  color: #000;
  font-weight: 600;
  padding: 6px 12px;
}

.pomo-controls button:hover {
  background: var(--accent-dark-orange);
  color: #fff;
}

#taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: rgba(17, 17, 22, 0.94);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-top: 1px solid #2b2b33;
  backdrop-filter: blur(6px);
}

.taskbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  color: #f2f2f3;
  font-weight: 700;
  font-size: 16px;
}

.taskbar-right {
  color: var(--accent-yellow);
  font-size: 14px;
  font-weight: 600;
}

.calendar-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-controls button {
  background: var(--accent-orange);
  color: #000;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  background: #24242b;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.calendar-day:hover {
  background: var(--accent-orange);
  color: #000;
}

.calendar-day.today {
  background: var(--accent-yellow);
  color: #000;
  font-weight: bold;
}

.calendar-day.selected {
  background: var(--accent-orange);
  color: #000;
}

.calendar-event-panel {
  margin-top: 14px;
  padding: 10px;
  background: var(--panel-bg);
  border: 1px solid #2f2f36;
  border-radius: 8px;
}

#event-title,
#event-desc {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #363640;
  background: #22222a;
  color: white;
}

#event-add-btn {
  background: var(--accent-orange);
  color: #000;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.event-item button.delete-event {
  background: #ff4a4a;
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}

.app-note {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 10px;
}
