/* Tezzus archive page — monochrome green (single hue ramp: pale mint ->
   emerald -> deep forest). Everything here is scoped to .tezzus-archive-page
   or tez-* classes so the shared archive.css (homepage silver, Che purple)
   is never affected. */

.tezzus-archive-page {
  margin: 0;
  background: #06110a;
  min-height: 100vh;
}

/* ---- Header palette overrides (shared markup, Tezzus greens) ---- */

/* Green Habbo-logo title */
.tezzus-archive-page .archive-scrolling-title-track span {
  background: linear-gradient(180deg, #daffe6 0%, #6fe39a 55%, #2f9c5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1px #08200f;
  filter:
    drop-shadow(-1.5px 1.5px 0 #2a7a48)
    drop-shadow(-1.5px 1.5px 0 #17532f)
    drop-shadow(-1px 1px 0 #08200f);
}

/* Green spinning globes */
.tezzus-archive-page .fcf-globe img {
  filter: grayscale(1) sepia(1) hue-rotate(85deg) saturate(2.4) brightness(0.85);
}

/* Green boombox art; the breathing glow is the shared white one from
   archive.css (unified across every boombox). Playing pulse timed to
   "UY SCUTI" (~110 BPM): 0.55s/beat, head-tilt over two beats. */
.tezzus-archive-page .che-music-player img {
  filter: grayscale(1) sepia(1) hue-rotate(85deg) saturate(2.4) brightness(0.95);
}

.tezzus-archive-page .che-music-player.playing {
  animation-duration: 0.55s;
}
.tezzus-archive-page .che-music-player.playing img {
  animation-duration: 1.1s;
}

/* ---- Background layers (filled by tezzus-background.js) ---- */

.tez-bg-ticker {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  /* 16px/s leftward drift matched to the asset strip (200px tile / 12.5s) */
  animation: tezGrainDrift 12.5s linear infinite;
}

@keyframes tezGrainDrift {
  from { background-position: 0 0; }
  to { background-position: -200px 0; }
}

.tez-bg-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
}

/* Conveyor strip: two side-by-side copies of the layout drifting left by
   exactly one layout width (1920px) per loop, so the scroll never seams.
   120s = 16px/s (same movement as the other archive pages). */
.tez-bg-strip {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  animation: tezFieldDrift 120s linear infinite;
}

@keyframes tezFieldDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-1920px); }
}

.tez-bg-item {
  position: absolute;
  opacity: 0.5;
}

.tez-bg-item img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  animation: tezTilt 6s step-end infinite;
  /* Monochrome green: wash each motif to the page's single hue */
  filter: grayscale(1) sepia(1) hue-rotate(85deg) saturate(2.0) brightness(0.95);
}

/* 6s cycle, one snap turn per kind: mark at 0s, snake at 2s, logo at 4s */

/* Snake motif: near-square, contain */
.tez-bg-item-snake img {
  animation-delay: 2s;
  animation-name: tezTiltHard;
  object-fit: contain;
}

/* Ø logo: contain (wide-ish square) */
.tez-bg-item-logo img {
  animation-delay: 4s;
  object-fit: contain;
}

/* Tezzus mark: contain (keeps the hand-drawn shape undistorted) */
.tez-bg-item-mark img {
  object-fit: contain;
}

@keyframes tezTilt {
  0% { transform: rotate(-8deg); }
  8.33% { transform: rotate(8deg); }
  16.67%, 100% { transform: rotate(0deg); }
}

@keyframes tezTiltHard {
  0% { transform: rotate(-14deg); }
  8.33% { transform: rotate(14deg); }
  16.67%, 100% { transform: rotate(0deg); }
}

/* ---- Content row: overview left, video player right ----
   Layout geometry and hand-tuned transforms copied from the other pages */

.tez-content-row {
  position: relative;
  z-index: 3;
  width: min(1200px, 94%);
  margin: 9vh auto 10vh;
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Artist overview: fit stage stacked over the stat sheet ---- */

.tez-overview {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transform: translate(-249px, -7px) scale(1.09);
}

.tez-fit-panel,
.tez-info-panel {
  background: #0a1a10;
  box-shadow: 0 0 22px rgba(80, 220, 130, 0.28);
  padding: 16px;
}

.tez-fit-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tez-fit-stage {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(200, 255, 220, 0.04) 0 1px,
      transparent 1px 3px
    ),
    #0d1e12;
  border: 1px solid #1f4a30;
  padding: 14px 14px 0;
  overflow: hidden;
}

.tez-fit-stage img {
  display: block;
  width: 100%;
  max-width: 230px;
  transform: translateY(13px) scale(1.12);
  transform-origin: bottom center;
  transition: opacity 0.15s ease;
  /* Rim glow hugging the cutout's silhouette, lifting it off the dark stage */
  filter:
    drop-shadow(0 0 1px rgba(200, 255, 220, 0.55))
    drop-shadow(0 0 7px rgba(80, 220, 130, 0.4));
}

.tez-fit-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tez-fit-label {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: #6fbf8c;
}

