:root {
  /* Catppuccin Mocha Inspired Palette */
  --bg-color: #1e1e2e;
  --text-main: #cdd6f4;
  --text-muted: #a6adc8;
  --glass-bg: rgba(30, 30, 46, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --accent: #89b4fa;
  --accent-secondary: #f5c2e7;
  --tint: rgba(137, 180, 250, 0.05);
  /* Default blue tint */

  --danger: #f38ba8;
  --success: #a6e3a1;
  --warning: #f9e2af;

  /* Animation Bezier - Snappy & Smooth */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  /* Use local wallpaper in subfolder */
  background: url("backgrounds/default.png") center/cover no-repeat;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  transition: background 0.5s ease;
  /* Smooth transition */
}

/* Live Background Canvas & Video */
#live-bg,
#live-bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  display: none;
  background: #000;
  object-fit: fill;
  /* Stretches to fit exactly, showing the full video without cropping */
  pointer-events: none;
  /* Ignore clicks */
}

/* Enhanced Glassmorphism */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: none;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Top Bar */
#topbar {
  height: 38px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  background: rgba(30, 30, 46, 0.5);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Topbar Overlays --- */
.topbar-overlay {
  position: fixed;
  top: 45px;
  width: 280px;
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  padding: 15px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.topbar-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.logo-overlay {
  left: 20px;
}

.status-overlay {
  right: 20px;
}

.overlay-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overlay-section:not(:last-child) {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.overlay-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
  opacity: 0.8;
}

.info-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  font-size: 13px;
  gap: 8px;
  line-height: 1.4;
}

.info-grid .label {
  opacity: 0.6;
}

.topbar-left i.os-logo {
  font-size: 18px;
  opacity: 0.9;
  transition: opacity 0.2s;
  cursor: pointer;
}

.topbar-left i.os-logo:hover {
  opacity: 1;
}

.overlay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.overlay-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.overlay-item i {
  color: var(--accent);
  font-size: 16px;
}

.topbar-left i.ph-apple-logo {
  font-size: 18px;
  margin-right: 8px;
  opacity: 0.9;
}

/* Hyprland "Workspaces" Pill Style */
.workspaces {
  display: flex;
  background: rgba(20, 20, 30, 0.4);
  border-radius: 20px;
  padding: 3px 6px;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ws-item {
  font-size: 11px;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.ws-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.ws-item.active {
  background: var(--accent);
  color: #1e1e2e;
  /* Contrast text for active state */
  font-weight: 700;
}

.window-title-display {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
  pointer-events: auto;
}

/* Status Modules */
.status-module {
  background: rgba(20, 20, 30, 0.4);
  padding: 4px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s;
}

.status-module:hover {
  background: rgba(255, 255, 255, 0.1);
}

.clock-module {
  background: transparent;
  border: none;
  font-weight: 600;
  padding-right: 0;
}

/* Remove old menu item styles if unused, or keep for potential reuse */
.menu-item {
  display: none;
}

/* Dock */
#dock-container {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 9998;
  pointer-events: none;
  /* Let clicks pass through empty space */
}

#dock {
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  /* Align to bottom for macOS style */
  padding: 8px 12px;
  border-radius: 20px;
  gap: 10px;
  background: rgba(30, 30, 46, 0.2);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s var(--ease-out-expo);
  transform-origin: bottom center;
}

.dock-item {
  width: var(--dock-item-size, 48px);
  height: var(--dock-item-size, 48px);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: calc(var(--dock-item-size, 48px) * 0.55);
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition:
    background 0.25s var(--ease-out-expo),
    color 0.25s var(--ease-out-expo),
    width 0.1s ease-out,
    height 0.1s ease-out,
    transform 0.1s ease-out;
  will-change: width, height, transform;
  transform-origin: bottom center;
}

.dock-item:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.dock-item:active {
  transform: translateY(-8px) scale(0.95);
}

