/* Dynamic Windows OS Style */

:root {
  --taskbar-bg: rgba(10, 10, 15, 0.85);
  --taskbar-hover: rgba(50, 255, 100, 0.15);
  --taskbar-active: rgba(50, 255, 100, 0.25);
  --window-bg: rgba(15, 15, 20, 0.95);
  --title-bar-bg: #0b0b0f;
  --accent-color: #00ff66;
  --text-dark: #e0e0e0;
  --text-light: #888888;
  --blur-amount: 25px;
  --selection-bg: rgba(0, 255, 102, 0.2);
  --selection-border: rgba(0, 255, 102, 0.6);
  --border-subtle: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --taskbar-bg: rgba(10, 10, 15, 0.85);
    --taskbar-hover: rgba(50, 255, 100, 0.15);
    --window-bg: rgba(15, 15, 20, 0.95);
    --title-bar-bg: #0b0b0f;
    --text-dark: #e0e0e0;
    --text-light: #aaa;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI Variable', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden; /* App level lock */
  background: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
}

body {
  position: fixed; /* Prevent mobile pull-to-refresh */
  touch-action: none;
}

/* Desktop */
.desktop {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#desktop-icons-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

#windows-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  pointer-events: none; /* Let clicks pass through to desktop, except where windows are */
  z-index: 2;
}

/* Icons */
.desktop-icon {
  width: 74px;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  font-size: 12px;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.1s, outline 0.1s;
}

.desktop-icon:hover, .desktop-icon.selected {
  background-color: var(--selection-bg);
  outline: 1px solid var(--selection-border);
}

.desktop-icon-img {
  font-size: 36px; /* Emojis for icons for now */
  margin-bottom: 5px;
}

.desktop-selection {
  position: absolute;
  background-color: var(--selection-bg);
  border: 1px solid var(--selection-border);
  pointer-events: none;
  z-index: 50;
}

/* Windows */
.window {
  position: absolute;
  background-color: var(--window-bg);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  pointer-events: auto; /* Re-enable pointer events for the window */
  z-index: 10;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.window.animating {
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.window.minimized {
  opacity: 0;
  transform: translateY(150px) scale(0.9);
  pointer-events: none;
}

.window.maximized {
  border-radius: 0;
}

.title-bar {
  height: 36px;
  background-color: var(--title-bar-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 12px;
  cursor: default;
  flex-shrink: 0;
}

.title-info {
  font-size: 13px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.window-controls {
  display: flex;
  height: 100%;
}

.window-controls button {
  width: 46px;
  height: 100%;
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 16px;
  cursor: default;
  transition: background 0.1s;
}

.window-controls button.close:hover {
  background-color: #e81123;
  color: white;
}

.window-controls button:not(.close):hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.window-content {
  flex: 1;
  background-color: #fff; /* Most apps have light content, unless themed */
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* App scrollbar */
  overflow-x: hidden;
  touch-action: pan-y; /* Enable touch scrolling within windows */
}

.window-content iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Window Resize Handles */
.resize-handle {
  position: absolute;
  z-index: 20;
}
.resize-n { top: 0; left: 5px; right: 5px; height: 5px; cursor: n-resize; }
.resize-s { bottom: 0; left: 5px; right: 5px; height: 5px; cursor: s-resize; }
.resize-e { top: 5px; bottom: 5px; right: 0; width: 5px; cursor: e-resize; }
.resize-w { top: 5px; bottom: 5px; left: 0; width: 5px; cursor: w-resize; }
.resize-ne { top: 0; right: 0; width: 5px; height: 5px; cursor: ne-resize; }
.resize-nw { top: 0; left: 0; width: 5px; height: 5px; cursor: nw-resize; }
.resize-se { bottom: 0; right: 0; width: 5px; height: 5px; cursor: se-resize; }
.resize-sw { bottom: 0; left: 0; width: 5px; height: 5px; cursor: sw-resize; }


/* Taskbar */
.taskbar {
  height: 48px;
  background-color: var(--taskbar-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  z-index: 100;
  border-top: 1px solid var(--border-subtle);
}

.taskbar-left {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
}

.taskbar-right {
  display: flex;
  align-items: center;
}

#taskbar-apps {
  display: flex;
  gap: 4px;
}

.taskbar-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
  font-size: 20px;
  position: relative;
}

.taskbar-icon:hover {
  background-color: var(--taskbar-hover);
}

.taskbar-icon.open-active {
  background-color: var(--taskbar-active);
}

.taskbar-icon.open-active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 3px;
  transition: width 0.2s;
}

.taskbar-icon.open-minimized::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 3px;
  transition: width 0.2s;
}

.start-button {
  width: auto;
  min-width: 40px;
  padding: 0;
  margin-right: 10px;
}

.start-button img {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.start-button:hover img {
  transform: scale(1.1);
}

.start-button:active img {
  transform: scale(0.95);
}

.user-profile img {
  width: 48px; height: 48px; min-width: 48px; margin:0;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,255,102,0.2);
  border: 1px solid var(--accent-color);
}


.time-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 12px;
  color: var(--text-dark);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: default;
  transition: background-color 0.15s;
}

