/* === THEME DEFINITIONS === */

/* Classic Vaporwave */
[data-theme="classic"] {
  --primary: #ff71ce;
  --secondary: #01cdfe;
  --accent: #b967ff;
  --bg-dark: #0a0a2e;
  --bg-medium: #1a1a3e;
  --text-primary: #ffffff;
  --text-secondary: #b0b0d0;
  --primary-rgb: 255,113,206;
  --secondary-rgb: 1,205,254;
  --accent-rgb: 185,103,255;
  --bg-dark-rgb: 10,10,46;
  --bg-medium-rgb: 26,26,62;
  --grid-color-rgb: 255,113,206;
}

[data-theme="classic"] #desktop {
  background: linear-gradient(180deg, #0a0a2e 0%, #1a0030 40%, #2d1b4e 70%, #1a0030 100%);
}

/* Mallsoft */
[data-theme="mallsoft"] {
  --primary: #e8a0bf;
  --secondary: #a0d2db;
  --accent: #c9b1d0;
  --bg-dark: #f0e6f0;
  --bg-medium: #f8f0f8;
  --text-primary: #4a3a4a;
  --text-secondary: #8a7a8a;
  --primary-rgb: 232,160,191;
  --secondary-rgb: 160,210,219;
  --accent-rgb: 201,177,208;
  --bg-dark-rgb: 240,230,240;
  --bg-medium-rgb: 248,240,248;
  --grid-color-rgb: 232,160,191;
}

[data-theme="mallsoft"] #desktop {
  background: linear-gradient(180deg, #f0e6f0 0%, #ffd4e8 30%, #e8d4ff 60%, #d4f0ff 100%);
}

[data-theme="mallsoft"] #scanlines {
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px
  );
}

[data-theme="mallsoft"] #sun-element {
  background: radial-gradient(circle, rgba(232,160,191,0.4), transparent 70%);
  box-shadow: 0 0 80px rgba(232,160,191,0.3);
  filter: blur(20px);
  width: 300px;
  height: 300px;
}

[data-theme="mallsoft"] .window-titlebar {
  background: linear-gradient(90deg, rgba(232,160,191,0.3), rgba(160,210,219,0.2));
}

[data-theme="mallsoft"] ::-webkit-scrollbar-track { background: #f0e6f0; }
[data-theme="mallsoft"] ::-webkit-scrollbar-thumb { background: #c9b1d0; border-color: #f0e6f0; }

/* Dreampunk */
[data-theme="dreampunk"] {
  --primary: #ff0066;
  --secondary: #00ffcc;
  --accent: #6600ff;
  --bg-dark: #070012;
  --bg-medium: #0d0025;
  --text-primary: #e0e0ff;
  --text-secondary: #7070a0;
  --primary-rgb: 255,0,102;
  --secondary-rgb: 0,255,204;
  --accent-rgb: 102,0,255;
  --bg-dark-rgb: 7,0,18;
  --bg-medium-rgb: 13,0,37;
  --grid-color-rgb: 102,0,255;
}

[data-theme="dreampunk"] #desktop {
  background: linear-gradient(180deg, #070012 0%, #0d0221 30%, #150050 60%, #0a0030 100%);
}

[data-theme="dreampunk"] #sun-element {
  display: none;
}

[data-theme="dreampunk"] #grid-floor {
  background:
    linear-gradient(to bottom, transparent 0%, rgba(102,0,255,0.05) 50%, rgba(102,0,255,0.12) 100%),
    repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(102,0,255,0.2) 49px, rgba(102,0,255,0.2) 50px),
    repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(102,0,255,0.15) 49px, rgba(102,0,255,0.15) 50px);
}

[data-theme="dreampunk"] .app-window {
  border-color: rgba(102,0,255,0.5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 2px rgba(102,0,255,0.5), 0 0 20px rgba(255,0,102,0.05);
}

/* Future Funk */
[data-theme="futurefunk"] {
  --primary: #ff6b9d;
  --secondary: #ffba53;
  --accent: #c44dff;
  --bg-dark: #1a0a2e;
  --bg-medium: #2a1040;
  --text-primary: #ffffff;
  --text-secondary: #d0a0d0;
  --primary-rgb: 255,107,157;
  --secondary-rgb: 255,186,83;
  --accent-rgb: 196,77,255;
  --bg-dark-rgb: 26,10,46;
  --bg-medium-rgb: 42,16,64;
  --grid-color-rgb: 255,107,157;
}

[data-theme="futurefunk"] #desktop {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1050 30%, #401060 50%, #2d1050 70%, #1a0a2e 100%);
}