.dock-item .active-dot {
  width: 4px;
  height: 4px;
  background: var(--text-main);
  border-radius: 50%;
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
}

.dock-item.has-instances .active-dot {
  opacity: 0.8;
}

.dock-item:hover .active-dot {
  opacity: 1;
}

.dock-item .dock-preview-container {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.95);
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.dock-item .dock-preview-container::after {
  content: "";
  position: absolute;
  bottom: -30px;
  /* perfectly bridges the gap and gives wide error margin */
  left: -20px;
  right: -20px;
  height: 30px;
}

.dock-item:hover .dock-preview-container,
.dock-item .dock-preview-container:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
  transition-delay: 0s;
}

.dock-preview-item {
  width: 120px;
  height: 90px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
  overflow: hidden;
  position: relative;
  padding: 4px;
}

.dock-preview-item .dock-preview-content-wrapper {
  width: 100%;
  height: calc(100% - 16px);
  position: relative;
  overflow: hidden;
  background: rgba(20, 20, 25, 0.8);
  border-radius: 4px;
  margin-bottom: 2px;
}

.dock-preview-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

.dock-preview-item .app-icon {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 2px;
}

.dock-preview-item .window-title {
  font-size: 10px;
  color: var(--text-main);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-preview-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-main);
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.2s;
}

.dock-preview-item:hover .dock-preview-close {
  opacity: 1;
}

.dock-preview-close:hover {
  background: var(--danger);
}

.dock-separator {
  width: 1px;
  height: 32px;
  background: var(--glass-border);
  margin: 0 4px;
}

.tooltip {
  position: absolute;
  top: -45px;
  background: #11111b;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.2s var(--ease-out-expo);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #11111b;
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.dock-item:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Window System */
#desktop {
  flex-grow: 1;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.os-window {
  position: absolute;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  /* Initially hidden for animation */
  opacity: 0;
  transform: scale(0.9);
  animation: windowOpen 0.5s var(--ease-out-expo) forwards;
  /* No border */
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.os-window.active {
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6);
}

.os-window:not(.active) {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

.os-window.closing {
  animation: windowClose 0.3s var(--ease-out-expo) forwards;
}

/* Maximize State */
.os-window.maximized {
  top: 45px !important;
  left: 10px !important;
  width: calc(100% - 20px) !important;
  height: calc(100% - 55px) !important;
  border-radius: 16px !important;
  transform: none;
  transition: all 0.3s var(--ease-out-expo);
}

/* Minimize State */
.os-window.minimized {
  animation: windowMinimize 0.4s var(--ease-out-expo) forwards;
  pointer-events: none;
}

.window-header {
  height: 24px;
  /* Very slim */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  background: transparent;
  position: absolute;
  /* Absolute so it doesn't push content down */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
}

.multitasking-dots {
  display: flex;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background 0.2s;
}

.multitasking-dots:hover {
  background: rgba(255, 255, 255, 0.1);
}

.multitasking-dots span {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.multitasking-menu {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
  scale: 0.95;
}

.multitasking-menu.active {
  opacity: 1;
  pointer-events: auto;
  scale: 1;
}

.multitasking-menu-item {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  white-space: nowrap;
}

.multitasking-menu-item:hover {
  background: var(--tint);
  color: var(--accent);
}

.multitasking-menu-item.danger {
  color: var(--danger);
}

.multitasking-menu-item.danger:hover {
  background: rgba(243, 139, 168, 0.15);
}

.window-content {
  flex-grow: 1;
  overflow: auto;
  width: 100%;
  height: 100%;
  /* Balanced padding for the iPad-style dots and content room */
  padding: 30px 24px 24px 24px;
  font-size: 14px;
  color: var(--text-main);
  background: rgba(20, 20, 25, 0.5);
  display: flex;
  flex-direction: column;
}

/* Resize Handles */
.resize-handle {
  position: absolute;
  z-index: 100;
}

.resize-t {
  top: -5px;
  left: 0;
  width: 100%;
  height: 10px;
  cursor: row-resize;
}

.resize-r {
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
}

.resize-b {
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 10px;
  cursor: row-resize;
}

.resize-l {
  top: 0;
  left: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
}

.resize-tl {
  top: -5px;
  left: -5px;
  width: 15px;
  height: 15px;
  cursor: nwse-resize;
}

.resize-tr {
  top: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  cursor: nesw-resize;
}

.resize-br {
  bottom: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  cursor: nwse-resize;
}

.resize-bl {
  bottom: -5px;
  left: -5px;
  width: 15px;
  height: 15px;
  cursor: nesw-resize;
}

.window-header:active {
  cursor: grabbing;
}

.window-controls {
  display: none;
}

.control-btn {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.1s,
    filter 0.2s;
  position: relative;
}

.control-btn:hover {
  filter: brightness(1.2);
}

.control-btn.close {
  background: var(--danger);
}

.control-btn.min {
  background: var(--warning);
}

.control-btn.max {
  background: var(--success);
}

/* Icons inside buttons on hover (optional enhancement for later) */

.window-title {
  flex-grow: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  opacity: 0.8;
}

/* Consolidated into declaration above */

.cmd-input,
.output,
.terminal-body {
  font-family: "JetBrains Mono", monospace !important;
}

.terminal-body * {
  font-family: "JetBrains Mono", monospace !important;
}

/* Scrollbar Styling */
.window-content::-webkit-scrollbar {
  width: 8px;
}

.window-content::-webkit-scrollbar-track {
  background: transparent;
}

.window-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.window-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes windowOpen {
  0% {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes windowClose {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.95) translateY(15px);
    opacity: 0;
  }
}

@keyframes windowMinimize {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.8) translateY(200px);
    opacity: 0;
  }
}

/* Quickfind (Spotlight) Overlay */
#quickfind-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

#quickfind-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.quickfind-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 20px;
  color: white;
  flex-grow: 1;
  font-weight: 300;
  font-family: "Inter", sans-serif;
}

