/* ============================================
   Application-Specific Styles
   ============================================ */

/* ---- About Me (Tabbed) ---- */
.about-app {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.about-tabs {
  display: flex;
  background: var(--win-bg);
  border-bottom: 2px inset var(--win-bg);
  padding: 2px 4px 0;
  gap: 2px;
}
.about-tab {
  padding: 4px 12px;
  border: 2px outset var(--win-bg);
  border-bottom: none;
  background: var(--win-bg);
  cursor: pointer;
  font-family: var(--font-system);
  font-size: 13px;
  margin-bottom: -2px;
  position: relative;
}
.about-tab.active {
  background: #fff;
  border-bottom: 2px solid #fff;
  z-index: 1;
  font-weight: bold;
}
.about-panels {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  padding: 16px;
}
.about-panel {
  display: none;
}
.about-panel.active {
  display: block;
}
.about-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.about-avatar {
  width: 64px;
  height: 64px;
  background: var(--titlebar-active);
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px outset var(--win-bg);
}
.about-intro h2 {
  font-size: 22px;
  margin: 0;
}
.about-tagline {
  font-size: 14px;
  color: #444;
  margin: 2px 0;
}
.about-location {
  font-size: 13px;
  color: #666;
}
.about-bio {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.about-bio p {
  margin-bottom: 8px;
}
.about-stats {
  display: flex;
  gap: 24px;
  padding: 12px 0;
  border-top: 1px solid #ccc;
}
.about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-num {
  font-size: 24px;
  font-weight: bold;
  color: var(--titlebar-active);
}
.stat-label {
  font-size: 12px;
  color: #666;
}
.skill-group {
  margin-bottom: 16px;
}
.skill-group h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--titlebar-active);
}
.skill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.skill-name {
  font-size: 13px;
  width: 160px;
  flex-shrink: 0;
}
.skill-track {
  flex: 1;
  height: 14px;
  background: #ddd;
  border: 1px inset var(--win-bg);
}
.skill-fill {
  height: 100%;
  background: var(--titlebar-active);
  transition: width 0.6s ease;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skill-tag {
  padding: 3px 10px;
  background: var(--titlebar-active);
  color: #fff;
  font-size: 12px;
  border: 1px outset var(--win-bg);
}
.skill-tag.interest {
  background: #006060;
}
.about-panel h3 {
  font-size: 17px;
  margin-bottom: 12px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
}
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--titlebar-active);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 2px;
  width: 10px;
  height: 10px;
  background: var(--titlebar-active);
  border: 2px solid #fff;
  border-radius: 50%;
}
.timeline-content {
  border: 1px solid #ccc;
  padding: 10px 12px;
  background: #fafafa;
}
.timeline-date {
  font-size: 11px;
  color: #888;
  font-weight: bold;
  text-transform: uppercase;
}
.timeline-content h4 {
  font-size: 15px;
  margin: 4px 0;
}
.timeline-content p {
  font-size: 13px;
  line-height: 1.5;
  color: #444;
}
.funfacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.funfact-card {
  border: 2px outset var(--win-bg);
  padding: 14px 10px;
  text-align: center;
  background: var(--win-bg);
}
.funfact-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.funfact-card p {
  font-size: 13px;
  line-height: 1.4;
}

