/* ============================================
   MSUGFI #15 — Windows 95 Desktop Theme
   ============================================ */

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  user-select: none;
}

a {
  color: #0000aa;
}
a:visited {
  color: #551a8b;
}

.hidden {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: #fff;
  padding: 8px;
}
.skip-link:focus {
  left: 8px;
}

/* ----- Boot Screen ----- */
#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.6s ease;
}
#boot-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.boot-content {
  text-align: center;
  color: #c0c0c0;
}

.boot-logo {
  font-size: 48px;
  margin-bottom: 12px;
  letter-spacing: 8px;
}
.boot-logo .boot-flag { color: #ff0000; }
.boot-logo .boot-flag.blue { color: #0000ff; }
.boot-logo .boot-flag.green { color: #00aa00; }
.boot-logo .boot-flag.yellow { color: #ffaa00; }

.boot-title {
  font-size: 36px;
  font-weight: bold;
  color: #ffffff;
  margin: 0 0 8px;
  letter-spacing: 4px;
}

.boot-sub {
  font-size: 14px;
  margin: 0 0 20px;
  color: #aaa;
}

#boot-progress {
  width: 300px;
}

.boot-skip {
  font-size: 11px;
  color: #666;
  margin-top: 16px;
}

/* ----- BSOD ----- */
#bsod {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #0000aa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-family: "Courier New", monospace;
  font-size: 16px;
  line-height: 1.6;
  padding: 40px;
}

.bsod-content {
  max-width: 700px;
}

.bsod-header {
  background: #aaaaaa;
  color: #0000aa;
  display: inline-block;
  padding: 0 8px;
  font-weight: bold;
}

.blink {
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ----- Desktop ----- */
#desktop {
  position: fixed;
  inset: 0;
  bottom: 34px;
  background: #008080;
  overflow: hidden;
}

/* ----- Desktop Icons ----- */
.desktop-icons {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  padding: 6px 4px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
  text-align: center;
}
.desktop-icon:hover {
  background: rgba(255,255,255,0.15);
}
.desktop-icon:active,
.desktop-icon.selected {
  background: #000080;
  color: #fff;
}
.desktop-icon .icon-img {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 2px;
  pointer-events: none;
}
.desktop-icon span {
  font-size: 11px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  word-break: break-word;
  pointer-events: none;
}

/* ----- Draggable Windows ----- */
.draggable-window {
  position: absolute;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  max-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}
.draggable-window .title-bar {
  cursor: grab;
}
.draggable-window .title-bar:active {
  cursor: grabbing;
}
.draggable-window .window-body {
  overflow-y: auto;
  flex: 1;
}

/* Active / Inactive window styling */
.draggable-window .title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
}
.draggable-window.inactive .title-bar {
  background: linear-gradient(90deg, #808080, #b5b5b5);
}

/* ----- Hero Window ----- */
.hero-body {
  text-align: center;
  padding: 20px 24px !important;
}

.hero-flags {
  font-size: 28px;
  letter-spacing: 6px;
  margin-bottom: 4px;
}
.flag.red { color: #ff0000; }
.flag.blue { color: #0000ff; }
.flag.green { color: #00aa00; }
.flag.yellow { color: #ffaa00; }

.hero-title {
  font-size: 32px;
  margin: 4px 0;
  color: #000080;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 13px;
  color: #444;
  margin: 0 0 8px;
}

.hero-body hr {
  border: none;
  border-top: 1px solid #888;
  border-bottom: 1px solid #fff;
  margin: 10px 0;
}

.hero-details {
  text-align: left;
  display: inline-block;
  font-size: 13px;
  line-height: 1.8;
}

.hero-tagline {
  font-size: 14px;
  font-weight: bold;
  color: #000080;
  margin: 12px 0;
}

.hero-join {
  font-size: 14px;
  padding: 6px 24px;
  font-weight: bold;
  cursor: pointer;
}

/* ----- Notepad / About Window ----- */
.notepad-menu {
  background: #c0c0c0;
  padding: 2px 4px;
  border-bottom: 1px solid #888;
  font-size: 12px;
  display: flex;
  gap: 2px;
}
.notepad-menu-item {
  padding: 2px 8px;
  cursor: default;
}
.notepad-menu-item:hover {
  background: #000080;
  color: #fff;
}

.notepad-body {
  background: #fff !important;
  padding: 8px 12px !important;
  font-size: 13px;
  line-height: 1.6;
}
.notepad-text h2 {
  font-size: 15px;
  margin: 0 0 8px;
  color: #000080;
}
.notepad-text h3 {
  font-size: 13px;
  margin: 12px 0 4px;
  color: #333;
}
.notepad-text p {
  margin: 4px 0;
}

/* ----- Schedule Window ----- */
.schedule-body {
  padding: 12px 16px !important;
}
.schedule-body h2 {
  font-size: 15px;
  margin: 0 0 4px;
  color: #000080;
}
.schedule-date {
  font-size: 12px;
  color: #555;
  margin: 0 0 12px;
}

.session-card {
  margin-bottom: 10px;
  padding: 10px;
}
.session-card legend {
  font-weight: bold;
  font-size: 12px;
  color: #000080;
}

.session-content {
  display: flex;
  gap: 14px;
  align-items: center;
}

.session-avatar {
  font-size: 40px;
  line-height: 1;
  min-width: 48px;
  text-align: center;
}

.session-info {
  font-size: 13px;
  line-height: 1.6;
}
.session-time {
  font-size: 11px;
  color: #666;
  margin: 0;
}
.session-title {
  margin: 2px 0;
  color: #000;
  font-size: 14px;
}
.session-speaker {
  margin: 0;
  color: #333;
}

/* ----- Resources Window ----- */
.resources-body {
  padding: 10px 14px !important;
}
.resources-body h2 {
  font-size: 15px;
  margin: 0 0 8px;
  color: #000080;
}

.tree-view a {
  text-decoration: none;
  font-size: 12px;
}
.tree-view a:hover {
  text-decoration: underline;
}

/* ----- Shutdown Dialog ----- */
#shutdown-dialog {
  box-shadow: 4px 4px 12px rgba(0,0,0,0.5);
}

/* ----- Shutdown Screen ----- */
#shutdown-screen {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.shutdown-content {
  text-align: center;
}

.shutdown-msg {
  font-size: 28px;
  color: #ffaa00;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  margin: 0 0 16px;
}

.shutdown-sub {
  font-size: 14px;
  color: #888;
  margin: 0 0 24px;
}

.shutdown-btn {
  font-size: 14px;
  padding: 6px 20px;
  cursor: pointer;
  background: #c0c0c0;
  border: 2px outset #fff;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
}
.shutdown-btn:active {
  border-style: inset;
}

/* ----- Taskbar ----- */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 100;
}

#start-button {
  height: 28px;
  font-weight: bold;
  font-size: 12px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  cursor: pointer;
}
#start-button.active {
  border-style: inset;
  background: #b0b0b0;
}

.start-flag {
  color: #ff0000;
  font-size: 14px;
}

#taskbar-windows {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow: hidden;
}