.quickfind-box {
  position: relative;
  /* Add relative for absolute children */
  width: 600px;
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(30px);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 15px;
  transform: translateY(-20px);
  transition: transform 0.3s var(--ease-out-expo);
}

.quickfind-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(30px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}

.quickfind-suggestions.active {
  display: flex;
}

.suggestion-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.2s;
}

.suggestion-item i {
  font-size: 20px;
  color: var(--accent);
}

.suggestion-item:hover,
.suggestion-item.selected {
  background: rgba(255, 255, 255, 0.1);
}

/* Snap Assist Bar */
#snap-assist-bar {
  position: fixed;
  top: -120px;
  /* Hidden initially */
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 90px;
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  z-index: 11000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 10px;
  transition: top 0.3s var(--ease-out-expo);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#snap-assist-bar.visible {
  top: 0;
}

.snap-layout-group {
  width: 80px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.snap-layout-group:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.1);
}

/* Individual Zones within Groups */
.snap-zone {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.snap-zone.active-drop {
  background: var(--accent);
  /* Highlight on drag over */
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* Layout 1: Halves */
.half-left {
  top: 2px;
  left: 2px;
  bottom: 2px;
  right: 50%;
  margin-right: 1px;
  border-radius: 4px 0 0 4px;
}

.half-right {
  top: 2px;
  right: 2px;
  bottom: 2px;
  left: 50%;
  margin-left: 1px;
  border-radius: 0 4px 4px 0;
}

/* Layout 2: Quarters */
.quarter-tl {
  top: 2px;
  left: 2px;
  right: 50%;
  bottom: 50%;
  margin: 0 1px 1px 0;
  border-radius: 4px 0 0 0;
}

.quarter-tr {
  top: 2px;
  right: 2px;
  left: 50%;
  bottom: 50%;
  margin: 0 0 1px 1px;
  border-radius: 0 4px 0 0;
}

.quarter-bl {
  bottom: 2px;
  left: 2px;
  right: 50%;
  top: 50%;
  margin: 1px 1px 0 0;
  border-radius: 0 0 0 4px;
}

.quarter-br {
  bottom: 2px;
  right: 2px;
  left: 50%;
  top: 50%;
  margin: 1px 0 0 1px;
  border-radius: 0 0 4px 0;
}

/* Maximize Only */
.maximize-full {
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
}

/* Browser App Styles */
.browser-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.browser-header {
  height: 44px;
  background: #f1f3f4;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  border-bottom: 1px solid #dee1e6;
}

.browser-nav {
  display: flex;
  gap: 8px;
}

.browser-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #5f6368;
  transition: background 0.2s;
}

.browser-nav-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.browser-address-bar {
  flex-grow: 1;
  height: 28px;
  background: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #dee1e6;
}

.browser-address-bar input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  color: #202124;
}

