/* =========================
   Font standardisation (2 fonts max)
   - Keep default UI font (from 98.css / browser)
   ========================= */

@font-face {
  font-family: "W95FA";
  src: url("/fonts/w95fa.woff2") format("woff2"),
       url("/fonts/w95fa.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body,
.title-bar,
.window,
.window-body,
.menu-bar,
.status-bar,
.taskbar,
.start-menu,
.start-menu * ,
.start-button,
.clock,
.icon,
.icon * ,
.sidebar,
.sidebar-item,
.file,
.file * ,
button,
input,
label,
legend,
li[role="tab"],
option,
select,
table,
textarea,
ul.tree-view {
  font-family: "W95FA", Arial, sans-serif !important;
}

/* === Global (LOCK BROWSER SCROLL) === */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  /* No browser/window scrolling */
  overflow: hidden;

  background: #000;

  /* Keep your original sizing */
  font-size: 17px;
  line-height: 1.4;

  /* IMPORTANT: do NOT set font-family here if you want the default UI font */
}

/* iOS/Safari overscroll hardening */
body {
  position: fixed;
  inset: 0;
}


/* === Desktop Layout (fits viewport, no outer overflow) === */
.desktop-outer {
  width: 100vw;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  background: #000;
  padding: 0;
  overflow: hidden;
}

.desktop-wrapper {
  aspect-ratio: 4 / 3;
  height: 95vh;
  max-width: 1024px;
  background: #008080;
  border: 4px solid #c0c0c0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;

  /* keep everything clipped inside the desktop frame */
  overflow: hidden;
  position: relative;
}

.desktop {
  flex: 1;
  min-height: 0; /* important for flex children + overflow */
  overflow-y: auto; /* only the desktop scrolls */
  overflow-x: hidden;

  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-content: flex-start;
}

/* === Taskbar === */
.taskbar {
  height: 40px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  display: flex;
  align-items: center;
  padding: 0 8px;
  box-sizing: border-box;
  z-index: 9999;
  flex-shrink: 0;
}

/* keep your original sizes, remove font shorthand */
.start-button {
  padding: 4px 12px;
  background: #c0c0c0;
  border: 2px outset #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.4;
}

.clock {
  margin-left: auto;
  padding: 4px 8px;
  font-size: 16px;
  background: #c0c0c0;
  border: 2px inset #404040;
}

/* === Start Menu (clean) === */
.start-menu {
  position: absolute;
  bottom: 40px;
  left: 8px;

  width: 340px;
  background: #c0c0c0;
  border: 2px outset #fff;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10000;

  font-size: 15px;
  overflow: hidden;
}

.hidden {
  display: none;
}

.start-header {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
}

.start-header img {
  width: 32px;
  height: 32px;
  border: 2px inset #fff;
  background: #fff;
}

.start-header-text strong {
  display: block;
  font-size: 15px;
}

.start-header-text small {
  display: block;
  font-size: 13px;
  color: #404040;
}

.status.online {
  color: #0b7a0b;
}

.start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.start-col {
  padding: 6px;
}

.start-col-right {
  border-left: 1px solid #808080;
  background: #d4d0c8;
}

.menu-title {
  padding: 4px 6px;
  font-size: 13px;
  font-weight: bold;
  color: #404040;
  background: #c0c0c0;
  border: 1px solid #808080;
  border-top-color: #fff;
  border-left-color: #fff;
  margin-bottom: 6px;
}

.menu-sep {
  height: 1px;
  background: #808080;
  margin: 6px 0;
}

.start-menu .menu-item {
  padding: 6px 8px;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.start-menu .menu-item:hover {
  background: #000080;
  color: #fff;
  border-color: #000080;
}

.start-menu .menu-item.compact {
  padding: 5px 8px;
}

.start-menu .menu-item.is-open {
  box-shadow: inset 0 0 0 1px #404040;
}

.start-footer {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-top: 1px solid #808080;
  background: #c0c0c0;
}

.start-footer .menu-item {
  flex: 1;
  text-align: center;
  margin-bottom: 0;
}

.start-footer .menu-item.danger:hover {
  background: #800000;
  border-color: #800000;
  color: #fff;
}

/* === Icons === */
.icon {
  width: 90px;
  text-align: center;
  cursor: pointer;
  color: white;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon img {
  width: 48px;
  height: 48px;
}

.icon span {
  margin-top: 4px;
  text-shadow: 1px 1px 2px black;
}

/* === Window Base === */
.window {
  position: absolute;
  display: none;
  max-width: 60rem;
  z-index: 1000;
  max-height: 90vh;

  /* keep window itself bounded; scroll happens in .window-body */
  overflow: hidden;
}

.window-body {
  padding: 10px;
  overflow: auto;
  background: #c0c0c0;
  font-size: 15px;
  line-height: 1.2;
}

.window.modal {
  max-height: 90vh;
  overflow: hidden;
  width: min(95vh, 90%);
  max-width: 90vh;
}

.title-bar-text {
  font-size: 15px;
  margin-left: 1rem;
}

/* === About Window === */
.about-window {
  width: 80%;
  max-width: 700px;
  max-height: 80vh;
  display: block;
  overflow: hidden;
}

.about-window .window-body {
  max-height: calc(80vh - 30px);
  overflow-y: auto;
  padding: 12px 16px;
  box-sizing: border-box;
  background: #c0c0c0;
}

.about-window h3 {
  font-size: 13px;
  font-weight: bold;
  margin: 14px 0 6px;
}

.about-window p {
  font-size: 15px;
  margin: 4px 0 10px;
  line-height: 1.5;
}

.about-window hr {
  border: none;
  border-top: 1px solid #808080;
  margin: 10px 0;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-pic {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 2px ridge #c0c0c0;
  background: white;
}

/* === Language Bars === */
#language-container {
  margin-top: 8px;
  max-width: 600px;
  width: 100%;
}

.lang-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  width: 100%;
}

.lang-label {
  font-size: 15px;
  white-space: nowrap;
  min-width: 120px;
  margin-right: 8px;
}

.language-bar {
  position: relative;
  background: #c0c0c0;
  border: 2px inset #fff;
  width: 100%;
  height: 16px;
  overflow: hidden;
}

.language-bar .bar-fill {
  background: #0344f8;
  height: 100%;
  width: 0%;
  transform-origin: left;
  transition: width 1s ease-in-out;
}

/* === Explorer Windows === */
.explorer-window {
  max-width: 90vw;
  max-height: 90vh;
  display: none;
  flex-direction: column;
  background: #c0c0c0;
  overflow: hidden;
}

.menu-bar {
  display: flex;
  padding: 4px 8px;
  gap: 16px;
  font-weight: bold;
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-bottom: 2px solid #808080;
}

.explorer-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: white;
  overflow: hidden;
}

.sidebar {
  width: 160px;
  padding: 6px;
  background: #d4d0c8;
  border-right: 2px inset #808080;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-item {
  padding: 4px 6px;
  background: #e0e0e0;
  border: 1px solid #808080;
  user-select: none;
}

.explorer-content {
  flex: 1;
  min-height: 0;
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  background: white;
}

.file-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.file {
  width: 90px;
  text-align: center;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  word-break: break-word;
  padding: 2px;
}

.file img {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
}

.file:hover {
  background: #c0c0c0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  border: 2px inset #fff;
  border-right: 2px outset #404040;
  border-bottom: 2px outset #404040;
  background: #c0c0c0;
  font-size: 15px;
}

/* === Notepad === */
.notepad-window {
  display: flex;
  flex-direction: column;
  width: 500px;
  height: 400px;
  overflow: hidden;
}

.notepad-window > .window-body {
  height: 330px;
  padding: 0;
  background: white;
  overflow: hidden;
}

.notepad-html {
  flex: 1;
  padding: 12px 20px;
  background: white;
  line-height: 1.8;
  white-space: normal;
  overflow-y: auto;
  overflow-x: hidden;

  /* keep your original notepad sizing */
  font-size: 15px;
}

.notepad-html ul {
  list-style-type: disc;
  padding-left: 1.2em;
}

.notepad-html li {
  margin-bottom: 10px;
}

.notepad-html a {
  color: #0000EE;
  text-decoration: underline;
}

/* === Internet Explorer Window === */
#internet-browser {
  width: 95vw;
  height: 80vh;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.internet-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 90%;
  overflow: hidden;
  min-height: 0;
}

