/* UDAY-OS v3.0 - Serenity Theme */
:root {
  --bg-color: #008080;      /* Classic Teal Desktop */
  --win-bg: #dfdfdf;       /* Light Grey Windows */
  --win-border: #ffffff;
  --win-shadow: #808080;
  --header-bg: #000080;    /* Classic Dark Blue Title Bar */
  --header-text: #ffffff;
  --text-color: #000000;
  --accent-color: #000080;
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'VT323', monospace;
  margin: 0;
  overflow: hidden;
  height: 100vh;
  user-select: none;
}

/* BIOS Boot Screen */
#bios-screen {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #000; color: #fff; z-index: 10000;
  font-family: 'VT323', monospace; padding: 20px;
  overflow-y: hidden;
}

/* Desktop Icons */
.desktop-icons {
  display: flex; flex-direction: column; gap: 20px;
  padding: 20px; width: 120px;
}

.icon {
  text-align: center; cursor: pointer; color: #fff;
  text-shadow: 1px 1px 2px #000;
}

.icon-graphic { font-size: 32px; margin-bottom: 4px; }
.icon-label { font-size: 16px; font-weight: bold; }

/* Windows - Classic 95 Look */
.window {
  position: absolute; min-width: 320px;
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-border) var(--win-shadow) var(--win-shadow) var(--win-border);
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
}

.window-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 4px 8px;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: bold; font-family: 'VT323', monospace; font-size: 18px;
  cursor: default;
}

.window-title-group { display: flex; align-items: center; gap: 8px; }

.window-close {
  background: var(--win-bg); border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  width: 20px; height: 18px; line-height: 14px;
  text-align: center; font-size: 16px; cursor: pointer; color: #000;
}

.window-content {
  padding: 12px; flex-grow: 1; overflow-y: auto;
  background: #fff; margin: 4px;
  border: 2px inset var(--win-bg);
  font-size: 18px;
}

/* Terminal In-Window */
.terminal-content { background: #000 !important; color: #33ff33; }
#terminal-input {
  background: transparent; border: none; color: #33ff33;
  font-family: 'VT323', monospace; font-size: 18px; outline: none; width: 100%;
}
.terminal-input-line { display: flex; gap: 4px; }

/* Taskbar */
#taskbar {
  position: fixed; bottom: 0; width: 100%; height: 32px;
  background: var(--win-bg); border-top: 2px solid #fff;
  display: flex; align-items: center; padding: 2px 4px; z-index: 1001;
}

#start-btn {
  background: var(--win-bg); border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-weight: bold; padding: 2px 8px; display: flex; align-items: center; gap: 4px;
  font-family: 'VT323', monospace; font-size: 18px; cursor: pointer;
}

#start-btn:active { border-color: #808080 #fff #fff #808080; }

/* Sticky Note Style */
#sticky-note {
  background: #ffffcc !important; /* Post-it Yellow */
  border-color: #808000 !important;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.2) !important;
}

.note-header {
  background: #e6e600 !important;
  color: #000 !important;
}

.note-content {
  background: transparent !important;
  border: none !important;
}

/* Taskbar Tabs */
.taskbar-items {
  display: flex;
  gap: 4px;
  padding: 0 10px;
}

.taskbar-tab {
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 2px 8px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.taskbar-tab.active {
  border-color: #808080 #fff #fff #808080;
  background: #eee;
  font-weight: bold;
}

/* Taskbar Quick Launch */
.quick-launch {
  display: flex;
  gap: 2px;
  margin-left: 4px;
  padding-right: 4px;
  border-right: 1px solid #808080;
}

.ql-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  border: 1px solid transparent;
}

.ql-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid #fff;
}

.ql-icon:active {
  border: 1px inset #808080;
}

.taskbar-divider {
  width: 2px;
  height: 20px;
  background: #808080;
  margin: 0 4px;
  border-left: 1px solid #fff;
}

/* System Tray Updates */
.tray-icon {
  font-size: 14px;
  cursor: pointer;
}

/* Media Player Styling */
.player-content {
  background: #000 !important;
  color: #00ff00;
  padding: 10px;
}

.player-display {
  border: 2px inset #808080;
  padding: 5px;
  margin-bottom: 10px;
  background: #002200;
  font-family: 'monospace';
  font-size: 12px;
}

.player-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  margin-top: 5px;
}

.player-visualizer .bar {
  flex-grow: 1;
  background: #00ff00;
  height: 2px;
  transition: height 0.1s;
}

.player-controls {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.player-controls button {
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-family: 'VT323', monospace;
  cursor: pointer;
}

/* Screensaver */
#screensaver {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 20000;
  cursor: none;
}

/* Add Media Player icon to Quick Launch style */
.ql-icon[title="Media Player"] {
  font-size: 14px;
}

/* System Tray & Network Light */
.system-tray {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--win-bg);
  border: 2px inset;
  padding: 0 10px;
}

#network-light {
  width: 8px;
  height: 8px;
  background: #404040;
  border-radius: 50%;
  border: 1px solid #000;
}

#network-light.active {
  background: #33ff33;
  box-shadow: 0 0 5px #33ff33;
  animation: flicker 0.1s infinite;
}

@keyframes flicker {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

#clock {
  font-weight: bold;
}

/* Start Menu */
#start-menu {
  position: absolute; bottom: 32px; left: 0; width: 200px;
  background: var(--win-bg); border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  display: flex; z-index: 2000;
}

.start-sidebar {
  background: var(--win-shadow); color: var(--win-bg);
  width: 24px; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 10px;
}

.start-sidebar span { transform: rotate(-90deg); white-space: nowrap; font-weight: bold; }

.start-items { flex-grow: 1; padding: 4px; }
.start-item { padding: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.start-item:hover { background: var(--header-bg); color: #fff; }

/* Utils */
/* Settings Window */
.settings-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.settings-group label {
  font-weight: bold;
  font-size: 14px;
}

.settings-group select, .settings-group button {
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-family: 'VT323', monospace;
  padding: 4px;
}

/* Custom Context Menu */
#context-menu {
  position: fixed;
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  width: 150px;
  z-index: 100000;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.context-item {
  padding: 5px 10px;
  cursor: pointer;
}

.context-item:hover {
  background: var(--header-bg);
  color: #fff;
}

.context-divider {
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  margin: 2px 0;
}

/* Additional Themes */
body.theme-classic { --bg-color: #000; --win-bg: #000; --header-bg: #33ff33; --header-text: #000; --text-color: #33ff33; --bg-dark: #000; --win-border: #33ff33; --win-shadow: #33ff33; }
body.theme-dark { --bg-color: #1a1a1a; --header-bg: #333; --win-bg: #222; --text-color: #eee; --win-border: #444; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
.file-item { text-align: center; color: #000; text-decoration: none; padding: 4px; }
.file-item:hover { background: #eee; outline: 1px dotted #000; }
.file-icon { font-size: 24px; display: block; }
.file-name { font-size: 14px; }

.hidden { display: none !important; }

/* CRT Overlay (FIXED) */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0px,
    rgba(0,0,0,0.15) 1px,
    transparent 2px,
    transparent 4px
  );
  z-index: 9999;
}