.taskbar-btn {
  height: 24px;
  font-size: 11px;
  padding: 2px 8px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 1;
}
.taskbar-btn.active {
  border-style: inset;
  background: #fff;
  font-weight: bold;
}

#taskbar-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  font-size: 12px;
  flex-shrink: 0;
  height: 24px;
}

#taskbar-clock {
  min-width: 42px;
  text-align: center;
}

#tray-volume {
  font-size: 14px;
  cursor: default;
}

/* ----- Start Menu ----- */
#start-menu {
  position: fixed;
  bottom: 34px;
  left: 4px;
  width: 220px;
  background: #c0c0c0;
  border: 2px outset #fff;
  display: flex;
  z-index: 200;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.35);
}

.start-sidebar {
  width: 28px;
  background: linear-gradient(to top, #000080, #1084d0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  flex-shrink: 0;
}

.start-sidebar-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fff;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 2px;
}

.start-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.start-item:hover {
  background: #000080;
  color: #fff;
}

.start-item-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.start-divider {
  height: 1px;
  background: #808080;
  margin: 4px 8px;
  border-bottom: 1px solid #fff;
}

/* ============================================
   RESPONSIVE — Stack windows on mobile
   ============================================ */
@media (max-width: 768px) {
  #desktop {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 10px;
    bottom: 34px;
  }

  .desktop-icons {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .desktop-icon {
    width: 64px;
  }
  .desktop-icon span {
    font-size: 10px;
  }

  .draggable-window {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    max-height: none;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  }
  .draggable-window .title-bar {
    cursor: default;
  }

  /* Make buttons more tappable */
  button, .taskbar-btn {
    min-height: 32px;
  }

  #start-menu {
    width: calc(100% - 8px);
  }

  #shutdown-dialog {
    width: calc(100% - 24px) !important;
    left: 12px !important;
    transform: translateY(-50%) !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #boot-screen {
    display: none !important;
  }
  .blink {
    animation: none;
  }
  * {
    transition: none !important;
  }
}