[data-theme="futurefunk"] #sun-element {
  background: linear-gradient(to bottom, #ff6b9d, #ffba53 40%, transparent 40.5%, transparent 50%, #ffba53 50.5%, transparent 51%, transparent 62%, #ff6b9d 62.5%, transparent 63%, transparent 76%, #ff6b9d 76.5%);
  box-shadow: 0 0 80px rgba(255,107,157,0.5), 0 0 160px rgba(255,186,83,0.3);
}

[data-theme="futurefunk"] .app-window {
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 2px rgba(196,77,255,0.4), 0 0 15px rgba(255,107,157,0.08);
}

/* Windows 98 */
[data-theme="win98"] {
  --primary: #000080;
  --secondary: #008080;
  --accent: #808080;
  --bg-dark: #008080;
  --bg-medium: #c0c0c0;
  --text-primary: #000000;
  --text-secondary: #404040;
  --primary-rgb: 0,0,128;
  --secondary-rgb: 0,128,128;
  --accent-rgb: 128,128,128;
  --bg-dark-rgb: 0,128,128;
  --bg-medium-rgb: 192,192,192;
  --grid-color-rgb: 0,128,128;
  --font-main: 'Segoe UI', Tahoma, sans-serif;
}

[data-theme="win98"] #desktop {
  background: #008080;
}

[data-theme="win98"] #grid-floor,
[data-theme="win98"] #sun-element,
[data-theme="win98"] #particles-canvas {
  display: none;
}

[data-theme="win98"] #scanlines { display: none; }
[data-theme="win98"] #crt-overlay { display: none; }

[data-theme="win98"] .app-window {
  border: 2px outset #dfdfdf;
  background: #c0c0c0;
  backdrop-filter: none;
  box-shadow: 1px 1px 0 #000;
}

[data-theme="win98"] .window-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  border-bottom: none;
  height: 26px;
}

[data-theme="win98"] .window-title {
  color: #fff;
  text-shadow: none;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0;
  text-transform: none;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

[data-theme="win98"] .window-btn {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  font-size: 9px;
  color: #000;
}

[data-theme="win98"] .window-btn:hover {
  background: #d0d0d0;
}

[data-theme="win98"] .window-btn.btn-close:hover {
  background: #c0c0c0;
  border-color: #dfdfdf;
  color: #000;
}

[data-theme="win98"] #taskbar {
  background: #c0c0c0;
  border-top: 2px outset #dfdfdf;
  backdrop-filter: none;
  box-shadow: none;
}

[data-theme="win98"] #start-button {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 12px;
  letter-spacing: 0;
  color: #000;
}

[data-theme="win98"] #start-button:active,
[data-theme="win98"] #start-button.active {
  border-style: inset;
}

[data-theme="win98"] .taskbar-window-btn {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  color: #000;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

[data-theme="win98"] .taskbar-window-btn.active {
  border-style: inset;
  background: #b0b0b0;
}

[data-theme="win98"] #system-tray {
  border-left: 2px inset #dfdfdf;
}

[data-theme="win98"] #taskbar-clock {
  color: #000;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

[data-theme="win98"] #start-menu {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  backdrop-filter: none;
  box-shadow: 2px -2px 0 #000;
}