/* ---- Projects (Card Grid) ---- */
.projects-app {
  padding: 12px;
  overflow-y: auto;
  height: 100%;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.project-card {
  border: 2px outset var(--win-bg);
  background: #fff;
  overflow: hidden;
  cursor: default;
}
.project-card:hover {
  box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
}
.project-card-header {
  padding: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-emoji {
  font-size: 24px;
}
.project-card-header h3 {
  font-size: 15px;
  margin: 0;
  font-weight: bold;
}
.project-card-body {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}
.project-card-body p {
  margin-bottom: 8px;
  color: #333;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.project-tag {
  padding: 2px 8px;
  background: #eee;
  font-size: 11px;
  border: 1px solid #ccc;
  color: #444;
}
.project-links {
  display: flex;
  gap: 8px;
}
.project-link {
  font-size: 12px;
  color: var(--titlebar-active);
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Contact (Sidebar + Form) ---- */
.contact-app {
  display: flex;
  height: 100%;
}
.contact-sidebar {
  width: 180px;
  background: var(--win-bg);
  border-right: 2px inset var(--win-bg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.contact-card {
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #aaa;
}
.contact-card-avatar {
  width: 48px;
  height: 48px;
  background: var(--titlebar-active);
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  border: 2px outset var(--win-bg);
}
.contact-card h3 {
  font-size: 15px;
  margin: 0;
}
.contact-card p {
  font-size: 11px;
  color: #666;
}
.contact-socials {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-social-btn {
  display: block;
  padding: 4px 8px;
  font-size: 12px;
  font-family: var(--font-system);
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.contact-social-btn:hover {
  background: var(--highlight);
  color: var(--highlight-text);
}
.contact-info-box {
  font-size: 11px;
  line-height: 1.6;
  color: #444;
}
.contact-form-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.email-header {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 2px inset var(--win-bg);
  background: var(--win-bg);
}
.email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.email-row label {
  width: 50px;
  text-align: right;
  font-weight: bold;
}
.email-row input {
  flex: 1;
  height: 22px;
  border: 2px inset var(--win-bg);
  padding: 0 4px;
  font-family: var(--font-system);
  font-size: 14px;
}
.email-body-area {
  flex: 1;
  display: flex;
}
.email-body-area textarea {
  flex: 1;
  border: none;
  resize: none;
  padding: 8px;
  font-family: var(--font-system);
  font-size: 15px;
  outline: none;
}
.email-toolbar {
  padding: 4px 8px;
  background: var(--win-bg);
  border-top: 2px inset var(--win-bg);
  display: flex;
  gap: 8px;
  align-items: center;
}
.email-send-btn {
  padding: 4px 20px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: bold;
}
.email-send-btn:active {
  border-style: inset;
}
.email-status {
  font-size: 13px;
  color: #006600;
}

/* ---- My Computer ---- */
.app-mycomputer {
  padding: 12px;
}
.mycomputer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}
.mycomputer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  cursor: default;
  text-align: center;
}
.mycomputer-item .drive-icon {
  width: 40px;
  height: 40px;
}
.mycomputer-item span {
  font-size: 13px;
}

/* ---- Games Hub ---- */
.app-games-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}
.app-games-hub h2 {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--titlebar-active);
}
.games-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}
.game-launch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-family: var(--font-system);
  font-size: 14px;
  min-width: 0;
  transition: background 0.1s;
}
.game-launch-btn:hover {
  background: #d4d0c8;
}
.game-launch-btn:active {
  border-style: inset;
}
.game-launch-btn .game-thumb {
  width: 56px;
  height: 56px;
  background: #000;
  border: 2px inset var(--win-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f0;
  font-family: var(--font-pixel);
  font-size: 8px;
  transition: box-shadow 0.15s;
}
.game-launch-btn:hover .game-thumb {
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

/* ---- Snake Game ---- */
.game-snake-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: #000;
  height: 100%;
}
.game-snake-container canvas {
  border: 2px solid #333;
  image-rendering: pixelated;
}

/* ---- Minesweeper ---- */
.game-minesweeper-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--win-bg);
  height: 100%;
}
.mines-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 10px;
  border: 2px inset var(--win-bg);
  background: #c0c0c0;
}
.mines-counter, .mines-timer {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #ff0000;
  background: #000;
  padding: 2px 6px;
  min-width: 50px;
  text-align: center;
}
.mines-reset-btn {
  width: 30px;
  height: 30px;
  font-size: 18px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}
