/* styles.css */
/* ===== CUSTOM FONTS ===== */
@font-face {
  font-family: "W95FA";
  src: url('images/w95f.woff2') format('woff2'),
       url('images/w95f.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

:root {
  /* Core palette variables for easy global layout theme switching */
  --win-bg: #c0c0c0;
  --win-blue: #000080;
  --win-text-dark: #000000;
  --win-text-light: #ffffff;
  --win-border-light: #ffffff;
  --win-border-dark: #808080;
  --marquee-yellow: #ffff00;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Times New Roman", Times, serif;
  border-radius: 0;
}

/* ===== CURSORS ===== */
html, body {
  cursor: url('images/arrow.cur'), auto;
}
a, button, summary, .win-btn, .taskbar-start, .play-btn, .sort-btn, .tos-button, .taskbar-app, .start-item, select {
  cursor: url('images/Cursor_15.cur'), pointer;
}
input, textarea, .search-input {
  cursor: url('images/Beam.cur'), text;
}

/* ===== WINDOWS 95 UI FONT SYSTEM ===== */
.panel-title-bar, .win-btn, .taskbar, .start-menu, .tos-button, .taskbar-app, .w95-text {
  font-family: "W95FA", "MS Sans Serif", Tahoma, Arial, sans-serif !important;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
}

html {
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  color: var(--win-text-light);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: var(--win-blue);
  background-image: url('images/tile.GIF');
  background-repeat: repeat;
}

/* ===== CRT SCANLINES & VIGNETTE (THE "GLASS" LAYER) ===== */
html::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.1)
  );
  background-size: 134% 3px; 
  box-shadow: inset 0 0 3.5vw rgba(0, 0, 0, 0.7);
  pointer-events: none; 
  z-index: 2147483647; /* Re-layered above everything */
  -webkit-filter: url(#subpixel-blur) contrast(1.015);
  filter: url(#subpixel-blur) contrast(1.015);
}

img {
  image-rendering: pixelated;
}

/* ===== CONSTRUCTION BANNER ===== */
.construction-banner {
  width: 100%;
  background: #000000;
  border-top: 3px solid var(--marquee-yellow);
  border-bottom: 3px solid var(--marquee-yellow);
  padding: 4px 0;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  -webkit-filter: blur(0.6px) contrast(1.015);
  filter: blur(0.6px) contrast(1.015);
}

.construction-banner img {
  height: 40px;
  vertical-align: middle;
  margin: 0 8px;
}

.construction-banner .marquee-content {
  display: inline-block;
  color: var(--marquee-yellow);
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  animation: scroll-jitter 25s steps(400, end) infinite;
}

@keyframes scroll-jitter {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ===== PAGE SHELL ===== */
.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 10px 60px;
  -webkit-filter: url(#subpixel-blur) contrast(1.0175);
  filter: url(#subpixel-blur) contrast(1.0175);
}

/* ===== PANELS ===== */
.panel {
  background-color: var(--win-bg);
  border: 3px outset var(--win-border-light);
  color: var(--win-text-dark);
  margin-bottom: 14px;
}

.panel-dark {
  background-color: var(--win-blue);
  border: 3px outset #0000cc;
  color: var(--win-text-light);
  margin-bottom: 14px;
}

.panel-title-bar {
  background: var(--win-blue);
  color: var(--win-text-light);
  font-size: 1rem;
  font-weight: normal;
  padding: 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--win-border-light);
  letter-spacing: 0.05em;
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.panel-title-bar .win-btns {
  display: inline-flex;
  gap: 3px;
}

button.win-btn {
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  width: 16px;
  height: 14px;
  background: var(--win-bg);
  border: 2px outset var(--win-border-light);
  font-size: 0.6rem;
  font-weight: bold;
  color: var(--win-text-dark);
  text-align: center;
  line-height: 10px;
  text-decoration: none;
}

button.win-btn:active {
  border-style: inset;
}

button.win-btn:disabled {
  color: var(--win-border-dark);
  cursor: default;
}

.panel-body {
  padding: 12px 14px;
}

.panel.minimized .panel-body,
.panel-dark.minimized .panel-body {
  display: none;
}

/* ===== HEADER ===== */
header {
  margin-bottom: 14px;
}

.header-top-banner {
  background: #000000;
  border: 3px inset var(--win-border-dark);
  color: #00ff00;
  text-align: center;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

header h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: bold;
  color: var(--marquee-yellow);
  text-align: center;
  padding: 14px 0 8px;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.hero-copy {
  text-align: center;
  font-size: 1.05rem;
  color: var(--win-text-light);
  padding: 4px 10px;
  line-height: 1.6;
}

.hero-note {
  text-align: center;
  font-size: 0.95rem;
  color: #cccccc;
  padding: 4px 10px 10px;
  font-style: italic;
  line-height: 1.5;
}

/* ===== STATS ROW ===== */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border: 2px inset var(--win-border-dark);
}

.stats-table td {
  background: var(--win-blue);
  color: var(--win-text-light);
  border: 2px outset #0000aa;
  text-align: center;
  padding: 8px 10px;
  width: 20%;
}

.stats-table .stat-label {
  display: block;
  font-size: 0.75rem;
  color: #aaaaff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: bold;
  margin-bottom: 4px;
}

.stats-table .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--marquee-yellow);
}

/* ===== SECTION TITLES ===== */
.section-heading {
  background: var(--win-blue);
  color: var(--win-text-light);
  font-size: 1.1rem;
  font-weight: bold;
  padding: 5px 10px;
  border-bottom: 2px solid var(--win-border-light);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-heading .section-sub {
  font-size: 0.8rem;
  font-style: italic;
  color: #aaaaff;
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
}

.panel-subtitle {
  font-size: 0.82rem;
  color: #555555;
  margin-bottom: 8px;
  font-style: italic;
}

/* ===== ANNOUNCEMENTS ===== */
.announcement-list {
  display: grid;
  gap: 8px;
}

.announcement-item {
  border: 2px inset var(--win-border-dark);
  background: #d4d0c8;
  padding: 10px 12px;
}

.announcement-item h3 {
  font-size: 1rem;
  font-weight: bold;
  color: var(--win-blue);
  margin-bottom: 5px;
  text-decoration: underline;
}

.announcement-item p {
  color: var(--win-text-dark);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 3px;
}

.announcement-note {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--win-text-dark);
  background: #ffffcc;
  border: 1px solid #cccc00;
  padding: 6px 10px;
}

.inline-link {
  color: #0000cc;
  font-weight: bold;
  text-decoration: underline;
}

.inline-link:visited {
  color: #800080;
}

.inline-link:hover {
  color: #cc0000;
}

/* ===== FEATURED CARD ===== */
.featured-card {
  border: 3px inset var(--win-border-dark);
  background: #d4d0c8;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  min-height: 320px;
  overflow: hidden;
}

.featured-media {
  border-right: 2px inset var(--win-border-dark);
  overflow: hidden;
  min-height: 240px;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--win-bg);
}