[data-theme="win98"] .start-menu-header {
  background: linear-gradient(180deg, #000080, #1084d0);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 4px;
  width: 30px;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}

[data-theme="win98"] .start-menu-title {
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #000;
}

[data-theme="win98"] .start-menu-subtitle { display: none; }

[data-theme="win98"] .start-menu-items {
  margin-left: 30px;
}

[data-theme="win98"] .start-menu-item {
  color: #000;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  letter-spacing: 0;
}

[data-theme="win98"] .start-menu-item:hover {
  background: #000080;
  color: #fff;
}

[data-theme="win98"] .context-menu {
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  backdrop-filter: none;
}

[data-theme="win98"] .context-item {
  color: #000;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

[data-theme="win98"] .context-item:hover {
  background: #000080;
  color: #fff;
}

[data-theme="win98"] .setting-item {
  background: #c0c0c0;
  border: 1px inset #808080;
}

[data-theme="win98"] ::-webkit-scrollbar-track { background: #c0c0c0; }
[data-theme="win98"] ::-webkit-scrollbar-thumb { background: #808080; border: 1px outset #dfdfdf; }

[data-theme="win98"] .icon-image {
  color: #000080;
  filter: none;
}

[data-theme="win98"] .icon-label {
  color: #fff;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  text-shadow: 1px 1px 2px #000;
}

[data-theme="win98"] .desktop-icon:hover { background: transparent; }
[data-theme="win98"] .desktop-icon.selected { background: rgba(0,0,128,0.3); outline: 1px dashed #fff; }

/* Utopian Virtual */
[data-theme="utopian"] {
  --primary: #7c5cbf;
  --secondary: #3db8a0;
  --accent: #4a90d9;
  --bg-dark: #f0f4f8;
  --bg-medium: #ffffff;
  --text-primary: #2a2a4a;
  --text-secondary: #6a6a8a;
  --primary-rgb: 124,92,191;
  --secondary-rgb: 61,184,160;
  --accent-rgb: 74,144,217;
  --bg-dark-rgb: 240,244,248;
  --bg-medium-rgb: 255,255,255;
  --grid-color-rgb: 124,92,191;
}

[data-theme="utopian"] #desktop {
  background: linear-gradient(180deg, #f0f4f8 0%, #e8f0ff 30%, #f0e8ff 60%, #e8fff0 100%);
}

[data-theme="utopian"] #scanlines { opacity: 0.2; }
[data-theme="utopian"] #crt-overlay { display: none; }

[data-theme="utopian"] #sun-element {
  background: radial-gradient(circle, rgba(124,92,191,0.15), rgba(61,184,160,0.1) 50%, transparent 70%);
  box-shadow: 0 0 100px rgba(124,92,191,0.15);
  filter: blur(30px);
  width: 400px;
  height: 400px;
}

[data-theme="utopian"] #grid-floor {
  opacity: 0.3;
}

[data-theme="utopian"] .app-window {
  border: 1px solid rgba(124,92,191,0.2);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 0 1px rgba(124,92,191,0.2);
}

[data-theme="utopian"] .window-titlebar {
  background: linear-gradient(90deg, rgba(124,92,191,0.08), rgba(61,184,160,0.05));
  border-bottom: 1px solid rgba(124,92,191,0.1);
}

[data-theme="utopian"] .focused .window-titlebar {
  background: linear-gradient(90deg, rgba(124,92,191,0.15), rgba(61,184,160,0.08));
}

[data-theme="utopian"] ::-webkit-scrollbar-track { background: #f0f4f8; }
[data-theme="utopian"] ::-webkit-scrollbar-thumb { background: #b0b8d0; border-color: #f0f4f8; }

[data-theme="utopian"] .icon-image {
  color: #7c5cbf;
  filter: none;
}

[data-theme="utopian"] .icon-label {
  color: #2a2a4a;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

[data-theme="utopian"] #taskbar {
  background: rgba(255,255,255,0.9);
  border-top: 1px solid rgba(124,92,191,0.15);
  box-shadow: 0 -2px 15px rgba(0,0,0,0.05);
}

[data-theme="utopian"] #start-button {
  background: rgba(124,92,191,0.1);
  border: 1px solid rgba(124,92,191,0.2);
  color: #2a2a4a;
}

[data-theme="utopian"] #start-menu {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(124,92,191,0.2);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.1);
}

[data-theme="utopian"] .start-menu-header {
  background: linear-gradient(135deg, rgba(124,92,191,0.1), rgba(61,184,160,0.08));
}

[data-theme="utopian"] .start-menu-item { color: #4a4a6a; }
[data-theme="utopian"] .start-menu-item:hover { background: rgba(124,92,191,0.1); color: #2a2a4a; }

[data-theme="utopian"] .context-menu {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(124,92,191,0.2);
}
[data-theme="utopian"] .context-item { color: #4a4a6a; }
[data-theme="utopian"] .context-item:hover { background: rgba(124,92,191,0.1); color: #2a2a4a; }

[data-theme="utopian"] .taskbar-window-btn { color: #4a4a6a; }
[data-theme="utopian"] #taskbar-clock { color: #4a4a6a; }

/* =========================================
   ARCH LINUX THEME
   "I use Arch btw"
   ========================================= */
[data-theme="archlinux"] {
  --primary: #1793d1;
  --secondary: #4fc3f7;
  --accent: #0d47a1;
  --bg-dark: #0a0a0a;
  --bg-medium: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #888888;
  --primary-rgb: 23,147,209;
  --secondary-rgb: 79,195,247;
  --accent-rgb: 13,71,161;
  --bg-dark-rgb: 10,10,10;
  --bg-medium-rgb: 26,26,26;
  --grid-color-rgb: 23,147,209;
  --font-main: 'Share Tech Mono', 'Courier New', monospace;
}

[data-theme="archlinux"] #desktop {
  background: #0a0a0a;
}

/* No fancy sun or grid — terminal purity */
[data-theme="archlinux"] #sun-element { display: none; }
[data-theme="archlinux"] #grid-floor { display: none; }
[data-theme="archlinux"] #crt-overlay { display: none; }

[data-theme="archlinux"] #scanlines {
  background: repeating-linear-gradient(
    0deg, transparent, transparent 1px,
    rgba(23,147,209,0.015) 1px, rgba(23,147,209,0.015) 2px
  );
  opacity: 0.6;
}

/* Window chrome — terminal style */
[data-theme="archlinux"] .app-window {
  border: 1px solid #333;
  background: rgba(18,18,18,0.97);
  backdrop-filter: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  border-radius: 0;
}

[data-theme="archlinux"] .app-window.focused {
  border-color: #1793d1;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 1px #1793d1;
}

[data-theme="archlinux"] .window-titlebar {
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  height: 28px;
}

[data-theme="archlinux"] .focused .window-titlebar {
  background: linear-gradient(90deg, #1a1a1a, #1a2a3a);
}

[data-theme="archlinux"] .window-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #1793d1;
  text-shadow: none;
  letter-spacing: 1px;
}

[data-theme="archlinux"] .window-title::before {
  content: '$ ';
  color: #4fc3f7;
}

[data-theme="archlinux"] .window-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  font-size: 0;
}

[data-theme="archlinux"] .window-btn.btn-close {
  background: #e74c3c;
}
[data-theme="archlinux"] .window-btn.btn-maximize {
  background: #2ecc71;
}
[data-theme="archlinux"] .window-btn.btn-minimize {
  background: #f39c12;
}

[data-theme="archlinux"] .window-btn.btn-close:hover { background: #ff6b6b; }
[data-theme="archlinux"] .window-btn.btn-maximize:hover { background: #55efc4; }
[data-theme="archlinux"] .window-btn.btn-minimize:hover { background: #fdcb6e; }

/* Desktop icons */
[data-theme="archlinux"] .icon-image {
  color: #1793d1;
  filter: none;
}

[data-theme="archlinux"] .desktop-icon:hover {
  background: rgba(23,147,209,0.08);
}

[data-theme="archlinux"] .icon-label {
  color: #ccc;
  font-family: 'Share Tech Mono', monospace;
  text-shadow: 1px 1px 2px #000;
  font-size: 10px;
}

/* Taskbar — dark panel */
[data-theme="archlinux"] #taskbar {
  background: #141414;
  border-top: 1px solid #333;
  backdrop-filter: none;
  box-shadow: 0 -1px 10px rgba(0,0,0,0.5);
}

[data-theme="archlinux"] #start-button {
  background: transparent;
  border: 1px solid #333;
  color: #1793d1;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
}

[data-theme="archlinux"] #start-button:hover {
  background: rgba(23,147,209,0.1);
  border-color: #1793d1;
}

[data-theme="archlinux"] #start-button .start-text::after {
  content: ' btw';
  color: #555;
  font-size: 9px;
}

[data-theme="archlinux"] .taskbar-window-btn {
  background: rgba(23,147,209,0.05);
  border: 1px solid #2a2a2a;
  color: #888;
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] .taskbar-window-btn.active {
  background: rgba(23,147,209,0.15);
  border-color: #1793d1;
  color: #1793d1;
}

[data-theme="archlinux"] #system-tray {
  border-left: 1px solid #333;
}

[data-theme="archlinux"] #taskbar-clock {
  color: #666;
  font-family: 'Share Tech Mono', monospace;
}

/* Start menu */
[data-theme="archlinux"] #start-menu {
  background: rgba(14,14,14,0.98);
  border: 1px solid #333;
  backdrop-filter: none;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.6);
}