.mines-reset-btn:hover { transform: scale(1.1); }
.mines-reset-btn:active { border-style: inset; transform: scale(1); }
.mines-grid {
  display: grid;
  border: 3px inset var(--win-bg);
}
.mines-cell {
  width: 24px;
  height: 24px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: bold;
}
.mines-cell.revealed {
  border: 1px solid #808080;
  background: #d0d0d0;
  cursor: default;
}
.mines-cell.flagged::after { content: '🚩'; font-size: 12px; }
.mines-cell.mine { background: #ff0000; }
.mines-cell[data-num="1"] { color: #0000ff; }
.mines-cell[data-num="2"] { color: #008000; }
.mines-cell[data-num="3"] { color: #ff0000; }
.mines-cell[data-num="4"] { color: #000080; }
.mines-cell[data-num="5"] { color: #800000; }
.mines-cell[data-num="6"] { color: #008080; }
.mines-cell[data-num="7"] { color: #000; }
.mines-cell[data-num="8"] { color: #808080; }

/* ---- Recycle Bin ---- */
.app-trash {
  padding: 20px;
  text-align: center;
  color: #808080;
  font-size: 16px;
}

/* ---- Properties Dialog ---- */
.app-properties {
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
}
.app-properties table {
  width: 100%;
  border-collapse: collapse;
}
.app-properties td {
  padding: 3px 8px;
  border-bottom: 1px solid #e0e0e0;
}
.app-properties td:first-child {
  font-weight: bold;
  width: 40%;
  color: #404040;
}

/* Scrollbar styling */
.win-body::-webkit-scrollbar { width: 16px; }
.win-body::-webkit-scrollbar-track { background: #c0c0c0; border: 1px solid #808080; }
.win-body::-webkit-scrollbar-thumb { background: #c0c0c0; border: 2px outset #c0c0c0; }
.win-body::-webkit-scrollbar-button { background: #c0c0c0; border: 2px outset #c0c0c0; height: 16px; }

/* ---- Command Prompt (Terminal) ---- */
.terminal-body { padding: 0 !important; }
.app-terminal {
  background: #000;
  color: #ccc;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.term-scroll {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.term-output {
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.4;
}
.term-input-line {
  display: flex;
  align-items: center;
  line-height: 1.4;
}
.term-prompt {
  color: #ccc;
  white-space: nowrap;
}
.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ccc;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  caret-color: #ccc;
  padding: 0;
  line-height: 1.4;
}

/* ---- Notepad (Editable) ---- */
.app-notepad-edit {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.notepad-textarea {
  flex: 1;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.5;
  padding: 8px;
  background: #fff;
  color: #000;
  box-sizing: border-box;
}

/* ---- Paint ---- */
.app-paint {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--win-bg);
}
.paint-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 2px inset var(--win-bg);
  flex-wrap: wrap;
}
.paint-colors {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.paint-color {
  width: 18px;
  height: 18px;
  border: 2px inset var(--win-bg);
  cursor: pointer;
  transition: transform 0.1s;
}
.paint-color:hover {
  transform: scale(1.2);
  z-index: 1;
}
.paint-color.active {
  border: 2px solid #000;
  outline: 1px solid #fff;
}
.paint-tools {
  display: flex;
  gap: 2px;
}
.paint-tool {
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  min-width: 28px;
}
.paint-tool.active {
  border-style: inset;
  background: #ddd;
}
.paint-sizes {
  display: flex;
  gap: 2px;
}
.paint-size {
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font-system);
  padding: 2px 6px;
  min-width: 24px;
}
.paint-size.active {
  border-style: inset;
  background: #ddd;
}
.paint-clear-btn {
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-family: var(--font-system);
  font-size: 12px;
  padding: 2px 8px;
}
.paint-clear-btn:active { border-style: inset; }

#paint-canvas {
  flex: 1;
  display: block;
  cursor: crosshair;
  border: 2px inset var(--win-bg);
  margin: 0 4px 4px;
  background: #fff;
}

/* ---- Calculator ---- */
.app-calculator {
  padding: 10px;
  background: var(--win-bg);
}
.calc-memory-ind {
  font-family: var(--font-system);
  font-size: 12px;
  color: #666;
  height: 16px;
  padding: 0 4px;
}
.calc-display {
  width: 100%;
  text-align: right;
  font-family: 'Courier New', monospace;
  font-size: 22px;
  padding: 6px 8px;
  margin-bottom: 8px;
  border: 2px inset var(--win-bg);
  background: #cfe8cf;
  color: #000;
  box-sizing: border-box;
}
.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.calc-buttons.calc-5col {
  grid-template-columns: repeat(5, 1fr);
}
.calc-btn {
  padding: 10px 4px;
  font-family: var(--font-system);
  font-size: 16px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  text-align: center;
}
.calc-btn:active { border-style: inset; }
.calc-btn.calc-op { background: #d0d0e8; }
.calc-btn.calc-fn { background: #e0d0d0; }
.calc-btn.calc-mem { background: #e0dcc8; font-size: 13px; }
.calc-btn.calc-eq { background: #d0e0d0; font-weight: bold; }
.calc-btn.calc-eq-tall { grid-row: span 2; }
.calc-btn.calc-zero { grid-column: span 2; }

/* ---- Tetris ---- */
.game-tetris-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #000;
  padding: 10px;
  height: 100%;
}
.game-tetris-container canvas {
  border: 2px solid #333;
  display: block;
}

/* ---- Breakout ---- */
.game-breakout-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #000;
  padding: 10px;
  height: 100%;
}
.game-breakout-container canvas {
  border: 2px solid #333;
  display: block;
  cursor: none;
}

/* General game styles */
.game-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 4px;
}
.game-score {
  color: #0f0;
  font-family: var(--font-pixel);
  font-size: 12px;
  text-align: center;
}
.game-high-score {
  color: #ff0;
  font-family: var(--font-pixel);
  font-size: 10px;
  text-align: center;
}
.mines-hs {
  margin-top: 4px;
}
.game-bottom-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.game-controls-hint {
  color: #888;
  font-size: 11px;
  text-align: center;
  font-family: var(--font-system);
}
.game-restart-btn {
  padding: 4px 14px;
  font-family: var(--font-pixel);
  font-size: 10px;
  background: #222;
  border: 2px solid #444;
  color: #0f0;
  cursor: pointer;
  transition: all 0.15s;
}
.game-restart-btn:hover {
  background: #333;
  border-color: #0f0;
  box-shadow: 0 0 8px rgba(0,255,0,0.3);
}
.game-restart-btn.hidden {
  display: none;
}

/* ---- Paint action buttons ---- */
.paint-action-btn {
  padding: 2px 8px;
  font-size: 16px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-family: var(--font-system);
}
.paint-action-btn:active { border-style: inset; }
.paint-action-btn:hover { background: #d0d0e0; }

/* ---- Notepad find bar ---- */
.notepad-find-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: var(--win-bg);
  border-bottom: 1px solid #888;
}
.notepad-find-input {
  flex: 1;
  min-width: 0;
  padding: 2px 4px;
  font-family: var(--font-system);
  font-size: 14px;
  border: 2px inset var(--win-bg);
  background: #fff;
}
.notepad-find-btn {
  padding: 2px 8px;
  font-family: var(--font-system);
  font-size: 12px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
}
.notepad-find-btn:active { border-style: inset; }
.notepad-find-btn:hover { background: #d0d0e0; }

/* ---- Menu dropdowns ---- */
.win-menubar-item {
  position: relative;
}
.win-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  z-index: 1000;
}
.win-menu-dropdown.visible {
  display: block;
}
.win-menu-dropdown-item {
  padding: 4px 16px;
  font-family: var(--font-system);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.win-menu-dropdown-item:hover {
  background: var(--accent);
  color: #fff;
}

/* ---- 2048 ---- */
.game-2048-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #faf8ef;
  padding: 10px;
  height: 100%;
}
.g2048-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #bbada0;
  border-radius: 6px;
  padding: 6px;
  width: 260px;
  height: 260px;
}
.g2048-cell {
  background: #cdc1b4;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 14px;
  font-weight: bold;
  color: #776e65;
  transition: all 0.1s;
}
.g2048-cell[data-value="2"] { background: #eee4da; }
.g2048-cell[data-value="4"] { background: #ede0c8; }
.g2048-cell[data-value="8"] { background: #f2b179; color: #fff; }
.g2048-cell[data-value="16"] { background: #f59563; color: #fff; }
.g2048-cell[data-value="32"] { background: #f67c5f; color: #fff; }
.g2048-cell[data-value="64"] { background: #f65e3b; color: #fff; }
.g2048-cell[data-value="128"] { background: #edcf72; color: #fff; font-size: 12px; }
.g2048-cell[data-value="256"] { background: #edcc61; color: #fff; font-size: 12px; }
.g2048-cell[data-value="512"] { background: #edc850; color: #fff; font-size: 12px; }
.g2048-cell[data-value="1024"] { background: #edc53f; color: #fff; font-size: 10px; }
.g2048-cell[data-value="2048"] { background: #edc22e; color: #fff; font-size: 10px; }
.game-2048-container .game-score,
.game-2048-container .game-high-score {
  color: #776e65;
}

/* ---- Memory Match ---- */
.game-memory-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #1a0a30;
  padding: 10px;
  height: 100%;
}
.gmem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 260px;
}
.gmem-card {
  aspect-ratio: 1;
  background: #2a1a4a;
  border: 2px solid #4a3a6a;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-system);
  color: #8070a0;
}
.gmem-card:hover:not(.flipped):not(.matched) {
  background: #3a2a5a;
  border-color: #6a5a8a;
}
.gmem-card.flipped {
  background: #4a3a7a;
  border-color: #8a7aba;
  transform: scale(1.05);
}
.gmem-card.matched {
  background: #2a5a2a;
  border-color: #4a8a4a;
  opacity: 0.7;
}

/* ---- Internet Explorer ---- */
.app-iexplore {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}
.ie-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--win-bg);
  border-bottom: 1px solid var(--win-dark);
  align-items: center;
}
.ie-nav-btn {
  padding: 2px 8px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-system);
}
.ie-nav-btn:active { border-style: inset; }
.ie-address {
  flex: 1;
  padding: 2px 4px;
  border: 2px inset #999;
  font-family: var(--font-system);
  font-size: 13px;
  background: #fff;
}
.ie-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  font-size: 14px;
  transition: opacity 0.2s;
}
.ie-viewport a, .ie-link {
  color: #0000ff;
  text-decoration: underline;
  cursor: pointer;
}
.ie-viewport a:visited, .ie-link:visited {
  color: #800080;
}
.ie-statusbar {
  padding: 2px 6px;
  background: var(--win-bg);
  border-top: 1px solid var(--win-dark);
  font-size: 12px;
  color: #444;
}

/* ---- Media Player ---- */
.app-mediaplayer {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1a1a2e;
  color: #0f0;
}
.mp-display {
  padding: 12px;
  background: #0a0a1a;
  border-bottom: 2px solid #333;
  text-align: center;
}
.mp-title {
  font-size: 16px;
  font-weight: bold;
  color: #0f0;
  margin-bottom: 4px;
}
.mp-time {
  font-size: 13px;
  color: #0a0;
  margin-bottom: 6px;
}
.mp-progress {
  width: 100%;
  height: 8px;
  cursor: pointer;
  accent-color: #0f0;
}
.mp-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #2a2a3e;
}
.mp-btn {
  width: 36px;
  height: 28px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-system);
}
.mp-btn:active { border-style: inset; }
.mp-btn-play { width: 48px; font-weight: bold; }
.mp-playlist {
  flex: 1;
  overflow-y: auto;
  background: #0a0a1a;
}
.mp-track {
  padding: 4px 10px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #1a1a2e;
  color: #0a0;
}
.mp-track:hover { background: #1a1a3e; }
.mp-track.active {
  background: #000080;
  color: #fff;
}

/* ---- Help ---- */
.app-help {
  display: flex;
  height: 100%;
}
.help-sidebar {
  width: 160px;
  background: #fff;
  border-right: 2px inset var(--win-bg);
  overflow-y: auto;
  flex-shrink: 0;
}
.help-topic {
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}
.help-topic:hover { background: #e8e8e8; }
.help-topic.active {
  background: var(--highlight);
  color: var(--highlight-text);
}
.help-content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #fff;
}
.help-content h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--titlebar-active);
}
.help-text {
  font-family: var(--font-system);
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
  margin: 0;
}

/* ---- Touch D-Pad (Mobile Game Controls) ---- */
.touch-dpad {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
@media (pointer: coarse) {
  .touch-dpad { display: flex; }
}
.dpad-mid {
  display: flex;
  gap: 2px;
  align-items: center;
}
.dpad-btn {
  width: 44px;
  height: 44px;
  font-size: 18px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-family: var(--font-system);
  touch-action: manipulation;
}
.dpad-btn:active {
  border-style: inset;
  background: var(--highlight);
  color: var(--highlight-text);
}
.dpad-center {
  width: 44px;
  height: 44px;
  border: 2px solid var(--win-bg);
  background: transparent;
}
.dpad-action {
  margin-top: 4px;
  width: 92px;
  font-size: 12px;
  font-weight: bold;
}

/* ---- Control Panel ---- */
.app-controlpanel {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: var(--font-system);
  font-size: 14px;
}
.cp-tabs {
  display: flex;
  background: var(--win-bg);
  border-bottom: 2px inset var(--win-bg);
  padding: 2px 4px 0;
  gap: 2px;
}
.cp-tab {
  padding: 4px 14px;
  border: 2px outset var(--win-bg);
  border-bottom: none;
  background: var(--win-bg);
  cursor: pointer;
  font-family: var(--font-system);
  font-size: 13px;
  margin-bottom: -2px;
}
.cp-tab.active {
  background: #fff;
  border-bottom: 2px solid #fff;
  font-weight: bold;
}
.cp-panel {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #fff;
}
.cp-group {
  border: 2px groove var(--win-bg);
  padding: 10px;
  margin-bottom: 10px;
}
.cp-group legend {
  padding: 0 6px;
  font-weight: bold;
  font-size: 13px;
}
.cp-group select {
  width: 100%;
  padding: 3px;
  font-family: var(--font-system);
  font-size: 14px;
  border: 2px inset #999;
}
.cp-apply {
  padding: 4px 16px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
  font-family: var(--font-system);
  font-size: 13px;
}
.cp-apply:active {
  border-style: inset;
}
.cp-info {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cp-info td {
  padding: 3px 6px;
  border-bottom: 1px solid #ddd;
}
.cp-info td:first-child {
  font-weight: bold;
  width: 90px;
  color: var(--titlebar-active);
}

/* ---- Media Player Enhancements ---- */
.mp-viz {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 24px;
  margin: 6px 0;
}
.mp-viz-bar {
  width: 6px;
  height: 2px;
  background: #0f0;
  transition: height 0.1s ease;
  border-radius: 1px 1px 0 0;
}
.mp-vol-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #2a2a3e;
  font-size: 12px;
}
.mp-volume {
  flex: 1;
  height: 6px;
  accent-color: #0f0;
  cursor: pointer;
}
.mp-btn-sm {
  width: 28px;
  height: 24px;
  font-size: 11px;
  opacity: 0.6;
}
.mp-btn-active {
  opacity: 1;
  background: #d0d0e8;
  border-style: inset;
}

/* ---- Calculator Scientific Buttons ---- */
.calc-btn.calc-sci {
  background: #d8d0e8;
  font-size: 12px;
  padding: 8px 2px;
}
.calc-btn.calc-sci:hover {
  background: #c8c0d8;
}

/* ---- IE Progress Bar ---- */
.ie-progress {
  height: 3px;
  background: #000080;
  width: 0%;
  transition: width 0.1s linear;
  display: none;
}

/* ---- Help Search ---- */
.help-search {
  width: 100%;
  padding: 4px 6px;
  font-family: var(--font-system);
  font-size: 13px;
  border: 2px inset var(--win-bg);
  margin-bottom: 4px;
  box-sizing: border-box;
}

/* ---- Contact Character Counter ---- */
.email-counter {
  font-size: 11px;
  color: #666;
  margin-left: auto;
}

/* ---- Recycle Bin Enhancements ---- */
.trash-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #ccc;
  background: var(--win-bg);
}
.trash-action-btn {
  padding: 3px 10px;
  font-family: var(--font-system);
  font-size: 12px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
}
.trash-action-btn:active { border-style: inset; }
.trash-count {
  font-size: 12px;
  color: #666;
  margin-left: auto;
}
.trash-list {
  padding: 8px;
}
.trash-item {
  padding: 4px 8px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}
.trash-empty-msg {
  padding: 40px 20px;
  text-align: center;
  color: #808080;
  font-size: 16px;
}

/* ---- Games Hub High Scores ---- */
.game-card-hs {
  font-size: 10px;
  color: #888;
  font-family: var(--font-pixel);
}

/* ---- Minesweeper Difficulty ---- */
.mines-diff {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.mines-diff-btn {
  padding: 3px 10px;
  font-family: var(--font-system);
  font-size: 12px;
  background: var(--win-bg);
  border: 2px outset var(--win-bg);
  cursor: pointer;
}
.mines-diff-btn.active {
  border-style: inset;
  background: #ddd;
  font-weight: bold;
}
.mines-diff-btn:active { border-style: inset; }

/* ---- Tetris Side Panel ---- */
.tetris-main {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.tetris-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tetris-next-label {
  color: #888;
  font-family: var(--font-pixel);
  font-size: 8px;
  text-align: center;
}
.tetris-side canvas {
  border: 2px solid #333;
  background: #111;
}

/* ======== Error Dialog Overlay ======== */
.error-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: error-shake 0.3s ease-out;
}
@keyframes error-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}
