/* ==========================================================================
   WINDOWS 95 DESIGN TOKENS & CLASSIC 3D BEVEL SYSTEM
   ========================================================================== */
:root {
  --win-teal: #008080;
  --win-silver: #c0c0c0;
  --win-light: #ffffff;
  --win-highlight: #dfdfdf;
  --win-shadow: #808080;
  --win-dark: #000000;
  --win-navy: #000080;
  --win-link: #0000ee;
  --win-visited: #800080;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Tahoma", "MS Sans Serif", "Microsoft Sans Serif", "Inter", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #000000;
  background-color: #008080;
  overflow-x: hidden;
}

/* ==========================================================================
   RESPONSIVE VIEWPORT ADAPTATION
   - Phones (< 640px): Remove flanking teal bg; show only the vertical core.
   - Tablets / Laptops / Desktops (>= 640px): Fill free space with Win95 bg
     and keep the vertical column naturally centered.
   - High-Res / 2K / 4K (>= 1920px): Proportionally scale up only when needed.
   ========================================================================== */
body.win-backdrop {
  background-color: #008080;
  background-image: url('../clouds.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.page-column {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--win-silver);
  image-rendering: auto;
}

@media (min-width: 640px) {
  /* Natural vertical column framed with classic Windows 95 left/right bevels */
  .page-column {
    max-width: 760px;
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-dark);
    box-shadow:
      inset 1px 0 0 var(--win-highlight),
      inset -1px 0 0 var(--win-shadow),
      0 0 0 1px rgba(0, 0, 0, 0.25);
  }
}

/* Scale up gently only on large 1080p+ / 2K / 4K monitors so UI never looks tiny */
@media (min-width: 1920px) {
  html {
    font-size: 16px;
  }
  .page-column {
    max-width: 880px;
  }
}

@media (min-width: 2560px) {
  html {
    font-size: 18px;
  }
  .page-column {
    max-width: 1020px;
  }
}

/* Clean Classic Windows 95 Display & Monospace Fonts (No Pixel Font) */
.font-win-display {
  font-family: "Tahoma", "MS Sans Serif", "Inter", Arial, sans-serif;
  letter-spacing: 0.02em;
}

.font-win-mono {
  font-family: "Consolas", "Lucida Console", "Courier New", monospace;
}

/* Classic Windows 95 3D Outset Panel / Button Bevel */
.win-outset {
  background-color: var(--win-silver);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow:
    inset 1px 1px 0 var(--win-highlight),
    inset -1px -1px 0 var(--win-shadow);
}

/* Classic Windows 95 3D Inset Recessed Field */
.win-inset {
  background-color: var(--win-light);
  border-top: 2px solid var(--win-shadow);
  border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow:
    inset 1px 1px 0 var(--win-dark),
    inset -1px -1px 0 var(--win-highlight);
}

.win-inset-silver {
  background-color: var(--win-silver);
  border-top: 2px solid var(--win-shadow);
  border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow:
    inset 1px 1px 0 var(--win-dark),
    inset -1px -1px 0 var(--win-highlight);
}

/* Classic Win95 Groupbox */
.win-groupbox {
  border: 1px solid var(--win-shadow);
  box-shadow: 1px 1px 0 var(--win-light), inset 1px 1px 0 var(--win-light);
  background-color: var(--win-silver);
}

.win-status-cell {
  border-top: 1px solid var(--win-shadow);
  border-left: 1px solid var(--win-shadow);
  border-right: 1px solid var(--win-light);
  border-bottom: 1px solid var(--win-light);
}

/* Interactive Push Button */
.win-btn {
  background-color: var(--win-silver);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow:
    inset 1px 1px 0 var(--win-highlight),
    inset -1px -1px 0 var(--win-shadow);
  cursor: pointer;
  user-select: none;
}

.win-btn:hover {
  background-color: #cacaca;
}

.win-btn:active,
.win-btn-pressed {
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow:
    inset 1px 1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-highlight);
  background-color: #b6b6b6;
}

/* 4-Column Horizontal Navigation Buttons (Matching Wireframe Tabs) */
.win-nav-tab {
  background-color: var(--win-silver);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow:
    inset 1px 1px 0 var(--win-highlight),
    inset -1px -1px 0 var(--win-shadow);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.win-nav-tab:hover:not(.win-nav-tab-active) {
  background-color: #cacaca;
}

/* Distinct Win95 Pressed / Selected State for Active Tab */
.win-nav-tab-active {
  background-color: #b4b4b4;
  background-image: repeating-conic-gradient(#c0c0c0 0% 25%, #dfdfdf 0% 50%);
  background-size: 2px 2px;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  box-shadow:
    inset 1px 1px 0 var(--win-shadow),
    inset -1px -1px 0 var(--win-highlight);
  font-weight: 700;
}

.win-nav-tab-active::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dotted #000000;
  pointer-events: none;
}

/* Classic Windows 95 Hyperlinks */
.win-link {
  color: var(--win-link);
  text-decoration: underline;
  cursor: pointer;
}

.win-link:visited {
  color: var(--win-visited);
}

.win-link:hover {
  color: #ff0000;
}

/* Crisp Pixelated Canvas Rendering */
canvas.pixel-canvas {
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Classic Windows 95 Scrollbars */
* {
  scrollbar-color: #c0c0c0 #dfdfdf;
}

::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: repeating-conic-gradient(#c0c0c0 0% 25%, #ffffff 0% 50%) 50% / 2px 2px;
}

::-webkit-scrollbar-thumb {
  background-color: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}

/* Classic Windows 95 Range Slider */
input[type="range"].win-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"].win-slider::-webkit-slider-runnable-track {
  height: 6px;
  background: #808080;
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

input[type="range"].win-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 18px;
  margin-top: -7px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}

input[type="range"].win-slider::-moz-range-track {
  height: 6px;
  background: #808080;
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

input[type="range"].win-slider::-moz-range-thumb {
  width: 12px;
  height: 18px;
  border-radius: 0;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
}
