/* ============================================================
   derek.pink — Mac OS 9 Platinum Design System
   style.css
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --platinum-white:  #ffffff;
  --platinum-light:  #f0f0f0;
  --platinum-mid:    #dddddd;
  --platinum-dark:   #888888;
  --platinum-darker: #555555;
  --platinum-black:  #000000;
  --grays-500:       #aaaaaa;
  --grays-600:       #999999;
  --grays-700:       #777777;
  --desktop-bg:      #b30059;
  --highlight-blue:  #0000aa;
  --font-stack:      "Chicago", "Geneva", "Charcoal", system-ui, sans-serif;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-stack);
  font-size: 12px;
  background-color: var(--desktop-bg);
  color: var(--platinum-black);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  /* Classic Mac teal desktop pattern */
  background-image: none;
}

/* --- OS 9 Window ------------------------------------------ */
.os9-window {
  background-color: var(--platinum-light);
  border: 1px solid var(--platinum-black);
  box-shadow:
    -1px -1px 0 var(--grays-600),
    -1px  0px 0 var(--grays-600),
     0px -1px 0 var(--grays-600),
     1px  1px 0 var(--platinum-white),
     1px  0px 0 var(--platinum-white),
     0px  1px 0 var(--platinum-white),
    /* outer drop shadow */
     3px  3px 0 rgba(0,0,0,0.35),
     4px  4px 0 rgba(0,0,0,0.15);
  min-width: 320px;
  max-width: 560px;
  width: 90vw;
  display: flex;
  flex-direction: column;
}

/* --- Title Bar -------------------------------------------- */
.os9-titlebar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  height: 20px;
  background-color: var(--platinum-mid);
  border-bottom: 1px solid var(--platinum-black);
  user-select: none;
  cursor: default;
}

/* Stripe filler spans */
.os9-titlebar .filler {
  flex: 1;
  height: 12px;
  background-color: var(--platinum-mid);
  background-image: linear-gradient(
    #ffffff 0%, #ffffff 50%,
    #777777 50%, #777777 100%
  );
  background-repeat: repeat-y;
  background-size: 100% 2px;
  position: relative;
}

.os9-titlebar .filler::before,
.os9-titlebar .filler::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background-size: 100% 2px;
  background-repeat: repeat-y;
}

.os9-titlebar .filler::before {
  left: 0;
  background-image: linear-gradient(
    #ffffff 0%, #ffffff 50%,
    #cccccc 50%, #cccccc 100%
  );
}

.os9-titlebar .filler::after {
  right: 0;
  background-image: linear-gradient(
    #cccccc 0%, #cccccc 50%,
    #777777 50%, #777777 100%
  );
}

/* Title text */
.os9-titlebar .title-text {
  font-family: var(--font-stack);
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  padding: 0 6px;
  line-height: 1;
}

/* --- Window Buttons --------------------------------------- */
.os9-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background-color: transparent;
  background-image: linear-gradient(135deg, #9a9a9a 0%, #f1f1f1 100%);
  background-size: 9px 9px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    inset  1px  1px 0 var(--grays-700),
    inset -1px -1px 0 var(--platinum-white),
    inset  0   0   0 2px var(--platinum-black),
    inset  3px  3px 0 var(--platinum-white),
    inset -3px -3px 0 var(--grays-700);
  cursor: default;
  position: relative;
}

.os9-btn::before,
.os9-btn::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 1px;
}

.os9-btn::before {
  top: 1px;
  right: 1px;
  background-color: #cccccc;
}

.os9-btn::after {
  bottom: 1px;
  left: 1px;
  background-color: #cccccc;
}

.os9-btn:active {
  background-image: linear-gradient(135deg, #353535cc 0%, #9c9c9ccc 100%);
}

/* --- Window Body ------------------------------------------ */
.os9-window-body {
  padding: 16px 20px;
  background-color: var(--platinum-light);
  border: 1px solid var(--platinum-black);
  box-shadow:
    -1px -1px 0 var(--grays-600),
    -1px  0px 0 var(--grays-600),
     0px -1px 0 var(--grays-600),
     1px  1px 0 var(--platinum-white),
     1px  0px 0 var(--platinum-white),
     0px  1px 0 var(--platinum-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

/* --- Window Status Bar ------------------------------------ */
.os9-statusbar {
  height: 22px;
  background-color: var(--platinum-mid);
  border-top: 1px solid var(--platinum-dark);
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 6px;
  font-size: 10px;
  color: var(--platinum-darker);
}

/* Play/Pause button in status bar */
.os9-play-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: var(--platinum-light);
  font-size: 8px;
  line-height: 1;
  color: var(--platinum-black);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset  1px  1px 0 var(--platinum-white),
    inset -1px -1px 0 var(--grays-700),
    inset  0    0   0 1px var(--grays-600);
  cursor: default;
  padding: 0 0 0 1px; /* nudge triangle glyph to optical center */
}

.os9-play-btn:active {
  box-shadow:
    inset  1px  1px 0 var(--grays-700),
    inset -1px -1px 0 var(--platinum-white),
    inset  0    0   0 1px var(--grays-600);
  padding: 1px 0 0 1px;
}

/* Blinking status indicator dot */
.os9-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #888;
  box-shadow: inset 1px 1px 0 #aaa, inset -1px -1px 0 #555;
  animation: blink-dot 1.8s ease-in-out infinite;
}

/* Green pulse when stream is playing */
.os9-statusbar.playing .os9-status-dot {
  animation: pulse-green 1.4s ease-in-out infinite;
}

@keyframes blink-dot {
  0%, 100% { background-color: #888; }
  50%       { background-color: #ffcc00; box-shadow: inset 1px 1px 0 #ffe566, inset -1px -1px 0 #cc9900, 0 0 4px #ffcc00; }
}

@keyframes pulse-green {
  0%, 100% { background-color: #00aa33; box-shadow: inset 1px 1px 0 #00dd55, inset -1px -1px 0 #007722; }
  50%       { background-color: #00cc44; box-shadow: inset 1px 1px 0 #00ff66, inset -1px -1px 0 #009933, 0 0 4px #00cc44; }
}

/* --- Typography inside windows ---------------------------- */
.os9-window-body h1 {
  font-family: var(--font-stack);
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.02em;
}

.os9-window-body p {
  font-family: var(--font-stack);
  font-size: 12px;
  color: var(--platinum-darker);
  line-height: 1.5;
}

/* --- Construction GIF ------------------------------------- */
.construction-gif {
  image-rendering: pixelated;
  border: 1px solid var(--platinum-dark);
  box-shadow: inset 1px 1px 0 var(--platinum-white), inset -1px -1px 0 var(--grays-600);
}

/* --- Horizontal Rule -------------------------------------- */
.os9-divider {
  width: 100%;
  border: none;
  border-top: 1px solid var(--platinum-dark);
  border-bottom: 1px solid var(--platinum-white);
}

/* --- Desktop Label (optional site credit) ----------------- */
.desktop-label {
  position: fixed;
  bottom: 12px;
  right: 16px;
  font-family: var(--font-stack);
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  pointer-events: none;
}