.browser-viewport {
  flex-grow: 1;
  background: #fff;
  position: relative;
  overflow: auto;
}

.browser-viewport iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: white !important;
}

/* For Proxy Rendered Content */
.browser-view-content {
  width: 100%;
  height: 100%;
  background: #fff !important;
}

/* --- File Explorer Styles --- */
.explorer-container {
  display: flex;
  height: 100%;
  background: transparent;
  color: var(--text-main);
  font-family: "Inter", sans-serif;
}

.explorer-sidebar {
  width: 200px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.sidebar-item.drag-over {
  background: var(--tint);
  outline: 2px dashed var(--accent);
  color: var(--accent);
}

.sidebar-item.active {
  background: var(--tint);
  color: var(--accent);
}

.explorer-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  /* For the drag dialog to anchor correctly */
}

.explorer-toolbar {
  height: 54px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 15px;
}

.path-input {
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-main);
  flex-grow: 1;
  border: 1px solid rgba(255, 255, 255, 0.05);
  outline: none;
  font-family: "JetBrains Mono", monospace;
}

.path-input:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.3);
}

.explorer-grid {
  padding: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  grid-auto-rows: max-content;
  gap: 15px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 0;
  transition: all 0.2s;
}

.explorer-grid.drag-over {
  background: var(--tint);
  outline: 3px dashed var(--accent);
  outline-offset: -3px;
}

.file-item {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 5px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}

.file-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.file-item.selected {
  background: var(--tint);
  border: 1px solid var(--accent);
}

.explorer-marquee {
  position: absolute;
  border: 1px solid var(--accent);
  background: rgba(137, 180, 250, 0.2);
  /* Tint color with low alpha */
  pointer-events: none;
  z-index: 1000;
  border-radius: 2px;
}

.file-item.dragging {
  opacity: 0.5;
  transform: scale(0.9);
}

.file-item.drag-over {
  background: var(--tint);
  outline: 2px dashed var(--accent);
}

.file-item i {
  font-size: 48px;
  color: var(--accent);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.file-item span {
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  color: var(--text-main);
  font-weight: 500;
}

/* --- Drag Dialog in Explorer --- */
.explorer-drag-dialog {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  color: var(--text-main);
  animation: slideUpFade 0.3s ease-out forwards;
}

.explorer-drag-dialog i.ph-info {
  color: var(--accent);
  font-size: 20px;
}

.explorer-drag-dialog span {
  font-size: 13px;
  font-weight: 500;
}

.explorer-drag-dialog .close-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  opacity: 0.6;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.explorer-drag-dialog .close-btn:hover {
  opacity: 1;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* --- Text Notepad Styles --- */
.Notepad-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  color: var(--text-main);
}

.Notepad-toolbar {
  height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
}

.Notepad-name input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  width: 250px;
  color: var(--text-main);
}

.Notepad-actions {
  display: flex;
  gap: 12px;
}

.Notepad-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  transition: all 0.2s;
}

.tool-btn {
  padding: 6px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.tool-btn.active {
  background: var(--accent);
  color: #000;
  border: none;
}

.Notepad-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.Notepad-btn.primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border: none;
}

