/* =============================================
   RAGE — Global Styles
   ============================================= */

/* --- Custom Properties --- */
:root {
  --win-border: #0a0a6e;
  --win-title-start: #9e92dd;
  --win-title-mid: #7466cc;
  --win-title-end: #6a5cbf;
  --win-btn-bg: #c0c0c0;
  --accent: #ff0000;
  --bg-bliss: url("https://files.strawcdn.com/straw/QyuHzzcjMZqJyZJsJfBU.jpg");
  --font-mono: 'Courier New', Courier, monospace;
  --font-ui: 'Tahoma', 'Segoe UI', sans-serif;
  --font-pixel: 'VT323', monospace;
  --shadow-win: 2px 2px 10px rgba(0, 0, 0, .4);
  --transition-fast: .2s ease;
  --transition-med: .35s ease;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-style: wavy;
}

/* 90s-style scrollbar */
::-webkit-scrollbar { width: 18px; }
::-webkit-scrollbar-track { background: #c0c0c0; border: 1px solid #808080; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #dfdfdf, #b0b0b0);
  border: 2px outset #dfdfdf;
}
::-webkit-scrollbar-button { display: block; height: 18px; background: #c0c0c0; border: 2px outset #dfdfdf; }


/* --- Body --- */
body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-bliss) center / cover fixed no-repeat;
  font-family: var(--font-mono);
  color: #000;
  cursor: default
}

/* Subtle CRT scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, .03) 2px,
    rgba(0, 0, 0, .03) 4px
  );
}


/* =============================================
   Loading Overlay
   ============================================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease;
}

.loader--hidden {
  opacity: 0;
  pointer-events: none;
}

.loader__text {
  font-family: var(--font-pixel, var(--font-mono));
  font-size: 28px;
  color: #fff;
  animation: loaderPulse 1s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: .4; }
  50%      { opacity: 1; }
}


/* =============================================
   Reveal Animation (staggered entrance)
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Individual letter bounce-in for the title */
.hero__title img {
  opacity: 0;
  transform: scale(0.5) translateY(-20px);
  transition: opacity .35s ease, transform .35s ease;
}

.hero__title--loaded img {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero__title--loaded img:nth-child(1) { transition-delay: 0s; }
.hero__title--loaded img:nth-child(2) { transition-delay: .1s; }
.hero__title--loaded img:nth-child(3) { transition-delay: .2s; }
.hero__title--loaded img:nth-child(4) { transition-delay: .3s; }


/* =============================================
   XP Window Component
   ============================================= */
.win {
  border: 2px solid var(--win-border);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  background: #fff;
  image-rendering: pixelated;
}

.win__bar {
  background: linear-gradient(180deg, var(--win-title-start) 0%, var(--win-title-mid) 40%, var(--win-title-end) 100%);
  color: #fff;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  user-select: none;
  cursor: default;
  white-space: nowrap;
}

.win__controls {
  display: flex;
  gap: 2px;
}

.win__ctrl-btn {
  width: 16px;
  height: 14px;
  background: var(--win-btn-bg);
  border: 1px outset #dfdfdf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  line-height: 1;
}

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

.win__body {
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}

/* Variant: image body (no padding, flush) */
.win--img .win__body {
  padding: 0;
  line-height: 0;
}


/* =============================================
   Decorative Clusters  (hand + window + characters)
   Each side is a .cluster: hands sit BEHIND the
   debug window, characters sit IN FRONT / inside.
   ============================================= */
.cluster {
  position: fixed;
  pointer-events: none;
  z-index: 5;
}

.cluster--left {
  top: 50%;
  left: 2%;
  transform: translateY(-50%);
  width: 24vw;
  min-width: 260px;
  max-width: 400px;
}

.cluster--right {
  top: 50%;
  right: 2%;
  transform: translateY(-50%);
  width: 24vw;
  min-width: 260px;
  max-width: 400px;
}

/* The debug window — gives the cluster its height */
.cluster__win {
  position: relative;
  z-index: 2;
  width: 100%;
  pointer-events: auto;
}

/* --- Hands (behind the window, z-index 1) --- */
.cluster__hand {
  position: absolute;
  z-index: 1;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.cluster__hand--bottom {
  transform: rotate(180deg);
}

/* ---- LEFT hands ---- */
.cluster--left .cluster__hand--top {
  width: 75%;
  top: -100%;
  left: -4%;
}

.cluster--left .cluster__hand--bottom {
  width: 75%;
  bottom: -90%;
  left: 22%;
}

/* ---- RIGHT hands ---- */
.cluster--right .cluster__hand--top {
  width: 75%;
  top: -96%;
  right: -18%;
}

.cluster--right .cluster__hand--bottom {
  width: 75%;
  bottom: -86%;
  right: 18%;
}

/* --- Characters (in front of the window, z-index 3) --- */
.cluster__char {
  position: absolute;
  z-index: 3;
  display: block;
  pointer-events: none;
  image-rendering: pixelated;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---- LEFT characters ---- */
.cluster--left .cluster__char--1 {
  width: 43%;
  top: 2%;
  left: 3%;
}

.cluster--left .cluster__char--2 {
  width: 43%;
  top: -18%;
  left: 45%;
}

/* ---- RIGHT characters ---- */
.cluster--right .cluster__char--1 {
  width: 43%;
  top: -19%;
  left: 10%;
}

.cluster--right .cluster__char--2 {
  width: 43%;
  top: -1%;
  right: 7%;
}


/* =============================================
   Page-Specific: Index — Hero
   ============================================= */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Game title */
.hero__title {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  z-index: 15;
}

.hero__title--loaded {
  opacity: 1;
}

.hero__title img {
  display: inline-block;
  width: 120px;
  height: 140px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, .5));
}

/* Side decorative elements are handled by .cluster components */


/* =============================================
   CTA Button
   ============================================= */
.cta {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cta__link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
  border: 3px outset #ff6666;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 16px rgba(255, 0, 0, .35);
  image-rendering: pixelated;
}

.cta__link:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(255, 0, 0, .5);
  text-decoration: none;
}