.time-widget:hover {
  background-color: var(--taskbar-hover);
}

/* Start Menu */
.start-menu {
  position: absolute;
  bottom: 60px;
  left: 12px; /* Aligned left */
  width: 640px;
  height: 700px;
  max-height: 80vh;
  background-color: var(--taskbar-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 99;
}

.start-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.start-menu h3 {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 20px;
  font-weight: 600;
  padding-left: 8px;
}

.pinned-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pinned-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.pinned-app:hover {
  background-color: rgba(255,255,255,0.1);
}

.pinned-app .icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.pinned-app span {
  font-size: 12px;
  color: var(--text-dark);
}

/* Context Menu */
.context-menu {
  position: absolute;
  background-color: var(--window-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  z-index: 1000;
  min-width: 150px;
  backdrop-filter: blur(var(--blur-amount));
}

.context-item {
  padding: 8px 16px;
  color: var(--text-dark);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.context-item:hover {
  background-color: var(--selection-bg);
}

.context-separator {
  height: 1px;
  background-color: var(--border-subtle);
  margin: 4px 0;
}

/* App: Explorer */
.explorer-app {
  display: flex;
  height: 100%;
  background: var(--window-bg);
  color: var(--text-dark);
}
.explorer-sidebar {
  width: 200px;
  border-right: 1px solid var(--border-subtle);
  padding: 10px;
  background: rgba(0,0,0,0.2);
}
.explorer-sidebar ul { list-style: none; }
.explorer-sidebar li {
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 4px;
}
.explorer-sidebar li.active, .explorer-sidebar li:hover {
  background: var(--selection-bg);
}
.explorer-content {
  flex: 1;
  padding: 20px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}
.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  cursor: pointer;
}
.folder:hover { background: rgba(255,255,255,0.05); border-radius: 4px;}
.folder-icon { font-size: 40px; margin-bottom: 5px;}
.folder span { font-size: 13px; text-align: center; }

/* App: Settings (Windows 11 style) */
.settings-app {
  display: flex;
  height: 100%;
  background: #f3f3f3;
  color: #202020;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
}
@media (prefers-color-scheme: dark) {
  .settings-app { background: #202020; color: #fff; }
}

.settings-sidebar {
  width: 250px;
  background: rgba(0,0,0,0.03);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
}
@media (prefers-color-scheme: dark) {
  .settings-sidebar { background: rgba(255,255,255,0.03); }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 0 10px;
}
.user-profile img {
  width: 48px; height: 48px; min-width: 48px; margin:0;
  border-radius: 8px;
}
.user-details {
  display: flex;
  flex-direction: column;
}
.user-details strong { font-size: 14px; }
.user-details span { font-size: 12px; color: #888; }

.settings-sidebar ul { list-style: none; }
.settings-sidebar li {
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 14px;
}
.settings-sidebar li.active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
@media (prefers-color-scheme: dark) {
  .settings-sidebar li.active {
    background: rgba(255,255,255,0.1);
  }
}
.settings-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  touch-action: pan-y;
}
.settings-header h2 { font-size: 24px; font-weight: 600; margin-bottom: 20px;}
.settings-cards { display: flex; flex-direction: column; gap: 10px; }
.settings-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
@media (prefers-color-scheme: dark) {
  .settings-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
}
.card-icon { font-size: 24px; }
.card-info h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px;}
.card-info p { font-size: 12px; color: #666; margin-bottom: 2px;}

/* Not Responding Overlay */
.not-responding-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: wait;
}
@media (prefers-color-scheme: dark) {
  .not-responding-overlay { background: rgba(0,0,0,0.4); }
}
.error-dialog {
  background: #f0f0f0;
  border: 1px solid #ccc;
  width: 350px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  cursor: default;
}
@media (prefers-color-scheme: dark) {
  .error-dialog { background: #2b2b2b; border-color: #444; color: #fff;}
}
.error-dialog h3 { font-size: 14px; font-weight: normal; padding: 15px 15px 5px 15px; color: #0060df;}
.error-dialog p { font-size: 12px; padding: 0 15px 15px 15px; border-bottom: 1px solid #ccc; margin-bottom: 10px;}
@media (prefers-color-scheme: dark) {
  .error-dialog p { border-color: #444;}
}
.win-btn {
  background: transparent;
  border: none;
  text-align: left;
  padding: 10px 15px;
  font-size: 12px;
  cursor: pointer;
  color: #333;
}
@media (prefers-color-scheme: dark) { .win-btn { color: #ccc; } }
.win-btn:hover { background: rgba(0,96,223, 0.1); }

/* App: Task Manager */
.taskmgr-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  color: #202020;
}
@media (prefers-color-scheme: dark) {
  .taskmgr-app { background: #202020; color: #fff; }
}
.taskmgr-sidebar {
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
}
@media (prefers-color-scheme: dark) {
  .taskmgr-sidebar { background: #2d2d2d; border-color: #444; }
}
.taskmgr-sidebar ul { list-style: none; display: flex; }
.taskmgr-sidebar li {
  padding: 10px 20px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.taskmgr-sidebar li.active {
  border-bottom: 2px solid var(--accent-color);
  color: var(--accent-color);
}
.taskmgr-content {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}
.skills-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.skills-table th { text-align: left; padding: 5px; border-right: 1px solid #eee; border-bottom: 1px solid #ccc; font-weight: normal;}
.skills-table td { padding: 8px 5px; border-bottom: 1px solid #eee;}
@media (prefers-color-scheme: dark) {
  .skills-table th { border-color: #444; }
  .skills-table td { border-color: #333; }
}
.usage-high { background: rgba(255, 100, 100, 0.2); color: #d00; text-align: right;}
.usage-med { background: rgba(255, 200, 100, 0.2); color: #a60; text-align: right;}

/* App: IDE */
.ide-app {
  display: flex;
  height: 100%;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', monospace;
}
.ide-sidebar {
  width: 200px;
  background: #252526;
  border-right: 1px solid #333;
  padding: 10px 0;
}
.ide-sidebar h4 { font-size: 11px; padding: 0 10px; margin-bottom: 10px; font-weight: normal; color: #bbb;}
.ide-sidebar ul { list-style: none; }
.ide-sidebar li { padding: 4px 10px 4px 20px; font-size: 13px; cursor: pointer;}
.ide-sidebar li:hover { background: #2a2d2e; }
.ide-sidebar li.current { background: #37373d; }
.ide-editor { flex: 1; display: flex; flex-direction: column; }
.ide-tabs { display: flex; background: #2d2d2d; }
.ide-tab { padding: 8px 15px; font-size: 13px; background: #1e1e1e; border-top: 1px solid #007acc; cursor: default;}
.ide-code { flex: 1; padding: 15px; overflow: auto; font-size: 14px; line-height: 1.5; color: #9cdcfe;}
.ide-code span.string { color: #ce9178; }
.ide-code span.keyword { color: #569cd6; }
.ide-run-btn {
  margin-left: auto;
  margin-right: 15px;
  align-self: center;
  background: #007acc;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}
.ide-run-btn:hover { background: #0098ff; }

/* App: Mail */
.mail-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f0f0f0;
  color: #333;
}
.mail-header { padding: 15px; border-bottom: 1px solid #ddd; font-weight: bold; background: #fff;}
.mail-body { flex: 1; display: flex; flex-direction: column; padding: 15px; gap: 10px;}
.mail-body input { padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;}
.mail-body textarea { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 4px; resize: none; font-size: 14px;}
.mail-footer { padding: 15px; background: #fff; border-top: 1px solid #ddd; display: flex; justify-content: flex-end;}
.send-btn { background: var(--accent-color); color: #000; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-weight: bold;}

/* App: Notepad */
.notepad-app {
  height: 100%;
  display: flex;
}
.notepad-textarea {
  flex: 1;
  border: none;
  resize: none;
  padding: 10px;
  font-family: 'Consolas', monospace;
  font-size: 14px;
  outline: none;
}

/* Homepage Copy inside Browser */
.browser-about-page {
  font-family: Inter, ui-sans-serif, system-ui, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  color: #e6eef8;
  background: linear-gradient(180deg, #071029 0%, #0f1724 60%);
  height: 100%;
  overflow: auto;
  touch-action: pan-y;
}
.browser-about-page * { box-sizing: border-box; }
.browser-about-page .container { max-width: 1100px; margin: 0 auto; padding: 28px; }
.browser-about-page .header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.browser-about-page .brand { display: flex; align-items: center; gap: 14px; }
.browser-about-page .brand img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.browser-about-page .brand-name { font-weight: 700; font-size: 16px; }
.browser-about-page .nav { display: flex; gap: 18px; }
.browser-about-page .nav a { color: #94a3b8; text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.browser-about-page .nav a:hover { color: #e6eef8; background: rgba(255,255,255,0.03); }
.browser-about-page .card { background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); padding: 20px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.04); }
.browser-about-page .bio-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.browser-about-page .bio-photo { width: 200px; border-radius: 12px; }
.browser-about-page .small { font-size: 13px; color: #94a3b8; }
.browser-about-page .mt-28 { margin-top: 28px; }
.browser-about-page .footer { margin-top: 40px; color: #94a3b8; text-align: center; font-size: 14px; padding-bottom: 20px; }
.browser-about-page h1, .browser-about-page h3 { margin-top: 0; }
.browser-about-page ul { margin: 0; padding-left: 20px; }

/* TV Turn Off Overlay */
#tv-off-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  z-index: 99999;
  pointer-events: none;
  animation: tv-off 0.8s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes tv-off {
  0% { transform: scale(1, 1); opacity: 0; }
  10% { transform: scale(1, 0.005); opacity: 1; }
  50% { transform: scale(1, 0.005); opacity: 1; }
  100% { transform: scale(0, 0); opacity: 1; }
}

/* BSOD Base */
#bsod {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #0000aa;
  color: #fff;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Consolas', 'Courier New', monospace;
}
.bsod-content {
  max-width: 800px;
  text-align: left;
}

/* Centered Desktop Icon Text */
.desktop-icon span {
  text-align: center;
  line-height: 1.2;
}

/* App: OpenOffice */
.openoffice-app { display: flex; flex-direction: column; height: 100%; background: #f0f0f0; color: #000; font-family: 'Segoe UI', sans-serif; position: relative;}
.oo-menu-bar { display: flex; background: #ece9d8; border-bottom: 1px solid #ccc; padding: 2px 5px;}
@media (prefers-color-scheme: dark) { .oo-menu-bar { background: #333; border-bottom: 1px solid #222; } .openoffice-app { background: #444; } }
.oo-menu-item { padding: 4px 8px; font-size: 13px; cursor: default;}
.oo-menu-item:hover { background: rgba(0,0,0,0.1); }
.oo-toolbar { display: flex; background: #ece9d8; padding: 5px; border-bottom: 1px solid #ccc; align-items: center;}
@media (prefers-color-scheme: dark) { .oo-toolbar { background: #333; border-bottom: 1px solid #222; } }
.oo-tool-icon { width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 2px; margin-right: 2px; cursor: default; font-size: 14px;}
.oo-tool-icon:hover { border: 1px solid #999; background: rgba(255,255,255,0.5); }
.oo-tool-divider { width: 1px; height: 18px; background: #ccc; margin: 0 5px; }
.oo-workspace { flex: 1; background: #808080; padding: 20px; overflow-y: auto; display: flex; justify-content: center; touch-action: pan-y; }
@media (prefers-color-scheme: dark) { .oo-workspace { background: #222; } }
.oo-page { background: #fff; width: 600px; min-height: 800px; padding: 40px; box-shadow: 2px 2px 10px rgba(0,0,0,0.5); margin: 0 auto; color: #000; text-align: left; }
.oo-dropdown { position: absolute; top: 26px; left: 5px; background: #ece9d8; border: 1px solid #ccc; box-shadow: 2px 2px 5px rgba(0,0,0,0.2); z-index: 100;}
@media (prefers-color-scheme: dark) { .oo-dropdown { background: #333; border-color: #222; color: #fff;} }
.oo-dropdown-item { padding: 5px 20px 5px 10px; font-size: 13px; cursor: default; }
.oo-dropdown-item:hover { background: #316ac5; color: #fff; }
.pdf-download:hover { color: #fff !important; }
.oo-dropdown-divider { height: 1px; background: #ccc; margin: 2px 0; }
.resume-header { text-align: center; margin-bottom: 20px; }
.resume-header h1 { margin: 0; font-size: 28px; font-weight: normal; font-family: "Times New Roman", serif;}
.resume-header p { margin: 2px 0; color: #555; font-size: 14px; }
.oo-page hr { border: none; border-top: 1px solid #000; margin-bottom: 20px;}
.oo-page h2 { font-size: 16px; border-bottom: 1px solid #ccc; padding-bottom: 4px; margin-top: 20px; margin-bottom: 10px;}
.oo-page p, .oo-page ul { font-size: 12px; line-height: 1.6; margin-bottom: 10px; }
.oo-page ul { padding-left: 20px; }

/* App: Retro Browser */
.retro-browser-app { display: flex; flex-direction: column; height: 100%; background: #c0c0c0; color: #000; font-family: Tahoma, sans-serif; }
.retro-toolbar { background: #c0c0c0; border-bottom: 2px inset #fff; padding: 2px; }
.retro-menu-bar { display: flex; font-size: 13px; padding: 2px; }
.retro-menu-bar span { margin-right: 15px; }
.retro-menu-bar span:first-letter { text-decoration: underline; }
.retro-address-bar { display: flex; align-items: center; padding: 4px; border-top: 1px solid #fff; border-bottom: 1px solid #808080;}
.retro-address-bar span { font-size: 13px; margin-right: 5px;}
.retro-address-bar input { flex:1; border: 2px inset #fff; padding: 2px 4px; background: #fff; font-size: 13px; font-family: monospace; color: #000;}
.retro-content { flex: 1; background: #c0c0c0; border: 2px inset #fff; overflow-y: auto; color: #000; font-family: 'Times New Roman', Times, serif; touch-action: pan-y; }
.retro-site { padding: 40px; max-width: 800px; margin: 0 auto; line-height: 1.4; }
.retro-header { text-align: center; border-bottom: 2px solid #808080; padding-bottom: 10px; margin-bottom: 20px; }
.retro-header h1 { margin: 0; color: #000080; font-size: 32px; font-weight: bold; }
.retro-nav { text-align: center; font-weight: bold; margin-bottom: 20px; }
.retro-nav a { color: #0000ee; text-decoration: underline; padding: 0 5px; }
.retro-main h2 { color: #800000; font-size: 24px; }
.retro-main p { font-size: 18px; margin-bottom: 15px; }
.retro-footer { text-align: center; font-size: 12px; color: #404040; border-top: 1px solid #808080; padding-top: 20px; margin-top: 30px; }
#retro-prompt { font-weight: bold; color: #000; margin-top: 20px; font-size: 16px; }
.blinking-cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Mobile Optimizations */
@media (max-width: 768px) {
  .start-menu {
    left: 0;
    width: 100%;
    height: auto;
    bottom: 48px;
    border-radius: 12px 12px 0 0;
    padding: 15px;
  }
  
  .pinned-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .pinned-app {
    padding: 8px 5px;
  }
  
  .pinned-app .icon { font-size: 24px; }
  .pinned-app span { font-size: 10px; }
  
  .time-widget #date { display: none; }
  .time-widget { padding: 0 5px; }
  
  .window {
    border-radius: 0;
  }
  
  .window.maximized {
    height: calc(100vh - 48px);
  }
  
  .title-bar { height: 44px; } /* Larger touch area */
  .window-controls button { width: 44px; }
  
  .desktop-icon { width: 65px; padding: 5px; }
  .desktop-icon-img { font-size: 30px; }
  .desktop-icon span { font-size: 10px; }
  
  .oo-page { width: 95vw; padding: 20px; }
  .oo-menu-bar { overflow-x: auto; white-space: nowrap; }
  
  .retro-content { font-size: 12px; padding: 10px; }
}

/* Mail App (Outlook Style) */
.mail-app {
  display: flex;
  height: 100%;
  background: #f0f0f0;
  color: #333;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 13px;
}
.mail-sidebar {
  width: 180px;
  background: #fff;
  border-right: 1px solid #ccc;
  padding: 10px;
  flex-shrink: 0;
}
.mail-folder-group { margin-bottom: 20px; }
.mail-folder-header { font-weight: bold; padding: 5px; color: #555; text-transform: uppercase; font-size: 10px; }
.mail-folder { padding: 4px 10px; cursor: pointer; border-radius: 4px; border: 1px solid transparent; }
.mail-folder:hover { background: #e0e0e0; }
.mail-folder.active { background: #0078d4; color: white; }

.mail-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mail-list {
  height: 120px;
  background: #fff;
  border-bottom: 2px solid #ccc;
  overflow-y: auto;
  flex-shrink: 0;
}
.mail-item {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.mail-item:hover { background: #f5f5f5; }
.mail-item.active { background: #eff6fc; border-left: 4px solid #0078d4; }
.mail-item-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.mail-item .from { font-weight: bold; color: #0078d4; }
.mail-item .date { font-size: 11px; color: #666; }
.mail-item .subject { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mail-preview {
  flex: 1;
  background: #fff;
  padding: 20px;
  overflow-y: auto;
}
.preview-header {
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 15px;
  padding-bottom: 10px;
}
.preview-header p { margin: 4px 0; }
.preview-content { line-height: 1.6; color: #444; font-size: 14px; }

/* IDE Enhancements */
.ide-sidebar .tab-list li.open-folder {
  font-weight: bold;
  font-size: 10px;
  color: #ffcc00; /* Folder yellow highlight */
  margin-bottom: 5px;
  margin-top: 15px;
  opacity: 0.8;
}
.ide-sidebar .tab-list li.active {
  background: #37373d;
  color: #fff;
}
.ide-code pre {
  margin: 0;
  padding: 20px;
  color: #d4d4d4;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.6;
}
.ide-code code a {
  color: #569cd6;
  text-decoration: underline;
  font-weight: bold;
}

/* App: OpenOffice Editor Styles */
.oo-workspace {
  flex: 1;
  background-color: #525659;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.oo-page-shadow {
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.oo-page {
  background-color: #fff;
  width: 21cm;
  min-height: 29.7cm;
  padding: 2.54cm;
  color: #000;
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  cursor: text;
  box-sizing: border-box;
}

.oo-page h1, .oo-page h2, .oo-page h3 {
  font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
  color: #333;
  margin-bottom: 10px;
}

.oo-page p { margin-bottom: 15px; }

.oo-menu-bar {
  display: flex;
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
  font-size: 12px;
  padding: 2px 0;
  color: #000;
}

.oo-menu-item { padding: 4px 10px; cursor: pointer; }
.oo-menu-item:hover { background: #0060df; color: #fff; }

.oo-toolbar {
  display: flex;
  align-items: center;
  background: #f9f9f9;
  border-bottom: 1px solid #ccc;
  padding: 5px 10px;
  gap: 5px;
}

.oo-tool-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 3px;
  font-size: 14px; color: #444;
}

.oo-tool-icon:hover { background: #eee; border: 1px solid #ccc; }
.oo-tool-divider { width: 1px; height: 20px; background: #ccc; margin: 0 5px; }

.oo-dropdown {
  position: absolute;
  background: #fff; border: 1px solid #ccc;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.1); z-index: 1000;
  top: 65px; left: 10px; min-width: 150px;
}

.oo-dropdown-item { padding: 8px 12px; font-size: 12px; cursor: pointer; color: #000; }
.oo-dropdown-item:hover { background: #0060df; color: #fff; }
.oo-dropdown-divider { height: 1px; background: #eee; margin: 4px 0; }

/* Notepad Enhancements */
.notepad-app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.notepad-toolbar {
  padding: 5px 10px;
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
  display: flex;
  gap: 8px;
  align-items: center;
}

.notepad-toolbar .win-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #333;
}

.notepad-toolbar .win-btn:hover {
  background: #eee;
}

.notepad-textarea {
  flex: 1;
  border: none;
  resize: none;
  padding: 15px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  background: #fff;
  color: #000;
}

/* Simple Mail Form */
.mail-app-simple {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 25px;
  background: #fdfdfd;
  color: #333;
  box-sizing: border-box;
}

.mail-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.mail-field label {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mail-field input, .mail-field textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  transition: border-color 0.2s;
  background: #fff;
}

.mail-field input:focus, .mail-field textarea:focus {
  border-color: #0060df;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 96, 223, 0.1);
}

.mail-field.body-field {
  flex: 1;
}

.mail-field textarea {
  flex: 1;
  resize: none;
  min-height: 150px;
}

.mail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.primary-btn {
  background-color: #0060df !important;
  color: white !important;
  border: none !important;
  padding: 10px 25px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.primary-btn:hover {
  background-color: #0050bb !important;
}

/* Resume Layout Adjustments */
.oo-page {
  font-family: 'Georgia', serif !important;
  color: #111 !important;
}
.oo-page ul {
  padding-left: 20px;
  margin: 5px 0;
}
.oo-page li {
  margin-bottom: 3px;
}
.oo-page h1, .oo-page h2, .oo-page h3 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Custom PDF Viewer App */
.pdf-viewer-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #202124;
  color: #fff;
  overflow: hidden;
}

.pdf-toolbar {
  height: 48px;
  background: #323639;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 5;
  gap: 10px;
}

.pdf-tool-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.pdf-tool-divider {
  width: 1px;
  height: 24px;
  background: #5f6368;
  margin: 0 10px;
}

.pdf-workspace {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 20px;
  background: #525659;
}

.pdf-canvas-container {
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  background: #fff;
}

#pdf-canvas {
  display: block;
}

/* LinkedIn Notification Popup */
.win-notification {
  position: fixed;
  bottom: 60px;
  right: -400px;
  width: 350px;
  background: rgba(32, 32, 32, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  z-index: 10000;
  transition: right 0.6s cubic-bezier(0.2, 1, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}

.win-notification.show {
  right: 20px;
}

.notification-header {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #aaa;
}

.notif-icon {
  width: 16px;
  height: 16px;
}

.close-notif {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
}

.close-notif:hover {
  opacity: 1;
}

.notification-body {
  padding: 15px;
}

.notification-body strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.notification-body p {
  font-size: 13px;
  margin: 0;
  opacity: 0.8;
  line-height: 1.4;
}

.notification-actions {
  padding: 10px 15px 15px;
  display: flex;
  gap: 10px;
}

.notification-actions .win-btn {
  flex: 1;
  font-size: 12px;
  padding: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff !important; /* Force white text for both buttons */
}

.notification-actions .win-btn:last-child {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.notification-actions .win-btn:last-child:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Resume Protection Styles */
.pdf-canvas-container {
  position: relative;
}

.pdf-protection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pdf-protection-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.protection-message {
  color: white;
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  font-family: 'Segoe UI', system-ui, sans-serif;
  padding: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

/* Print Protection */
@media print {
  body * {
    visibility: hidden !important;
  }
  
  .pdf-viewer-app, 
  .pdf-viewer-app * {
    visibility: hidden !important;
  }
  
  .pdf-protection-overlay {
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: white !important;
    color: black !important;
    z-index: 9999999 !important;
  }
  
  .protection-message {
    visibility: visible !important;
    color: black !important;
    text-shadow: none !important;
    border: 5px solid black !important;
  }
}

/* GitHub App Custom Wrapper styles */
.github-wrap-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #0d1117;
  color: #c9d1d9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  text-align: center;
  padding: 20px;
}

.github-wrap-logo {
  font-size: 60px;
  margin-bottom: 20px;
}

.github-wrap-container h2 {
  color: #f0f6fc;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.github-wrap-container p {
  color: #8b949e;
  font-size: 14px;
  max-width: 400px;
  margin-bottom: 30px;
  line-height: 1.5;
}

.github-wrap-btn {
  background-color: #238636;
  color: #ffffff;
  border: 1px solid rgba(240,246,252,0.1);
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 0 rgba(27,31,36,0.1);
  transition: background-color 0.2s;
}

.github-wrap-btn:hover {
  background-color: #2ea043;
}

/* Disabled/Coming Soon items inside folder */
.folder.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