.Notepad-btn.primary:hover {
  filter: brightness(1.1);
}

.Notepad-content {
  flex-grow: 1;
  position: relative;
}

.Notepad-content textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 25px;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  resize: none;
  line-height: 1.7;
  color: var(--text-main);
}

/* --- Context Menu Styles --- */
.context-menu {
  position: fixed;
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  width: 170px;
  z-index: 999999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: none;
  animation: menuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-item {
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  transition: all 0.2s;
}

.context-menu-item:hover {
  background: var(--tint);
  color: var(--accent);
}

.context-menu-item.danger {
  color: var(--danger);
}

.context-menu-item.danger:hover {
  background: rgba(243, 139, 168, 0.15);
}

.context-menu-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 4px 0;
}

/* --- Modal & Notification Styles --- */
.os-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out-expo);
}

.os-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.os-modal {
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s var(--ease-out-expo);
}

.os-modal-overlay.active .os-modal {
  transform: scale(1) translateY(0);
}

.os-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
}

.os-modal-message {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 25px;
}

.os-modal-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  margin-bottom: 25px;
  outline: none;
}

.os-modal-input:focus {
  border-color: var(--accent);
}

.os-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* --- Toasts --- */
#toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.os-toast {
  background: rgba(30, 30, 46, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 50px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideUp 0.3s var(--ease-out-expo);
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- File Picker Dialog Styles --- */
.file-picker-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out-expo);
}

.file-picker-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.file-picker-dialog {
  background: rgba(30, 30, 46, 0.95);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  width: 700px;
  height: 550px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s var(--ease-out-expo);
  overflow: hidden;
}

.file-picker-overlay.active .file-picker-dialog {
  transform: scale(1) translateY(0);
}

.file-picker-header {
  height: 50px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.file-picker-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.file-picker-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.file-picker-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.file-picker-content {
  flex-grow: 1;
  display: flex;
  overflow: hidden;
}

.file-picker-sidebar {
  width: 180px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.file-picker-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  color: var(--text-muted);
}

.file-picker-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.file-picker-sidebar-item.active {
  background: var(--tint);
  color: var(--accent);
}

.file-picker-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.file-picker-toolbar {
  height: 50px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
}

.file-picker-grid {
  flex-grow: 1;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  grid-auto-rows: max-content;
  gap: 15px;
  overflow-y: auto;
}

.file-picker-folder-item {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 5px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.file-picker-folder-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.file-picker-folder-item.selected {
  background: var(--tint);
  outline: 2px solid var(--accent);
}

.file-picker-folder-item i {
  font-size: 48px;
  color: var(--accent);
}

.file-picker-folder-item span {
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
  color: var(--text-main);
  font-weight: 500;
}

.file-picker-actions {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Notepad Path Button */
.Notepad-path-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 120px;
  justify-content: flex-start;
}

.Notepad-path-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

.Notepad-path-btn i {
  font-size: 16px;
  color: var(--accent);
}

.Notepad-name input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
}

.Notepad-name input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

/* --- Drawing App Styles --- */
.drawing-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  color: var(--text-main);
}

.drawing-toolbar {
  height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
  gap: 15px;
}

.drawing-name {
  display: flex;
  align-items: center;
  flex: 1;
}

.drawing-name input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
}

.drawing-name input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.drawing-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawing-tools input[type="color"] {
  width: 40px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
}

.drawing-tools input[type="range"] {
  width: 100px;
  accent-color: var(--accent);
}

.drawing-tools #drawing-size-display {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 35px;
}

.drawing-content {
  flex-grow: 1;
  position: relative;
  background: #f5f5f5;
  overflow: hidden;
}

.drawing-content canvas {
  display: block;
  cursor: crosshair;
  width: 100%;
  height: 100%;
}

/* --- Photo Viewer Styles --- */
.photoviewer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  color: var(--text-main);
}

.photoviewer-toolbar {
  height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
}

