/* ============================================================
   CUSTOM FONTS
   Drop the font files at the paths below and they'll load on page load.
   Falls back to Cascadia Mono / monospace if the files are missing.
   ============================================================ */
@font-face {
  font-family: 'Arialic Hollow';
  src: url('fonts/arialic-hollow.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Minecraft';
  src: url('fonts/minecraft.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, 'Courier New', monospace;
  overflow: hidden;
}

.screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

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

/* used to apply a class change without triggering its CSS transition */
.no-anim {
  transition: none !important;
}

/* ============================================================
   UNIFIED BUTTON STYLES
   ============================================================ */
.btn,
.enter,
.click-me,
.nav-btn,
.menu-btn,
.social-link {
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font: inherit;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, 'Courier New', monospace;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover, .btn:focus-visible,
.enter:hover, .enter:focus-visible,
.click-me:hover, .click-me:focus-visible,
.nav-btn:hover, .nav-btn:focus-visible,
.menu-btn:hover, .menu-btn:focus-visible,
.social-link:hover, .social-link:focus-visible {
  background: #fff;
  color: #000;
  border-color: #fff;
  outline: none;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

/* arrows — thicker static triangles, no bounce animation */
.arrow {
  display: inline-block;
  font-size: 0.9em;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  top: -0.05em;
}

.arrow-down  { margin-left: 0.5rem; }
.arrow-up    { margin-left: 0.5rem; }
.arrow-left  { margin-right: 0.5rem; }

/* ============================================================
   LANDING / ENTRANCE
   ============================================================ */
#landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.enter {
  font-size: 1.25rem;
  padding: 0.75rem 1.5rem;
}

.flash-warning {
  margin: 0;
  padding: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.flash-warning-icon {
  font-size: 0.85rem;
  letter-spacing: 0;
  color: rgba(255, 200, 90, 0.55);
}

/* ============================================================
   HOME SCREEN
   ============================================================ */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 0;
}

.welcome {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, monospace;
  font-size: clamp(4rem, 14vw, 11rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  white-space: pre;
  text-align: center;
  display: inline-block;
  color: #ffffff;
  /* welcome sits directly in #main's stacking context next to bg-video,
     so the difference blend inverts the full glyph shapes against it */
  mix-blend-mode: difference;
  backface-visibility: visible;
  will-change: transform;
}

/* spin only kicks in once the user clicks entrance, so it always starts
   at 0deg (facing forward) rather than wherever a continuous loop happened
   to land while they were on the landing screen */
.welcome.spinning {
  animation: welcome-spin 5s linear infinite;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes welcome-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

#main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 30;
  /* perspective lives on #main so the welcome's rotateY has depth without
     introducing an intermediate stacking context (which would break the blend) */
  perspective: 1600px;
  perspective-origin: 50% 50%;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}

#main.slide-up {
  transform: translateY(-100%);
}

.click-me {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  padding: 0.5rem 1.2rem;
  z-index: 4;
  /* opacity needs its own transition so the 3s-delay first-visit reveal fades */
  transition: opacity 0.6s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.click-me:hover, .click-me:focus-visible {
  transform: translateX(-50%);
}

.click-me.hidden-initial {
  opacity: 0;
  pointer-events: none;
  /* no fade-OUT when the class is initially applied — only fade-IN when removed */
  transition: none;
}

/* ============================================================
   MENU SCREEN
   ============================================================ */
#menuScreen {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(80, 30, 140, 0.50), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(190, 50, 130, 0.32), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(30, 70, 170, 0.45), transparent 60%),
    radial-gradient(ellipse at 95% 10%, rgba(40, 200, 220, 0.18), transparent 55%),
    #03020a;
  z-index: 20;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  overflow: hidden;
}

#menuScreen.show {
  opacity: 1;
  pointer-events: auto;
}

/* vignette */
#menuScreen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 35%,
    rgba(0, 0, 0, 0.55) 80%,
    rgba(0, 0, 0, 0.85) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* starfield */
.space-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.stars {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.stars-small  { animation: drift-a 220s ease-in-out infinite; }
.stars-medium { animation: drift-b 140s ease-in-out infinite; }
.stars-large  { animation: drift-c  90s ease-in-out infinite; }

@keyframes drift-a {
  0%, 100% { translate: 0 0; }
  50%      { translate: -40px 25px; }
}
@keyframes drift-b {
  0%, 100% { translate: 0 0; }
  50%      { translate: 35px -20px; }
}
@keyframes drift-c {
  0%, 100% { translate: 0 0; }
  50%      { translate: -15px 12px; }
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle ease-in-out infinite;
}

.stars-small .star  { width: 1px; height: 1px; opacity: 0.7; }
.stars-medium .star { width: 2px; height: 2px; box-shadow: 0 0 4px rgba(255, 255, 255, 0.8); }
.stars-large  .star { width: 3px; height: 3px; box-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 22px rgba(180, 150, 255, 0.55); }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* nav buttons (top-of-screen back/click-me on the menu) */
.nav-btn-top {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  padding: 0.45rem 1.2rem;
  z-index: 4;
}

.nav-btn-top:hover, .nav-btn-top:focus-visible {
  transform: translateX(-50%);
}

#menuScreen[data-view="main"] #viewBackBtn { display: none; }
#menuScreen:not([data-view="main"]) #backBtn { display: none; }

.view-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.menu-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 4.5rem 1.5rem 2rem;
  box-sizing: border-box;
}

#menuScreen.show[data-view="main"]    .view-main,
#menuScreen.show[data-view="socials"] .view-socials,
#menuScreen.show[data-view="friends"] .view-friends {
  opacity: 1;
  pointer-events: auto;
}

#menuScreen:not(.show) #backBtn,
#menuScreen:not(.show) #viewBackBtn {
  display: none;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: center;
}