.featured-content h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: bold;
  color: var(--win-blue);
  margin-bottom: 8px;
  line-height: 1.1;
}

.featured-content p {
  color: #333333;
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 10px;
}

.featured-meta {
  margin: 8px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ===== STATUS BADGES ===== */
.status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 2px outset;
  color: var(--win-text-dark);
  margin-bottom: 8px;
}

.status--complete { background: #008000; border-color: #00ff00; color: #ffffff; }
.status--beta { background: #000080; border-color: #0000ff; color: #ffffff; }
.status--new { background: #ffcc00; border-color: #ffff00; color: #000000; }
.status--wip { background: #ff6600; border-color: #ff9933; color: #ffffff; }
.status--buggy { background: #cc0033; border-color: #ff3366; color: #ffffff; }
.status--abandoned { background: #444444; border-color: #666666; color: #cccccc; }
.status--legacy { background: #800080; border-color: #ff00ff; color: #ffffff; }
.status--unfinished { background: #777777; border-color: #999999; color: #ffffff; }

/* ===== TAGS ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 12px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: bold;
  background: var(--win-blue);
  color: var(--win-text-light);
  border: 2px outset #0000cc;
}

.tag--featured { background: #006600; color: #ffffff; border-color: #00ff00; }
.tag--dev { background: #990000; color: #ffffff; border-color: #ff0000; }

/* ===== CONTROLS ROW ===== */
.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  background: #d4d0c8;
  border: 2px inset var(--win-border-dark);
  padding: 6px 10px;
}

.controls-row .hint {
  font-size: 0.85rem;
  color: #444444;
}

.toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.search-input, .filter-select, .sort-btn {
  background: var(--win-text-light);
  border: 2px inset var(--win-border-dark);
  padding: 3px 6px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--win-text-dark);
}

.sort-btn {
  background: var(--win-bg);
  border: 2px outset var(--win-border-light);
  font-weight: bold;
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.sort-btn:active {
  border-style: inset;
}

/* ===== PROJECT GRID ===== */
.project-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.project-card {
  background: var(--win-bg);
  border: 3px outset var(--win-border-light);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-style: inset;
  background: #d4d0c8;
}

.card-image {
  border-bottom: 2px inset var(--win-border-dark);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--win-blue);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--win-blue);
  margin: 6px 0 4px;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--win-text-dark);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.card-actions {
  margin-top: auto;
}

.play-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--win-blue);
  color: var(--win-text-light);
  border: 3px outset #0000cc;
  padding: 6px 10px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.play-btn:active {
  border-style: inset;
}

/* ===== CLASSIC GAMES WRAPPER ===== */
.classic-games-wrapper {
  margin-top: 14px;
}

.classic-dropdown {
  background: var(--win-bg);
  border: 3px outset var(--win-border-light);
}

.classic-dropdown summary {
  padding: 6px 12px;
  font-weight: bold;
  color: var(--win-text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}

.classic-dropdown summary::-webkit-details-marker {
  display: none;
}

.classic-dropdown[open] summary {
  border-bottom: 2px inset var(--win-border-dark);
  background: #d4d0c8;
}

.dropdown-content {
  padding: 12px;
  background: #e4e0d8;
}

.classic-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.classic-item {
  background: var(--win-bg);
  border: 3px outset var(--win-border-light);
  padding: 6px;
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--win-text-dark);
}

.classic-item:hover {
  border-style: inset;
}

.classic-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  background: var(--win-border-dark);
  border: 2px inset #555555;
}

.classic-info h3 {
  font-size: 0.92rem;
  font-weight: bold;
  color: var(--win-blue);
  margin-bottom: 3px;
}

/* ===== FOOTER ===== */
footer {
  margin-top: 20px;
  border-top: 2px inset var(--win-border-dark);
  padding-top: 10px;
  text-align: center;
  color: #808080;
  font-size: 0.85rem;
}

footer p {
  margin-bottom: 4px;
}

.visit-highlight {
  color: var(--marquee-yellow);
  background: #000000;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.95rem;
}

.footer-note {
  font-size: 0.78rem;
  color: #aaaaaa;
}

/* ===== TOS MODAL ===== */
.tos-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2147483645;
  -webkit-filter: url(#subpixel-blur) contrast(1.015);
  filter: url(#subpixel-blur) contrast(1.015);
}

.tos-modal-box {
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  -webkit-filter: url(#subpixel-blur) contrast(1.015);
  filter: url(#subpixel-blur) contrast(1.015);
}

.tos-modal-box .panel-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(100% - 28px);
}

.tos-title {
  font-size: 1.2rem;
  color: var(--win-blue);
  margin-bottom: 10px;
  text-align: center;
  font-weight: bold;
}

.tos-scroll-box {
  background: var(--win-text-light);
  border: 3px inset var(--win-border-dark);
  padding: 10px;
  overflow-y: auto;
  flex-grow: 1;
  margin-bottom: 15px;
  color: var(--win-text-dark);
  font-size: 0.9rem;
  line-height: 1.5;
  -webkit-filter: url(#subpixel-blur) contrast(1.015);
  filter: url(#subpixel-blur) contrast(1.015);
}

.tos-scroll-box h3 {
  font-size: 1rem;
  color: var(--win-blue);
  margin-top: 15px;
  margin-bottom: 5px;
}

.tos-scroll-box p, .tos-scroll-box ul {
  margin-bottom: 10px;
}

.tos-scroll-box ul {
  margin-left: 25px;
}

.tos-actions {
  display: flex;
  justify-content: flex-end;
}

.tos-button {
  background: var(--win-bg);
  border: 3px outset var(--win-border-light);
  padding: 6px 20px;
  font-size: 1rem;
  color: var(--win-text-dark);
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.tos-button:active {
  border-style: inset;
}

/* ===== FOCUS ===== */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px dotted #000000;
  outline-offset: 1px;
}

/* ===== WINDOWS 95 STYLE START MENU ===== */
.start-menu {
  position: fixed;
  bottom: 28px;
  left: 0;
  background: var(--win-bg);
  border: 3px outset var(--win-border-light);
  display: none;
  z-index: 2147483644;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
  -webkit-filter: url(#subpixel-blur) contrast(1.015);
  filter: url(#subpixel-blur) contrast(1.015);
}

.start-menu-sidebar {
  background: var(--win-blue);
  width: 28px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 5px;
}

.start-menu-sidebar-text {
  color: var(--win-text-light);
  transform: rotate(-90deg);
  transform-origin: left bottom;
  white-space: nowrap;
  font-weight: bold;
  margin-left: 20px;
  margin-bottom: 5px;
  letter-spacing: 0.05em;
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.start-menu-items {
  display: flex;
  flex-direction: column;
  padding: 2px;
  min-width: 160px;
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.start-item {
  padding: 8px 12px;
  color: var(--win-text-dark);
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.start-item:hover {
  background: var(--win-blue);
  color: var(--win-text-light);
}

/* ===== WINDOWS 95 STYLE FIXED TASKBAR ===== */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28px;
  background: var(--win-bg);
  border-top: 2px solid var(--win-border-light);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  box-sizing: border-box;
  z-index: 2147483644; /* Highest layer, under TOS and glass overlay */
  -webkit-filter: url(#subpixel-blur) contrast(1.0175);
  filter: url(#subpixel-blur) contrast(1.0175);
}

.taskbar-start {
  height: 22px;
  background: var(--win-bg);
  border: 2px outset var(--win-border-light);
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--win-text-dark);
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

.taskbar-start:active {
  border-style: inset;
}

.taskbar-apps {
  display: flex;
  gap: 4px;
  margin-left: 6px;
}

.taskbar-app {
  width: 22px;
  height: 22px;
  background: var(--win-blue);
  border: 2px outset var(--win-border-light);
  color: var(--win-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
}

.taskbar-app:active {
  border-style: inset;
}

.taskbar-spacer {
  flex-grow: 1;
}

.taskbar-status {
  display: flex;
  gap: 4px;
  height: 22px;
}

.taskbar-clock, .taskbar-date {
  background: var(--win-bg);
  border: 2px inset var(--win-border-light);
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: bold;
  color: var(--win-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: "W95FA" !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

/* ===== REFACTORED CONSOLIDATED CHROMATIC ABERRATION GLOBAL UTILITY ===== */
header h1, 
.hero-copy, 
.hero-note, 
.stats-table td, 
.stats-table .stat-label, 
.stats-table .stat-value, 
.section-heading, 
.section-heading .section-sub, 
.announcement-item h3, 
.announcement-item p, 
.announcement-note, 
.inline-link, 
.featured-content h3, 
.featured-content p, 
.classic-info h3,
.project-card h3,
.tos-overlay,
.tos-modal-box,
.taskbar-app,
.chat-launcher-btn,
.chat-window,
.chat-window-body,
.chat-window .panel-title-bar,
.app-window,
.app-window-body,
.app-window .panel-title-bar,
.arcade-window,
.arcade-window .panel-title-bar {
  text-shadow: 
     -0.03em 0 0.01em rgba(255, 0, 0, 0.6),
     0.03em 0 0.01em rgba(0, 50, 255, 0.6),
     0 0.015em 0.01em rgba(0, 255, 0, 0.4);
}

/* ===== APPLET ICON STYLES & SCALING ===== */
.taskbar-app-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

.chat-launcher-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.win-title-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ===== CHATROOM LAUNCHER BUTTON ===== */
.chat-launcher-btn {
  position: fixed;
  right: 18px;
  bottom: 40px;
  z-index: 998;
  width: 52px;
  height: 52px;
  background: var(--win-bg);
  border: 3px outset var(--win-border-light);
  color: var(--win-text-dark);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  -webkit-filter: url(#subpixel-blur) contrast(1.0175);
  filter: url(#subpixel-blur) contrast(1.0175);
}

.chat-launcher-btn:active {
  border-style: inset;
}

.chat-pending-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: #ff0000;
  border: 2px solid var(--win-text-light);
  box-shadow: 0 0 4px rgba(255, 0, 0, 0.8);
}

/* ===== CHATROOM WINDOW OVERRIDE ===== */
.chat-window {
  right: 18px;
  bottom: 100px;
  width: min(560px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 160px));
}

/* ===== ARCADE HUB WINDOW OVERRIDE ===== */
.arcade-window {
  top: 2vh;
  left: 2.5vw;
  right: auto;
  bottom: auto;
  width: 95vw;
  height: 90vh;
}

@media (max-width: 480px) {
  .chat-window {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 90px;
  }

  .chat-launcher-btn {
    right: 12px;
    bottom: 36px;
  }

  .arcade-window {
    top: 1vh;
    left: 1vw;
    width: 98vw;
    height: 92vh;
  }
}

/* ===== NO-CRT CONTEMPORARY OVERRIDE OVERLAYS ===== */
html.no-crt::after,
html.temp-no-crt::after {
  display: none !important;
}

html.no-crt .page-shell, 
html.temp-no-crt .page-shell,
html.no-crt .construction-banner,
html.temp-no-crt .construction-banner,
html.no-crt .taskbar,
html.temp-no-crt .taskbar,
html.no-crt .start-menu,
html.temp-no-crt .start-menu,
html.no-crt .tos-overlay,
html.temp-no-crt .tos-overlay,
html.no-crt .tos-modal-box,
html.temp-no-crt .tos-modal-box,
html.no-crt .tos-scroll-box,
html.temp-no-crt .tos-scroll-box,
html.no-crt .chat-launcher-btn,
html.temp-no-crt .chat-launcher-btn,
html.no-crt .chat-window,
html.temp-no-crt .chat-window,
html.no-crt .app-window,
html.temp-no-crt .app-window,
html.no-crt .app-frame,
html.temp-no-crt .app-frame,
html.no-crt .arcade-window,
html.temp-no-crt .arcade-window {
  filter: none !important;
  -webkit-filter: none !important;
}

html.no-crt img,
html.temp-no-crt img {
  image-rendering: auto;
}

html.no-crt header h1, html.temp-no-crt header h1, 
html.no-crt .hero-copy, html.temp-no-crt .hero-copy, 
html.no-crt .hero-note, html.temp-no-crt .hero-note, 
html.no-crt .stats-table td, html.temp-no-crt .stats-table td, 
html.no-crt .stats-table .stat-label, html.temp-no-crt .stats-table .stat-label, 
html.no-crt .stats-table .stat-value, html.temp-no-crt .stats-table .stat-value, 
html.no-crt .section-heading, html.temp-no-crt .section-heading, 
html.no-crt .section-heading .section-sub, html.temp-no-crt .section-heading .section-sub, 
html.no-crt .announcement-item h3, html.temp-no-crt .announcement-item h3, 
html.no-crt .announcement-item p, html.temp-no-crt .announcement-item p, 
html.no-crt .announcement-note, html.temp-no-crt .announcement-note, 
html.no-crt .inline-link, html.temp-no-crt .inline-link, 
html.no-crt .featured-content h3, html.temp-no-crt .featured-content h3, 
html.no-crt .featured-content p, html.temp-no-crt .featured-content p, 
html.no-crt .classic-info h3, html.temp-no-crt .classic-info h3,
html.no-crt .project-card h3, html.temp-no-crt .project-card h3,
html.no-crt .tos-overlay, html.temp-no-crt .tos-overlay,
html.no-crt .tos-modal-box, html.temp-no-crt .tos-modal-box,
html.no-crt .taskbar-start, html.temp-no-crt .taskbar-start,
html.no-crt .taskbar-clock, html.temp-no-crt .taskbar-clock,
html.no-crt .taskbar-date, html.temp-no-crt .taskbar-date,
html.no-crt .start-item, html.temp-no-crt .start-item,
html.no-crt .start-menu-sidebar-text, html.temp-no-crt .start-menu-sidebar-text,
html.no-crt .taskbar-app, html.temp-no-crt .taskbar-app,
html.no-crt .chat-launcher-btn, html.temp-no-crt .chat-launcher-btn,
html.no-crt .panel-title-bar, html.temp-no-crt .panel-title-bar,
html.no-crt .arcade-window, html.temp-no-crt .arcade-window {
  text-shadow: none !important;
}

/* ===== NEW HERO ONLINE COUNTER ===== */
#hero-online-counter {
  text-align: center;
  font-size: 13pt;
  margin-top: 6px;
  margin-bottom: 15px;
  font-family: "W95FA", "MS Sans Serif", Tahoma, Arial, sans-serif !important;
  color: var(--win-text-light);
  -webkit-font-smoothing: none;
  font-smooth: never;
}

#hero-online-counter strong {
  color: var(--marquee-yellow);
}

/* ===== WINDOW TITLES FONT FIX ===== */
.panel-title-bar, .w95-titlebar {
  font-family: "W95FA", "MS Sans Serif", Tahoma, Arial, sans-serif !important;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

/* ===== FLOATING MOVABLE & RESIZABLE WINDOW EXTENSIONS ===== */
.floating-window {
  position: fixed !important;
  z-index: 1000;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.floating-window[hidden],
.floating-window.minimized {
  display: none !important;
}

.floating-window .panel-title-bar {
  cursor: move;
  user-select: none;
}

/* App Window Styling */
.app-window {
  right: 60px;
  bottom: 80px;
  width: min(640px, calc(100vw - 40px));
  height: min(500px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  padding: 0;
  -webkit-filter: url(#subpixel-blur) contrast(1.0175);
  filter: url(#subpixel-blur) contrast(1.0175);
}

.app-window-body {
  flex: 1;
  min-height: 0;
  background: var(--win-text-light);
  border-top: 2px inset var(--win-border-dark);
  position: relative;
}

.app-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: var(--win-text-light);
}

/* ===== MAXIMIZED / PSEUDO-FULLSCREEN APPLET WINDOWS ===== */
.floating-window.maximized {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 28px !important; /* Leave exactly enough room for the taskbar to remain accessible */
  width: 100vw !important;
  height: calc(100vh - 28px) !important; /* Screen minus taskbar */
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 2147483643 !important; /* Put below taskbar */
  transform: none !important;
}

.floating-window.maximized .app-window-body {
  flex: 1 1 auto !important;
}

.floating-window.maximized .win-resize-handle {
  display: none !important;
}

/* ===== RESIZE HANDLES ===== */
.win-resize-handle {
  position: absolute;
  z-index: 100;
}

.win-resize-handle-e {
  top: 0; right: -4px; width: 8px; height: 100%; cursor: e-resize;
}

.win-resize-handle-s {
  bottom: -4px; left: 0; width: 100%; height: 8px; cursor: s-resize;
}

.win-resize-handle-w {
  top: 0; left: -4px; width: 8px; height: 100%; cursor: w-resize;
}

.win-resize-handle-se {
  bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize;
}

.win-resize-handle-sw {
  bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: sw-resize;
}

/* ===== TASKBAR APP LAUNCHER BUTTONS ===== */
.taskbar-app-btn {
  height: 22px;
  background: var(--win-bg);
  border: 2px outset var(--win-border-light);
  font-size: 0.82rem;
  font-weight: bold;
  color: var(--win-text-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  font-family: "W95FA", "MS Sans Serif", sans-serif !important;
  cursor: pointer;
  user-select: none;
}

.taskbar-app-btn:active,
.taskbar-app-btn.active {
  border-style: inset;
  background: #dfdfdf;
}

.taskbar-app-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.taskbar-app-label {
  font-size: 0.82rem;
  font-family: "W95FA", "MS Sans Serif", sans-serif !important;
}