.ie-address-bar input.field {
  width: 100%;
  max-width: 100%;
  flex: 1;
}

.ie-fieldset {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.internet-loader {
  flex: 1;
  display: none;
  align-items: center;
  justify-content: center;
  background: black;
  color: lime;
  font-size: 1.2em; /* keep your size */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.internet-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  position: relative;
  z-index: 1;
}

/* === Task Manager === */
#task-list {
  padding: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.task-entry {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 4px;
  border-bottom: 1px dashed #999;
}

.task-entry button {
  padding: 2px 8px;
  font-size: 15px;
  cursor: pointer;
}

/* === Fake Virus Alert === */
.fake-virus-alert {
  width: 220px;
  height: auto;
  background-color: #c0c0c0;
  position: absolute;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.stop-virus-button {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 24px;
  font-size: 18px; /* keep your size */
  font-weight: bold;
  color: white;
  background-color: red;
  border: 2px outset white;
  cursor: pointer;
  z-index: 150000;
  animation: flash 0.6s infinite, shake 1.2s infinite;
  box-shadow: 0 0 10px white;
}

/* === Animations === */
@keyframes flash {
  0%,
  100% {
    background-color: red;
  }
  50% {
    background-color: darkred;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(calc(-50% + 2px), -50%);
  }
  50% {
    transform: translate(calc(-50% - 2px), -50%);
  }
  75% {
    transform: translate(calc(-50% + 2px), -50%);
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  body {
    font-size: 3.5vw;
    overflow: hidden;
  }

  .title-bar-text {
    font-size: 4vw;
  }

  .notepad-html {
    font-size: 3vw;
  }

  .window {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto !important;
    left: 5vw !important;
    top: 5vh !important;
  }

  .window-body {
    max-height: 65vh;
    overflow-y: auto;
  }

  .notepad-window,
  .about-window {
    width: 90vw !important;
    max-width: 90vw !important;
    height: auto !important;
    max-height: 85vh;
  }

  .notepad-window > .window-body {
    max-height: 65vh;
  }

  .profile-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-pic {
    margin-bottom: 12px;
  }
}

/* keep these if you rely on them */
#internet-browser {
  width: 95vw !important;
  height: 80vh !important;
  overflow: hidden;
}

.internet-iframe {
  height: 100% !important;
}