.menu-btn {
  font-size: 1.4rem;
  padding: 0.85rem 0;
  width: 240px;
}

.view-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  margin: 0 0 1.6rem;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
}

.socials-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(440px, 92vw);
  align-items: stretch;
}

.socials-list li { display: flex; }

.social-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0.95rem 1.4rem;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-align: left;
}

.social-link:hover, .social-link:focus-visible {
  transform: translateX(4px);
}

.social-name { font-weight: 700; }

.social-handle {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.social-link:hover .social-handle,
.social-link:focus-visible .social-handle {
  color: rgba(0, 0, 0, 0.6);
}

/* ============================================================
   DATE / TIME (top-right of menu)
   ============================================================ */
.date-time {
  position: fixed;
  top: 1rem;
  right: 1.2rem;
  z-index: 50;
  text-align: right;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, 'Courier New', monospace;
  pointer-events: none;
}

.dt-time {
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.dt-date {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.18rem;
}

/* ============================================================
   AUDIO BAR (bottom-right of menu): viz, now-playing, volume
   ============================================================ */
.audio-bar {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  z-index: 50;
  width: min(360px, 70vw);
}

.audio-progress {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.audio-time {
  min-width: 2.6em;
  text-align: center;
}

.audio-time-current { color: #fff; }

/* The input element is 22px tall (generous hit target) but the visible
   track is rendered via pseudo-elements at 4px, vertically centered. */
.audio-scrubber {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 22px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}

.audio-scrubber::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #fff 0,
    #fff var(--seek-pct, 0%),
    rgba(255, 255, 255, 0.22) var(--seek-pct, 0%),
    rgba(255, 255, 255, 0.22) 100%
  );
  cursor: pointer;
}

.audio-scrubber::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #fff 0,
    #fff var(--seek-pct, 0%),
    rgba(255, 255, 255, 0.22) var(--seek-pct, 0%),
    rgba(255, 255, 255, 0.22) 100%
  );
  cursor: pointer;
}

.audio-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  /* center the thumb on the 4px track inside a 22px-tall input */
  margin-top: -4px;
}

.audio-scrubber::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  justify-content: flex-end;
}

.viz-canvas {
  display: block;
  width: 80px;
  height: 22px;
  opacity: 0.85;
}

