/* Windows 95/98 Desktop Styles */

/* Desktop Container */
.desktop {
  position: relative;
  height: 100vh;
  /* background: url('') center center/cover no-repeat;   Liking Windows teal color over an image */
  background-color: var(--color-accent-4); /* Windows teal color */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Prevent page scrolling when apps are open */
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.desktop.no-scroll {
  overflow: hidden;
}

.desktop.no-scroll .desktop-icons {
  overflow-y: hidden;
}

/* Desktop Icons Area */
.desktop-icons {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3rem;
  overflow-y: auto;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 8rem;
  cursor: pointer;
  padding: 0.5rem;
  border: 2px solid transparent;
  transition: background-color 0.1s;
}

.desktop-icon:hover {
  background-color: rgba(0, 0, 128, 0.2);
  border: 2px dotted #000080;
}

.desktop-icon:active {
  background-color: rgba(0, 0, 128, 0.4);
}

.icon-image {
  width: 9rem;
  height: 9rem;
  margin-bottom: 0.5rem;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.icon-label {
  font-family: var(--font-typewriter);
  font-size: var(--font-size-small);
  font-weight: 400;
  color: var(--color-white);
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  word-wrap: normal;
  max-width: 100%;
}

/* Taskbar */
.taskbar {
  position: relative;
  height: 4rem;
  background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
  border-top: 2px solid #ffffff;
  box-shadow: inset 0 1px 0 #dfdfdf, 0 -2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
  z-index: 1000;
  font-family: var(--font-typewriter);
  font-weight: 400;
}

/* Start Button */
.start-button {
  height: 3.2rem;
  padding: 0 0.8rem;
  background: linear-gradient(to bottom, #d4d4d4 0%, #909090 100%);
  border: 3px outset #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080, 0 0 0 1px rgba(0, 0, 0, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 120, 215, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-black-1);
  transition: all 0.1s;
  position: relative;
  animation: startButtonIntro 0.5s ease-out, startButtonGlow 3s ease-in-out 0.5s infinite;
}

@keyframes startButtonIntro {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes startButtonGlow {
  0%,
  100% {
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080, 0 0 0 1px rgba(0, 0, 0, 0.2),
      0 2px 6px rgba(0, 0, 0, 0.3), 0 0 12px rgba(0, 120, 215, 0.3);
  }
  50% {
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080, 0 0 0 1px rgba(0, 0, 0, 0.2),
      0 2px 6px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 120, 215, 0.6);
  }
}

.start-button:hover {
  background: linear-gradient(to bottom, #e0e0e0 0%, #a0a0a0 100%);
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080, 0 0 0 1px rgba(0, 0, 0, 0.3),
    0 3px 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 120, 215, 0.5);
  animation: startButtonIntro 0.5s ease-out, startButtonGlow 2s ease-in-out infinite;
}

.start-button:active,
.start-button.active {
  border: 3px inset #808080;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #000000, 0 1px 3px rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
  animation: none;
}

.start-icon {
  width: 2rem;
  height: 2rem;
  display: inline-block;
}

.start-text {
  font-size: var(--font-size-medium);
  font-weight: 700;
  color: var(--color-black-100);
}

/* Taskbar Items */
.taskbar-items {
  flex: 1;
  display: flex;
  gap: 0.4rem;
  margin-left: 0.8rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.taskbar-item {
  min-width: 16rem;
  max-width: 20rem;
  height: 3.2rem;
  padding: 0 0.8rem;
  background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
  border: 2px outset #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--font-size-small);
  color: var(--color-black-100);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-item:hover {
  background: linear-gradient(to bottom, #d0d0d0 0%, #909090 100%);
}

.taskbar-item.active {
  border: 2px inset #808080;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #000000;
}

/* System Tray */
.system-tray {
  height: 3.2rem;
  padding: 0 0.8rem;
  border: 2px inset #808080;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-left: 0.4rem;
  background-color: #c0c0c0;
}

.system-time {
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-small);
  color: var(--color-black-100);
}

/* Start Menu */
.start-menu {
  position: absolute;
  bottom: 4rem;
  left: 0.4rem;
  width: 28rem;
  background-color: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: flex;
  font-family: var(--font-typewriter);
  font-weight: 400;
}

.start-menu.hidden {
  display: none;
}

/* Start Menu Sidebar */
.start-menu-sidebar {
  width: 3rem;
  background: linear-gradient(to right, #000080 0%, #1084d0 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
}

.start-menu-branding {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--color-white);
  font-size: var(--font-size-large);
  font-weight: 700;
  letter-spacing: 0.2rem;
}

/* Start Menu Content */
.start-menu-content {
  flex: 1;
  padding: 0.4rem 0;
}

.start-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  position: relative;
  padding: 0.8rem 3rem 0.8rem 4rem;
  font-size: var(--font-size-large);
  color: var(--color-black-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.1s;
}

.menu-item:hover {
  background-color: #000080;
  color: var(--color-white);
}

.menu-item:hover .menu-arrow {
  color: var(--color-white);
}

.menu-text {
  flex: 1;
}

.menu-arrow {
  font-size: var(--font-size-tiny);
  color: var(--color-black-1);
}

/* Menu Divider */
.menu-divider {
  height: 0;
  margin: 0.4rem 0.4rem;
  border: none;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
}

/* Submenu */
.submenu {
  position: absolute;
  left: 100%;
  top: -0.4rem;
  min-width: 20rem;
  background-color: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  display: none;
  z-index: 1000;
}

/* Adjust submenu position for bottom menu items to prevent off-screen display */
.menu-item.has-submenu:last-child .submenu,
.menu-item.has-submenu:nth-last-child(2) .submenu {
  top: auto;
  bottom: -0.4rem;
}

.menu-item.has-submenu:hover .submenu {
  display: block;
}

.submenu-item {
  padding: 0.8rem 3rem 0.8rem 2rem;
  font-size: var(--font-size-large);
  color: var(--color-black-100);
  cursor: pointer;
  transition: background-color 0.1s;
}

.submenu-item:hover {
  background-color: #000080;
  color: var(--color-white);
}

/* App Windows - Draggable desktop application windows */
.app-window {
  max-width: 95vw !important;
  max-height: 90vh !important;
  /* Removed !important from top/left to allow draggable.js to control positioning */
  background-color: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  font-family: var(--font-typewriter);
  font-weight: 400;
}

.app-window .window-title-bar {
  background: linear-gradient(to right, #000080 0%, #1084d0 100%);
  color: var(--color-white);
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.app-window .window-title-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--font-size-small);
  font-weight: 700;
}

.app-window .window-icon {
  width: 1.6rem;
  height: 1.6rem;
  background-color: var(--color-white);
  border: 1px solid #000000;
  display: inline-block;
}

.app-window .window-controls {
  display: flex;
  gap: 0.4rem;
}

.app-window .window-control-btn {
  width: 2rem;
  height: 2rem;
  background-color: #c0c0c0;
  border: 2px outset #ffffff;
  color: var(--color-black-1);
  font-size: var(--font-size-medium);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.1s;
}

.app-window .window-control-btn:hover:not(:disabled) {
  background-color: #d0d0d0;
}

.app-window .window-control-btn:active:not(:disabled) {
  border: 2px inset #808080;
  transform: translateY(1px);
}

.app-window .window-control-btn:disabled {
  color: #808080;
  cursor: not-allowed;
}

.app-window .window-control-btn.close-btn {
  font-size: 2rem;
  line-height: 1;
}

.app-window .window-content {
  padding: 1rem;
  background-color: #c0c0c0;
  overflow-y: auto;
  flex: 1;
}

/* WebDev Explorer Styles */
.webdev-explorer {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.5rem;
}

.webdev-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem;
  background-color: #dfdfdf;
  border: 2px inset #808080;
}

.webdev-toolbar-btn {
  min-width: 12rem;
  padding: 0.4rem 1rem;
  background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
  border: 2px outset #ffffff;
  font-size: var(--font-size-small);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.1s;
}

.webdev-toolbar-btn:hover {
  background: linear-gradient(to bottom, #d0d0d0 0%, #909090 100%);
}

.webdev-toolbar-btn:active {
  border: 2px inset #808080;
  transform: translateY(1px);
}

.toolbar-icon {
  width: 1.6rem;
  height: 1.6rem;
  image-rendering: pixelated;
}

.lesson-selector {
  padding: 0.4rem 0.8rem;
  border: 2px inset #808080;
  background-color: var(--color-white);
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-small);
}

.webdev-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

.webdev-editor-panel,
.webdev-preview-panel {
  display: flex;
  flex-direction: column;
  border: 2px inset #808080;
  background-color: var(--color-white);
}

.panel-header {
  padding: 0.4rem 0.8rem;
  background: linear-gradient(to right, #000080 0%, #1084d0 100%);
  color: var(--color-white);
  font-size: var(--font-size-small);
  font-weight: 700;
}

.code-editor {
  flex: 1;
  padding: 0.8rem;
  border: none;
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-tiny);
  line-height: 1.5;
  resize: none;
  background-color: var(--color-white);
  color: var(--color-black-100);
}

.code-editor:focus {
  outline: none;
}

.preview-frame {
  flex: 1;
  border: none;
  background-color: var(--color-white);
  width: 100%;
  height: 100%;
}

.webdev-instructions {
  border: 2px inset #808080;
  background-color: var(--color-white);
  max-height: 18rem;
  overflow-y: auto;
}

.instructions-content {
  padding: 1rem;
}

.instructions-content h4 {
  font-size: var(--font-size-large);
  color: #000080;
  margin-bottom: 0.5rem;
}

.instructions-content p {
  font-size: var(--font-size-small);
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.instructions-content ul {
  margin-left: 2rem;
  margin-bottom: 0.8rem;
}

.instructions-content li {
  font-size: var(--font-size-small);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

/* File Cabinet Styles */
.file-cabinet-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #c0c0c0;
  overflow: hidden;
}

.file-cabinet-drawers {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1rem;
  overflow-y: scroll;
}

.drawer {
  position: relative;
  min-height: 10rem;
  transition: min-height 0.3s ease;
}

.drawer.open {
  min-height: 35rem;
  margin-bottom: 2rem;
}

.drawer-front {
  position: relative;
  height: 10rem;
  background: linear-gradient(to bottom, #ffdd00 0%, #cc9900 100%);
  border: 3px solid #000000;
  border-radius: 0.3rem;
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.3), inset -2px -2px 4px rgba(0, 0, 0, 0.3),
    4px 4px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-front:hover {
  background: linear-gradient(to bottom, #ffee00 0%, #dd9900 100%);
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.4), inset -2px -2px 4px rgba(0, 0, 0, 0.3),
    6px 6px 12px rgba(0, 0, 0, 0.5);
}

.drawer-front:active {
  transform: translateY(2px);
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.3), inset -2px -2px 4px rgba(0, 0, 0, 0.3),
    2px 2px 4px rgba(0, 0, 0, 0.3);
}

.drawer-handle {
  width: 8rem;
  height: 2rem;
  background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
  border: 2px solid #000000;
  border-radius: 0.4rem;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.5), inset -1px -1px 2px rgba(0, 0, 0, 0.5);
}

.drawer-check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
  animation: stampAppear 0.5s ease;
}

.drawer-check svg {
  transform: rotate(-15deg);
}

@keyframes stampAppear {
  0% {
    opacity: 0;
    transform: scale(0) rotate(180deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(-20deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.drawer-content {
  margin-top: 1rem;
  margin-bottom: 1rem;
  animation: slideOut 0.3s ease;
}

@keyframes slideOut {
  from {
    opacity: 0;
    transform: translateY(-2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.document-paper {
  background-color: var(--color-white);
  border: 2px solid #000000;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  min-height: 20rem;
  max-height: 30rem;
  overflow-y: auto;
  font-family: var(--font-typewriter);
  font-weight: 400;
}

.quote-paper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20rem;
  max-height: none;
  padding: 3rem 2rem;
}

.quote-content {
  text-align: center;
  max-width: 50rem;
}

.quote-text {
  font-size: var(--font-size-xl);
  font-style: italic;
  color: var(--color-accent-4);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.quote-author {
  font-size: var(--font-size-large);
  color: #000000;
  font-weight: 700;
}

.document-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: #000000;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000000;
}

.document-body {
  font-size: var(--font-size-medium);
  line-height: 1.6;
  color: #000000;
}

.document-body h2 {
  font-size: var(--font-size-xl);
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #000080;
}

.document-body h3 {
  font-size: var(--font-size-large);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: #000080;
}

.document-body h4 {
  font-size: var(--font-size-medium);
  margin-top: 1rem;
  margin-bottom: 0.6rem;
  color: #000000;
  font-weight: 700;
}

.document-body p {
  margin-bottom: 1rem;
}

.document-body ul {
  margin-left: 2.5rem;
  margin-bottom: 1rem;
}

.document-body li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.document-body hr {
  border: none;
  border-top: 2px solid #000000;
  margin: 2rem 0;
}

.document-body strong {
  font-weight: 700;
  color: #000080;
}

.document-body em {
  font-style: italic;
}

/* Command Line Terminal Styles */
.terminal-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-black-100);
  overflow: hidden;
}

.terminal-display {
  flex: 1;
  padding: 1rem;
  background-color: var(--color-black-100);
  overflow-y: auto;
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-medium);
  color: var(--color-accent-7);
}

.terminal-header {
  color: var(--color-accent-7);
  font-size: var(--font-size-medium);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.terminal-line {
  color: var(--color-accent-7);
  font-size: var(--font-size-medium);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 0.5rem;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  position: relative;
}

.terminal-prompt {
  color: var(--color-accent-7);
  font-size: var(--font-size-medium);
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-accent-7);
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-medium);
  caret-color: transparent;
  padding: 0;
}

.terminal-input:focus {
  outline: none;
}

.terminal-cursor {
  display: inline-block;
  width: 0.8rem;
  height: 1.8rem;
  background-color: var(--color-accent-7);
  animation: blink 1s step-end infinite;
  user-select: none;
  position: absolute;
  pointer-events: none;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* Terminal Error Messages */
.terminal-error {
  color: var(--color-accent-5);
}

/* Terminal Command Text */
.terminal-command {
  color: var(--color-accent-7);
}

/* Memory Game Styles */
.memory-game-window .window-content {
  padding: 0;
  overflow: hidden;
}

.memory-game-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #c0c0c0;
  padding: 0.8rem;
  gap: 0.8rem;
  overflow: hidden;
}

.memory-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background-color: #dfdfdf;
  border: 2px inset #808080;
}

.memory-game-stats {
  display: flex;
  gap: 2rem;
}

.stat-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.stat-label {
  font-size: var(--font-size-medium);
  font-weight: 700;
  color: var(--color-black-1);
}

.stat-value {
  font-size: var(--font-size-medium);
  font-weight: 700;
  color: #000080;
}

.win95-button {
  padding: 0.4rem 1.2rem;
  background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
  border: 2px outset #ffffff;
  font-size: var(--font-size-small);
  font-weight: 700;
  color: var(--color-black-1);
  cursor: pointer;
  transition: all 0.1s;
}

.win95-button:hover {
  background: linear-gradient(to bottom, #d0d0d0 0%, #909090 100%);
}

.win95-button:active {
  border: 2px inset #808080;
  transform: translateY(1px);
}

.grid-size-selector {
  padding: 0.3rem 0.5rem;
  border: 2px inset #808080;
  background-color: var(--color-white);
  font-size: var(--font-size-small);
  font-family: var(--font-typewriter);
  font-weight: 400;
  color: var(--color-black-1);
  cursor: pointer;
}

.memory-game-board {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 0.5rem;
  padding: 0.8rem;
  background-color: #008080;
  border: 2px inset #808080;
  overflow: hidden;
  min-height: 0;
  max-height: 100%;
}

.memory-card {
  aspect-ratio: 1;
  cursor: pointer;
  perspective: 1000px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.memory-card.flipped .card-inner,
.memory-card.matched .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px outset #ffffff;
  border-radius: 0.3rem;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-front {
  background: linear-gradient(135deg, #1084d0 0%, #000080 100%);
}

.card-back {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  transform: rotateY(180deg);
  font-size: 3rem;
}

.memory-card.matched .card-back {
  background: linear-gradient(135deg, #90ee90 0%, #32cd32 100%);
}

.memory-game-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  border: 3px solid #000080;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
  padding: 2rem 3rem;
  text-align: center;
  z-index: 10;
  min-width: 30rem;
}

.memory-game-message h3 {
  font-size: var(--font-size-3xl);
  color: #000080;
  margin-bottom: 1rem;
}

.memory-game-message p {
  font-size: var(--font-size-medium);
  margin-bottom: 0.5rem;
  color: var(--color-black-100);
}

.memory-game-message strong {
  color: #000080;
  font-weight: 700;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ======================================== */

/* Small Tablet / Large Mobile (584px and below) */
@media (max-width: 584px) {
  /* WebDev Explorer - Wrap toolbar to prevent overflow */
  .webdev-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .webdev-toolbar-btn {
    min-width: 10rem;
    font-size: var(--font-size-tiny);
  }

  .lesson-selector {
    width: 100%;
    font-size: var(--font-size-tiny);
  }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  /* Desktop Icons */
  .desktop-icons {
    padding: 1.5rem;
    gap: 2rem;
  }

  /* Taskbar - Simplified for tablet */
  .taskbar {
    height: 5rem;
    padding: 0 0.8rem;
  }

  .start-button {
    height: 4rem;
    padding: 0 1.2rem;
  }

  .start-icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .start-text {
    font-size: var(--font-size-large);
  }

  .taskbar-items {
    gap: 0.6rem;
  }

  .taskbar-item {
    min-width: 12rem;
    font-size: var(--font-size-tiny);
  }

  .system-tray {
    padding: 0 1rem;
  }

  .system-time {
    font-size: var(--font-size-tiny);
  }

  /* Start Menu */
  .start-menu {
    width: 32rem;
    bottom: 5rem;
  }

  .menu-item,
  .submenu-item {
    padding: 1rem 3rem 1rem 4rem;
    font-size: var(--font-size-large);
  }

  /* App Windows - Full width on tablet */
  .app-window {
    max-width: 95vw !important;
    max-height: 90vh !important;
    /* Removed !important from top/left to allow draggable.js to control positioning */
  }

  .app-window .window-content {
    padding: 1.2rem;
  }

  /* WebDev Explorer - Stack editor and preview */
  .webdev-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .webdev-preview-panel {
    min-height: 15rem;
  }

  /* File Cabinet - Adjust drawer spacing */
  .file-cabinet-drawers {
    padding: 1.5rem;
    gap: 1.2rem;
  }

  .drawer-front {
    height: 8rem;
  }

  /* Terminal - Adjust font size */
  .terminal-display,
  .terminal-line,
  .terminal-prompt,
  .terminal-input {
    font-size: var(--font-size-small);
  }

  /* Memory Game - Smaller grid */
  .memory-game-board {
    gap: 0.6rem;
    padding: 1rem;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  /* Desktop Icons - Smaller and tighter */
  .desktop-icons {
    padding: 1rem;
    gap: 1.5rem;
  }

  /* Taskbar - Compact mobile version */
  .taskbar {
    height: 5.5rem;
    padding: 0 0.5rem;
  }

  .start-button {
    height: 4.5rem;
    padding: 0 0.8rem;
    gap: 0.4rem;
  }

  .start-icon {
    width: 2rem;
    height: 2rem;
  }

  .start-text {
    font-size: var(--font-size-medium);
  }

  .system-tray {
    padding: 0 0.6rem;
    gap: 0.6rem;
  }

  .system-time {
    font-size: 1.2rem;
  }

  /* Start Menu - Full width mobile */
  .start-menu {
    width: 100vw;
    left: 0;
    bottom: 5.5rem;
    max-height: 70vh;
    overflow-y: auto;
  }

  .start-menu-sidebar {
    width: 2.5rem;
  }

  .start-menu-branding {
    font-size: var(--font-size-large);
  }

  .menu-item,
  .submenu-item {
    padding: 1.2rem 2rem 1.2rem 3rem;
    font-size: var(--font-size-large);
  }

  .submenu {
    position: static;
    width: 100%;
    border: none;
    box-shadow: none;
    background-color: #a0a0a0;
    padding-left: 2rem;
    padding-top: 0;
    padding-bottom: 0;
    padding-right: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    min-width: auto;
    margin: 0;
    display: block; /* Always use block, control with max-height */
  }

  .menu-item.has-submenu:hover .submenu {
    max-height: 500px; /* Large enough for submenu content */
  }

  /* Override desktop positioning rules for mobile */
  .menu-item.has-submenu:last-child .submenu,
  .menu-item.has-submenu:nth-last-child(2) .submenu {
    position: static;
    top: auto;
    bottom: auto;
  }

  /* App Windows - Full screen on mobile */
  .app-window {
    width: 100vw !important;
    height: calc(100vh - 5.5rem) !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 5.5rem) !important;
    top: 0 !important;
    left: 0 !important;
    border-radius: 0;
    border: none;
  }

  .app-window .window-title-bar {
    padding: 0.6rem 0.8rem;
  }

  .app-window .window-title-text {
    font-size: var(--font-size-tiny);
  }

  .app-window .window-control-btn {
    width: 3rem;
    height: 3rem;
    font-size: var(--font-size-xl);
  }

  .app-window .window-content {
    padding: 1rem;
  }

  /* WebDev Explorer - Mobile optimized */
  .webdev-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .webdev-toolbar-btn {
    min-width: 10rem;
    font-size: var(--font-size-tiny);
  }

  .lesson-selector {
    width: 100%; /* Ensures it takes the full width on its own line */
    font-size: var(--font-size-tiny);
  }

  .webdev-content {
    gap: 0.8rem;
  }

  .code-editor {
    font-size: var(--font-size-tiny);
    padding: 0.6rem;
  }

  .panel-header {
    font-size: var(--font-size-tiny);
    padding: 0.6rem 0.8rem;
  }

  .webdev-instructions {
    max-height: 15rem;
  }

  .instructions-content {
    padding: 0.8rem;
  }

  .instructions-content h4 {
    font-size: var(--font-size-medium);
  }

  .instructions-content p,
  .instructions-content li {
    font-size: var(--font-size-tiny);
  }

  /* File Cabinet - Mobile optimized */
  .file-cabinet-drawers {
    padding: 1rem;
    gap: 1rem;
  }

  .drawer-front {
    height: 7rem;
  }

  .drawer-handle {
    width: 6rem;
    height: 1.5rem;
  }

  .document-paper {
    padding: 1.5rem;
    font-size: var(--font-size-small);
  }

  .document-title {
    font-size: var(--font-size-large);
  }

  .document-body {
    font-size: var(--font-size-small);
  }

  .quote-paper {
    padding: 2rem 1.5rem;
  }

  .quote-text {
    font-size: var(--font-size-medium);
  }

  .quote-author {
    font-size: var(--font-size-small);
  }

  /* Terminal - Mobile optimized */
  .terminal-display {
    padding: 0.8rem;
    font-size: var(--font-size-tiny);
  }

  .terminal-line,
  .terminal-prompt,
  .terminal-input {
    font-size: var(--font-size-tiny);
  }

  .terminal-header {
    font-size: var(--font-size-tiny);
  }

  /* Memory Game - Smaller grid for mobile */
  .memory-game-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .memory-game-stats {
    gap: 1.5rem;
  }

  .stat-label,
  .stat-value {
    font-size: var(--font-size-small);
  }

  .win95-button {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-tiny);
  }

  .grid-size-selector {
    font-size: var(--font-size-tiny);
  }

  .memory-game-board {
    gap: 0.4rem;
    padding: 0.8rem;
  }

  .card-back {
    font-size: 2rem;
  }

  .memory-game-message {
    padding: 1.5rem 2rem;
    min-width: 90%;
  }

  .memory-game-message h3 {
    font-size: var(--font-size-xl);
  }

  .memory-game-message p {
    font-size: var(--font-size-small);
  }
}