.tez-fit-swap {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: #d8f5e2;
  background: #0d1e12;
  border: 2px solid #3a8f5f;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.tez-fit-swap:hover {
  background: #14361f;
  border-color: #7fe0a0;
}

.tez-fit-swap:active {
  transform: translateY(1px);
}

.tez-info-panel {
  display: flex;
  flex-direction: column;
}

.tez-info-title {
  margin: 0 0 18px;
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: #d8f5e2;
  text-shadow: 0 0 8px rgba(120, 240, 160, 0.8);
}

.tez-info-list {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 12px;
}

.tez-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 2px dotted #1f4a30;
}

.tez-info-row dt {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: #6fbf8c;
  white-space: nowrap;
}

.tez-info-row dd {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #d8f5e2;
  text-align: right;
}

/* Clickable info values */
.tez-info-link {
  color: #d8f5e2;
  text-decoration: underline;
  text-decoration-color: #3a8f5f;
  text-underline-offset: 3px;
}

.tez-info-link:hover {
  color: #6effa0;
  text-decoration-color: #6effa0;
  text-shadow: 0 0 8px rgba(120, 240, 160, 0.8);
}

/* ---- Video player (reuses the shared VHS UI script via che-* ids; all
        styling lives on these tez-* classes) ---- */

.tez-video-player {
  position: relative;
  flex: 1.6 1 420px;
  min-width: 0;
  transform: translate(47px, -15px) scale(1.42);
}

.tez-video-frame {
  position: relative;
  background: #0a1a10;
  padding: 10px;
  box-shadow: 0 0 22px rgba(80, 220, 130, 0.28);
}

/* Cable-chain border crawling around the video frame: concentric round links
   joined by riveted bar links (bike-chain style). Four strips straddle the
   frame's outer edge (22px, offset -11px); top/bottom run full width to cover
   the corners, left/right tuck between them. Each link tile is 26px, so the
   crawl shifts by exactly one link per loop and the four edges combine into
   one clockwise flow. */
.tez-chain {
  position: absolute;
  background-repeat: repeat;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  z-index: 4;
  pointer-events: none;
  /* Desaturate the green tile to silver so the chain matches the iced-out
     diamond pendant hanging from it */
  filter: grayscale(1) brightness(1.05);
}

.tez-chain-top,
.tez-chain-bottom {
  left: -11px;
  right: -11px;
  height: 22px;
  background-image: url("./images/tezzus-link-h.png");
  background-size: 26px 22px;
}

.tez-chain-top { top: -11px; animation: tezChainCrawlX 4s linear infinite; }
.tez-chain-bottom { bottom: -11px; animation: tezChainCrawlX 4s linear infinite reverse; }

.tez-chain-left,
.tez-chain-right {
  top: 11px;
  bottom: 11px;
  width: 22px;
  background-image: url("./images/tezzus-link-v.png");
  background-size: 22px 26px;
}

.tez-chain-left { left: -11px; animation: tezChainCrawlY 4s linear infinite reverse; }
.tez-chain-right { right: -11px; animation: tezChainCrawlY 4s linear infinite; }

@keyframes tezChainCrawlX {
  from { background-position: 0 0; }
  to { background-position: 26px 0; }
}

@keyframes tezChainCrawlY {
  from { background-position: 0 0; }
  to { background-position: 0 26px; }
}

/* Iced-out mark pendant hanging from the bottom of the chain border, swinging
   like jewelry. Shown in its own silver/diamond colors — the chain above was
   recolored to match it. */
.tez-video-pendant {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: top center;
  margin-top: -8px;
  width: 90px;
  height: auto;
  z-index: 5;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(210, 235, 245, 0.5));
  animation: tezPendantSwing 5s ease-in-out infinite;
}

@keyframes tezPendantSwing {
  0%, 100% { transform: translateX(-50%) rotate(-9deg); }
  50% { transform: translateX(-50%) rotate(9deg); }
}

.tez-video-shell {
  position: relative;
  cursor: pointer;
}

/* "Next video" control */
.tez-video-next {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 6;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: #d8f5e2;
  background: rgba(10, 26, 16, 0.85);
  border: 2px solid #3a8f5f;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.tez-video-next:hover {
  background: #14361f;
  border-color: #7fe0a0;
}

.tez-video-next:active {
  transform: translateY(1px);
}

.tez-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #04100a;
  object-fit: contain;
}

.tez-video-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(200, 255, 220, 0.05) 0 1px,
    transparent 1px 3px
  );
}

.tez-video-osd {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: "Press Start 2P", monospace;
  letter-spacing: 1px;
  color: #d8f5e2;
  text-shadow: 1px 1px 0 #000;
}

.tez-osd-state {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 10px;
}

/* Centered prompt shown while the tape is stopped */
.tez-osd-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  animation: tezOsdBlink 1s step-end infinite;
}

.tez-osd-center.hidden {
  display: none;
}

.tez-osd-center-triangle {
  width: 0;
  height: 0;
  border-left: 26px solid #d8f5e2;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  filter: drop-shadow(0 0 8px rgba(120, 240, 160, 0.8));
}

@keyframes tezOsdBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.tez-osd-counter {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
}

.tez-osd-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 8px;
  color: #86c79b;
}