[data-theme="archlinux"] .start-menu-header {
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  padding: 12px 16px;
}

[data-theme="archlinux"] .start-menu-title {
  color: #1793d1;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  letter-spacing: 3px;
  text-shadow: none;
}

[data-theme="archlinux"] .start-menu-subtitle {
  color: #555;
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] .start-menu-subtitle::after {
  content: ' | I use Arch btw';
}

[data-theme="archlinux"] .start-menu-item {
  color: #aaa;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0;
}

[data-theme="archlinux"] .start-menu-item:hover {
  background: rgba(23,147,209,0.15);
  color: #1793d1;
}

[data-theme="archlinux"] .start-menu-item::before {
  content: '> ';
  color: #444;
  font-size: 11px;
}

/* Context menu */
[data-theme="archlinux"] .context-menu {
  background: rgba(14,14,14,0.98);
  border: 1px solid #333;
  backdrop-filter: none;
}

[data-theme="archlinux"] .context-item {
  color: #aaa;
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] .context-item:hover {
  background: rgba(23,147,209,0.15);
  color: #1793d1;
}

/* Settings & forms */
[data-theme="archlinux"] .setting-item {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
}

[data-theme="archlinux"] .setting-item:hover {
  border-color: #333;
  background: #1e1e1e;
}

[data-theme="archlinux"] .setting-item input[type="checkbox"] {
  background: #0a0a0a;
  border-color: #444;
}