.cta__link:active {
  border-style: inset;
  transform: scale(.98);
}

.cta__icon {
  font-size: 22px;
  line-height: 1;
}

.cta__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
}


/* =============================================
   Page-Specific: Team
   ============================================= */
.team-wrap {
  position: relative;
  z-index: 15;
  width: 540px;
  max-width: 96%;
  margin: 30px auto 60px;
}

.team-wrap > .win > .win__body {
  padding: 14px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Team grid: 2-column for member cards */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

/* Lead member (RAGEOWN) */
.lead-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.lead-row .card { max-width: 300px; overflow: visible; }
.lead-row .card .win__body { overflow: visible; }
.lead-row .card__name { font-size: 32px; }

/* Cats surrounding the lead */
.lead-cats {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
}

.lead-cats__main {
  display: block;
  width: 160px;
  image-rendering: pixelated;
  position: relative;
  z-index: 2;
}

.lead-cats__pet {
  position: absolute;
  width: 220px;
  image-rendering: pixelated;
  z-index: 3;
}

/* Left cat: far left, overlapping the card edge */
.lead-cats__pet--left   { left: -140px; top: 10px; }
/* Right-top cat: upper right, peeking above title bar */
.lead-cats__pet--right  { right: -140px; top: -40px; }
/* Right-bottom cat: lower right, hanging below */
.lead-cats__pet--bottom { right: -120px; bottom: -80px; }


/* =============================================
   Member Card Component
   ============================================= */
.card {
  width: 100%;
  max-width: 240px;
}

.card .win__body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.card__avatar {
  width: 100%;
  max-width: 160px;
  image-rendering: pixelated;
  margin: 0 auto;
}

.card__name {
  font-family: var(--font-pixel);
  font-size: 28px;
  color: #000;
  margin-top: 4px;
}

.card__handle {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: #808080;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.card__handle img {
  width: 14px;
  height: 14px;
}

.card__role {
  font-family: var(--font-pixel);
  font-size: 17px;
  color: #000;
  margin-top: 2px;
}


/* =============================================
   Utility: Fade-In Animation
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp .6s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in:nth-child(2) { animation-delay: .08s; }
.fade-in:nth-child(3) { animation-delay: .16s; }
.fade-in:nth-child(4) { animation-delay: .24s; }
.fade-in:nth-child(5) { animation-delay: .32s; }
.fade-in:nth-child(6) { animation-delay: .40s; }
.fade-in:nth-child(7) { animation-delay: .48s; }


/* =============================================
   Responsive
   ============================================= */

/* =============================================
   Secret Button (hidden behind left cluster window)
   ============================================= */
.secret-btn {
  position: fixed;
  z-index: 4;            /* below clusters (5), hidden behind the window */
  width: 40px;
  height: 40px;
  background: rgba(255, 0, 0, 0.5);
  border: 2px solid red;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  opacity: 0;
  transition: opacity .3s ease;
}

.secret-btn--visible {
  opacity: 1;
}

/* Tiny blinking pixel — the clue */
.secret-btn__clue {
  display: block;
  width: 6px;
  height: 6px;
  margin: auto;
  border-radius: 50%;
  background: #0f0;
  animation: clueFlicker 4s ease-in-out infinite;
}

@keyframes clueFlicker {
  0%, 85%, 100% { opacity: .3; }
  90%           { opacity: 1; }
  95%           { opacity: 0; }
  97%           { opacity: .8; }
}

.secret-btn:hover {
  background: rgba(255, 0, 0, 0.8);
}

.secret-btn:hover .secret-btn__clue {
  opacity: 1;
  animation: none;
}


/* =============================================
   Terminal — XP Window with CMD
   ============================================= */

/* Backdrop: dim background */
.term-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.term-backdrop--open {
  display: flex;
}

/* The XP window shell */
.term-win {
  width: 750px;
  max-width: 96vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 4px 20px rgba(0,0,0,.7);
  animation: termOpen .25s ease;
}

@keyframes termOpen {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

.term-win__bar {
  cursor: default;
}

/* CMD body */
.term-body {
  background: #000;
  font-family: 'VT323', 'Fixedsys', 'Courier New', Courier, monospace;
  font-size: 16px;
  line-height: 1.3;
  color: #c0c0c0;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  height: 480px;
  max-height: 70vh;
  overflow: hidden;
}

.term-body__screen {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Scrollbar */
.term-body__screen::-webkit-scrollbar { width: 16px; }
.term-body__screen::-webkit-scrollbar-track { background: #000; }
.term-body__screen::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 2px solid #000;
}
.term-body__screen::-webkit-scrollbar-button { display: block; height: 16px; background: #c0c0c0; }

/* Input line */
.term-body__input-line {
  display: flex;
  align-items: center;
  gap: 0;
  padding-top: 2px;
  flex-shrink: 0;
}

.term-body__prompt {
  color: #c0c0c0;
  white-space: pre;
}

.term-body__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #c0c0c0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  caret-color: #c0c0c0;
  padding: 0;
}

/* =============================================
   Responsive (cont.)
   ============================================= */
@media (max-width: 1000px) {
  .hero__title img { width: 52px; height: 60px; }
  .cluster { width: 200px !important; min-width: 0; }
  .cluster__hand { width: 120px !important; }
  .cluster__char { width: 70px !important; }
  .cta__link { font-size: 14px; padding: 12px 22px; }
  .team-wrap { width: 92%; }
}

@media (max-width: 650px) {
  .cluster { display: none; }
  .hero__title img { width: 39px; height: 45px; }
  .cta__link { font-size: 12px; padding: 10px 16px; }
  .team-wrap { width: 98%; }
  .team-grid { grid-template-columns: 1fr; }
  .card { max-width: 100%; }
  .about-wrap { width: 98%; }
  .devlogs-wrap { width: 98%; }
  .note { max-width: 100%; }
}


/* =============================================
   Page-Specific: About / Game Description
   ============================================= */
.about-wrap {
  position: relative;
  z-index: 15;
  width: 620px;
  max-width: 96%;
  margin: 30px auto 60px;
}

.about-body {
  padding: 0 !important;
  font-family: var(--font-pixel);
  font-size: 20px;
  line-height: 1.6;
  color: #000;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      #e0dfe0 27px,
      #e0dfe0 28px
    ),
    #fff;
}

/* --- Marquee banner --- */
.retro-marquee {
  overflow: hidden;
  background: #000080;
  color: #ff0;
  font-family: var(--font-pixel);
  font-size: 18px;
  padding: 4px 0;
  white-space: nowrap;
  border-bottom: 2px dashed #ff0;
}

.retro-marquee__text {
  display: inline-block;
  animation: marqueeScroll 14s linear infinite;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Retro dividers --- */
.retro-hr {
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: #808080;
  padding: 4px 0;
  letter-spacing: 2px;
  user-select: none;
}

.retro-hr--stars {
  color: #ff0000;
  font-size: 10px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,0,0,.08), transparent);
}

/* --- Content sections --- */
.about-section {
  padding: 10px 18px;
}

.about-section p {
  margin: 6px 0;
}

/* --- Headings --- */
.about-heading {
  font-family: var(--font-pixel);
  font-size: 28px;
  text-align: center;
  color: #000080;
  text-shadow: 1px 1px 0 #c0c0c0;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

/* --- Greeting --- */
.about-greeting {
  font-size: 24px;
  text-align: center;
  color: #000;
}

/* --- Blink effect (90s classic) --- */
.retro-blink {
  animation: retroBlink 1s step-end infinite;
  color: #ff0000;
  font-weight: 700;
}

@keyframes retroBlink {
  0%, 100% { color: #ff0000; }
  50%      { color: #ff8c00; }
}

/* --- Highlight spans --- */
.retro-highlight {
  background: #ff0;
  color: #000;
  padding: 0 3px;
  font-weight: 700;
  box-shadow: 1px 1px 0 #808080;
}

.retro-highlight--star {
  background: linear-gradient(90deg, #ff0, #ffa500);
  color: #800000;
  font-size: 1.1em;
}

/* --- Footer area --- */
.retro-footer {
  text-align: center;
  padding: 14px 18px 20px;
  border-top: 2px solid #c0c0c0;
  background: #e8e8e8;
}

.retro-counter {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: #008000;
  background: #000;
  display: inline-block;
  padding: 3px 12px;
  border: 2px inset #808080;
  margin-bottom: 6px;
}

.retro-stamp {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: #808080;
  margin: 4px 0 10px;
}

.retro-back {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 20px;
  color: #000;
  background: var(--accent);
  padding: 6px 18px;
  border: 2px outset #ff6666;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.retro-back:hover {
  transform: scale(1.06);
}

/* --- Nav buttons row (homepage) --- */
.cta-row {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 16px;
}


/* =============================================
   Page-Specific: Devlogs — Crumpled Paper Notes
   ============================================= */
.devlogs-wrap {
  position: relative;
  z-index: 15;
  width: 640px;
  max-width: 96%;
  margin: 30px auto 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.devlogs-title {
  font-family: var(--font-pixel);
  font-size: 42px;
  color: #fff;
  text-shadow:
    2px 2px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
  letter-spacing: 3px;
  text-align: center;
}

/* --- Individual note card --- */
.note {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 28px 24px 22px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 25px,
      rgba(0, 0, 0, .04) 25px,
      rgba(0, 0, 0, .04) 26px
    ),
    linear-gradient(135deg, #fdf6e3 0%, #f5edda 40%, #efe4c8 70%, #f8f0dc 100%);
  border: 1px solid #d4c9a8;
  box-shadow:
    3px 3px 8px rgba(0, 0, 0, .25),
    inset 0 0 40px rgba(0, 0, 0, .03);
  font-family: var(--font-pixel);
  font-size: 19px;
  line-height: 1.6;
  color: #2a2a2a;
  transition: transform var(--transition-fast);
}

.note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(0,0,0,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(0,0,0,.03) 0%, transparent 40%);
  pointer-events: none;
}

/* Slight tilts for scattered look */
.note--tilt-r { transform: rotate(.8deg); }
.note--tilt-l { transform: rotate(-.6deg); }
.note--tilt-r:hover { transform: rotate(0deg) scale(1.01); }
.note--tilt-l:hover { transform: rotate(0deg) scale(1.01); }

/* Pushpin */
.note__pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 40% 35%, #ff4444, #aa0000);
  border-radius: 50%;
  border: 2px solid #880000;
  box-shadow: 1px 2px 4px rgba(0,0,0,.4);
  z-index: 2;
}

/* Tape strips */
.note__tape {
  position: absolute;
  width: 60px;
  height: 20px;
  background: rgba(255, 255, 200, .55);
  border: 1px solid rgba(200, 190, 140, .4);
  z-index: 2;
}

.note__tape--tr {
  top: 6px;
  right: -10px;
  transform: rotate(32deg);
}

.note__tape--bl {
  bottom: 8px;
  left: -8px;
  transform: rotate(-20deg);
}

/* Date stamp */
.note__date {
  font-size: 14px;
  color: #999;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

/* Note heading */
.note__heading {
  font-family: var(--font-pixel);
  font-size: 26px;
  color: #1a1a8a;
  margin-bottom: 6px;
  text-decoration: underline;
  text-decoration-color: rgba(26, 26, 138, .3);
  text-underline-offset: 3px;
}

.note p {
  margin: 0;
}

/* Back button container */
.devlogs-back {
  text-align: center;
  margin-top: 8px;
}