.now-playing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  line-height: 1.15;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

.np-label {
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.np-title {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}

.np-artist {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

.volume-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.volume-slider {
  width: 0;
  opacity: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: linear-gradient(
    to right,
    #fff 0,
    #fff var(--vol-pct, 60%),
    rgba(255, 255, 255, 0.22) var(--vol-pct, 60%),
    rgba(255, 255, 255, 0.22) 100%
  );
  border-radius: 2px;
  outline: none;
  pointer-events: none;
  cursor: pointer;
  transition: width 0.25s ease, opacity 0.22s ease, margin 0.25s ease;
}

.volume-control:hover .volume-slider,
.volume-control:focus-within .volume-slider {
  width: 90px;
  opacity: 1;
  margin-right: 0.55rem;
  pointer-events: auto;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

/* hide audio-bar/date-time when menu isn't visible */
#menuScreen:not(.show) ~ .audio-bar,
#menuScreen:not(.show) ~ .date-time,
#menuScreen:not(.show) .audio-bar,
#menuScreen:not(.show) .date-time {
  display: none;
}

/* ============================================================
   CORNER ICON BUTTONS (info bottom-left)
   ============================================================ */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: #fff;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, 'Courier New', monospace;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover, .icon-btn:focus-visible {
  background: #fff;
  color: #000;
  border-color: #fff;
  outline: none;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

.corner-btn {
  position: fixed;
  bottom: 1rem;
  z-index: 50;
}

.info-btn { left: 1rem; }

/* the "different i" — serif italic, distinct from the menu's mono font */
.info-glyph {
  font-family: 'Minecraft', Georgia, 'Times New Roman', serif;
  font-style: normal;
  font-weight: normal;
  font-size: 1.2rem;
  line-height: 1;
  transform: translateY(-1px);
}

.mute-btn .mute-icon-off { display: none; }
.mute-btn.muted .mute-icon-on { display: none; }
.mute-btn.muted .mute-icon-off { display: inline-block; }

/* play/pause button — pause icon shown while playing, play icon when paused */
.play-pause-btn .pp-icon-play { display: none; }
.play-pause-btn.paused .pp-icon-pause { display: none; }
.play-pause-btn.paused .pp-icon-play { display: inline-block; }

#menuScreen:not(.show) .corner-btn { display: none; }

/* ============================================================
   INFO OVERLAY
   ============================================================ */
.info-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
  box-sizing: border-box;
}

.info-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.info-card {
  position: relative;
  width: min(460px, 92vw);
  background: #050507;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 2.2rem 2rem 1.6rem;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, 'Courier New', monospace;
  color: #fff;
  box-sizing: border-box;
  transform: translateY(8px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.info-overlay.show .info-card {
  transform: translateY(0);
}

.info-close {
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-family: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.2s ease;
}

.info-close:hover, .info-close:focus-visible {
  color: #fff;
  outline: none;
}

.info-title {
  margin: 0 0 1.4rem;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.info-section { margin: 0 0 1.2rem; }

.info-heading {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.info-list kbd {
  display: inline-block;
  padding: 0.05em 0.45em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: inherit;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}

.info-credit {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
}

.info-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.info-link:hover, .info-link:focus-visible {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.7);
  outline: none;
}

/* ============================================================
   SECRET / KONAMI VIDEO
   ============================================================ */
.secret {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 100;
}

/* ============================================================
   MOBILE WARNING POPUP
   ============================================================ */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.2rem;
  box-sizing: border-box;
}

.mobile-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-card {
  width: min(380px, 100%);
  background: #050507;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 2rem 1.6rem;
  font-family: 'Minecraft', 'Cascadia Mono', Consolas, monospace;
  color: #fff;
  text-align: center;
  box-sizing: border-box;
}

.mobile-title {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.mobile-message {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.mobile-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.55rem 1.6rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mobile-btn:hover, .mobile-btn:focus-visible {
  background: #fff;
  color: #000;
  border-color: #fff;
  outline: none;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}