[data-theme="archlinux"] .setting-item input[type="checkbox"]:checked {
  background: rgba(23,147,209,0.2);
  border-color: #1793d1;
}

[data-theme="archlinux"] .setting-item input[type="checkbox"]:checked::after {
  background: #1793d1;
  box-shadow: 0 0 4px #1793d1;
}

[data-theme="archlinux"] .setting-item select {
  background: #0a0a0a;
  border-color: #333;
  color: #ccc;
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] .settings-tab {
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] .settings-tab.active {
  color: #1793d1;
  border-bottom-color: #1793d1;
}

[data-theme="archlinux"] .settings-panel h3 {
  color: #1793d1;
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] ::-webkit-scrollbar-track { background: #0a0a0a; }
[data-theme="archlinux"] ::-webkit-scrollbar-thumb { background: #333; border-color: #0a0a0a; }
[data-theme="archlinux"] ::-webkit-scrollbar-thumb:hover { background: #1793d1; }

/* Notepad — looks like a terminal */
[data-theme="archlinux"] .notepad-textarea {
  background: #0a0a0a;
  color: #4fc3f7;
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] .notepad-textarea::placeholder {
  color: #333;
}

/* Browser */
[data-theme="archlinux"] .browser-url-bar {
  background: #0a0a0a;
  border-color: #333;
}

[data-theme="archlinux"] .browser-url-input {
  font-family: 'Share Tech Mono', monospace;
  color: #ccc;
}

[data-theme="archlinux"] .browser-btn {
  background: #1a1a1a;
  border-color: #333;
  color: #888;
}

[data-theme="archlinux"] .browser-btn:hover {
  background: rgba(23,147,209,0.15);
  color: #1793d1;
}

/* Video player */
[data-theme="archlinux"] .video-url-input {
  background: #0a0a0a;
  border-color: #333;
  font-family: 'Share Tech Mono', monospace;
}

[data-theme="archlinux"] .video-load-btn,
[data-theme="archlinux"] .video-settings-btn {
  background: #1a1a1a;
  border-color: #333;
  font-family: 'Share Tech Mono', monospace;
}

/* Theme card preview */
.archlinux-preview {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 30%, #1793d1 70%, #0d47a1 100%);
  position: relative;
}

.archlinux-preview::after {
  content: 'arch';
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(23,147,209,0.5);
  letter-spacing: 2px;
}