.photoviewer-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.photoviewer-actions {
  display: flex;
  gap: 12px;
}

.photoviewer-content {
  flex-grow: 1;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 20px;
}

.photoviewer-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- Music Player Styles --- */
.music-player-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 10px;
}

.player-header {
  margin-bottom: 20px;
  text-align: center;
}

.music-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Apple Music Inspired Styles --- */
.music-app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: transparent;
  color: var(--text-main);
  overflow: hidden;
  position: relative;
}

.music-header {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 10;
}

.music-header-left {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.music-header-right {
  flex: 1 1 250px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  gap: 15px;
}

.music-header-center {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 250px;
  max-width: 550px;
  margin: 0 20px;
}

.music-controls-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.music-btn-icon {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  opacity: 0.8;
  transition: all 0.2s var(--ease-out-expo);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-btn-icon:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.music-btn-icon:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.15);
}

.music-btn-icon.play-pause-btn {
  font-size: 32px;
  width: 50px;
  height: 50px;
}

.music-btn-icon.small {
  font-size: 18px;
  width: 36px;
  height: 36px;
  opacity: 0.7;
}

.music-btn-icon i.active {
  color: var(--accent);
  opacity: 1;
}

.now-playing-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 18px;
  border-radius: 14px;
  width: 100%;
  max-width: 600px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.now-playing-art {
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.now-playing-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.now-playing-details {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.now-playing-metadata {
  text-align: center;
  margin: 0 auto 4px auto;
  overflow: hidden;
  max-width: 100%;
}

.music-track-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-track-artist {
  font-size: 11px;
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.time-label {
  font-size: 9px;
  opacity: 0.5;
  min-width: 25px;
}

.music-progress-wrapper {
  flex-grow: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.music-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.music-volume-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  max-width: 180px;
}

.music-volume-slider {
  flex-grow: 1;
  height: 4px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  min-width: 80px;
}

.music-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s;
}

.music-volume-group:hover .music-volume-slider::-webkit-slider-thumb {
  opacity: 1;
}

.music-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  border: none;
}

.music-secondary-controls {
  display: flex;
  gap: 18px;
  align-items: center;
}

.music-body {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
}

.music-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
  padding: 25px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  overflow-y: auto;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  padding: 0 10px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-item i {
  color: var(--accent);
  font-size: 16px;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-item.active {
  background: var(--tint);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-playlists-list {
  max-height: 250px;
  overflow-y: auto;
}

.music-content {
  flex-grow: 1;
  padding: 30px;
  overflow-y: auto;
  position: relative;
  scrollbar-gutter: stable;
}

.view-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-size: 32px;
  opacity: 0.5;
}

.music-right-panel {
  width: 0;
  background: rgba(0, 0, 0, 0.2);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  container-type: inline-size;
}

.music-right-panel.active {
  width: 300px;
}

.panel-header {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 600;
  font-size: 14px;
}

.panel-content {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.music-right-panel.lyrics-mode .panel-content {
  padding: 0;
}

/* Library Grid */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 25px;
}

.grid-item {
  cursor: pointer;
}

.grid-art {
  width: 100%;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

.grid-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-item:hover .grid-art {
  transform: scale(1.02) translateY(-4px);
}

.grid-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-subtitle {
  font-size: 12px;
  opacity: 0.5;
}

/* Song List View */
.song-list {
  display: flex;
  flex-direction: column;
}

.song-row {
  display: grid;
  grid-template-columns: 40px 1.5fr 1fr 1fr 60px 100px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
  min-height: 38px;
}

.song-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.song-row .music-btn-icon.small {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.song-row .song-cell {
  font-size: 12px;
}

/* --- Lyrics Panel Styles --- */
.lyrics-container {
  position: relative;
  padding: 60px 40px;
  height: 100%;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  gap: 32px;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.lyrics-container::-webkit-scrollbar {
  display: none;
}

.lyric-line {
  font-size: clamp(20px, 4cqi, 32px);
  font-weight: 800;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.2);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
  filter: blur(1px);
  cursor: pointer;
}

.lyric-line.active {
  color: #fff;
  transform: scale(1.08);
  filter: blur(0px) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
}

.lyric-line:hover {
  color: rgba(255, 255, 255, 0.5);
}

.lyrics-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease;
}

.lyrics-bg.active {
  opacity: 1;
}

.lyrics-bg-img {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  filter: blur(80px) saturate(1.8) brightness(0.6);
  transform: scale(1.1);
  animation: slowZoom 20s infinite alternate ease-in-out;
}

@keyframes slowZoom {
  from {
    transform: scale(1.1) rotate(0deg);
  }

  to {
    transform: scale(1.3) rotate(5deg);
  }
}

.music-right-panel.lyrics-mode {
  width: 450px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(30px);
}

.music-right-panel.queue-mode {
  width: 320px;
}

.song-row.playing {
  color: var(--accent);
}

.song-cell {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.song-cell i {
  font-size: 16px;
  opacity: 0.5;
}

/* --- Responsive Music Player --- */
.music-app-container {
  container-type: inline-size;
}

@container (max-width: 850px) {
  .music-sidebar {
    width: 180px;
  }
}

@container (max-width: 680px) {
  .music-sidebar {
    display: none;
  }

  .music-header-center {
    display: none;
  }
}

@container (max-width: 480px) {
  .music-volume-group {
    display: none;
  }

  .music-header-left,
  .music-header-right {
    flex: 1;
    min-width: 0;
  }

  .music-header-right {
    justify-content: flex-end;
  }

  .music-controls-group {
    gap: 10px;
  }

  .music-btn-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .music-btn-icon.play-pause-btn {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

.music-btn-icon i.active {
  color: var(--accent) !important;
  opacity: 1 !important;
  filter: drop-shadow(0 0 5px var(--accent));
}

/* Queue Styling */
.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.queue-info {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.remove-from-queue-btn {
  flex-shrink: 0;
}

.queue-art {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  border-radius: 4px;
}

.music-art-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fa586a, #ff9a8b);
  color: #fff;
  font-size: 20px;
}

.remove-from-queue-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-from-queue-btn:hover {
  background: rgba(243, 139, 168, 0.2);
  color: var(--danger);
}

.ph-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* --- Mobile Responsive Rules --- */
@media (max-width: 768px) {
  /* Topbar Adjustments */
  .topbar-right span {
    display: none;
    /* Hide text labels on mobile like CPU / Battery % to save space */
  }

  #clock {
    display: inline;
    /* Keep clock visible */
    font-size: 11px;
  }

  .status-module {
    padding: 4px 6px;
  }

  .window-title-display {
    display: none;
    /* Hide window title in top setting on tiny screens */
  }

  /* Dock Adjustments */
  :root {
    --dock-item-size: 38px;
  }

  #dock {
    padding: 6px 8px;
    gap: 6px;
    margin-bottom: -10px;
    /* Shift down slightly */
  }

  .dock-item i {
    font-size: 20px;
  }

  /* OS Windows - Force Full Screenish */
  .os-window {
    top: 5px !important;
    left: 5px !important;
    width: calc(100% - 10px) !important;
    height: calc(100% - 75px) !important;
    /* Leave room for dock */
    border-radius: 12px !important;
    transform: none !important;
  }

  /* Overlays */
  .topbar-overlay {
    width: 90vw;
    right: 5vw;
    top: 45px;
  }

  .quickfind-box {
    width: 90vw;
    padding: 12px 15px;
  }

  .quickfind-input {
    font-size: 16px;
  }

  /* Apps internal layout adjustments */
  .explorer-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    padding: 10px;
  }

  .file-picker-dialog {
    width: 95vw;
    height: 80vh;
  }

  .music-body {
    flex-direction: column;
  }

  .music-sidebar {
    width: 100%;
    height: 150px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
}
