﻿*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* 0.8 overlay leaves the initial background at 0.2 visual opacity. */
  --initial-overlay-opacity: 0.8;
  --site-global-dim-opacity: 0.1;
}

button,
img,
a {
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#intro-stage,
#loading-screen,
#story-stage {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img,
svg {
  -webkit-user-drag: none;
}

button:focus {
  outline: none;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  background: #000;
  overflow-x: hidden;
  font-synthesis-weight: none;
  font-family: "Nunito", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, var(--site-global-dim-opacity));
  z-index: 5000;
}

body.intro-world-active {
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  html,
  body,
  body * {
    cursor: none !important;
  }
}

/* Intro stage (sofi world) */
#intro-stage {
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.45s ease;
  background: #000;
  overflow: hidden;
}

#intro-stage.hidden {
  opacity: 0;
  pointer-events: none;
}

#cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  background: rgba(255, 179, 198, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: screen;
  contain: layout style paint;
  will-change: transform, width, height;
  backface-visibility: hidden;
}

#cursor.hovering {
  width: 28px;
  height: 28px;
  background: rgba(255, 179, 198, 0.25);
}

#cursor.pressing {
  width: 34px;
  height: 34px;
  background: rgba(255, 179, 198, 0.18);
}

#canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  contain: strict;
}

.blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: none;
}

#blob-a {
  width: 600px;
  height: 600px;
  left: -150px;
  top: -150px;
  background: radial-gradient(circle, rgba(255, 80, 140, 0.13), transparent 65%);
  --op: 0.36;
  --tx: 20px;
  --ty: 15px;
  filter: blur(45px);
  animation-delay: -3s;
}

#blob-b {
  width: 500px;
  height: 500px;
  right: -100px;
  bottom: -100px;
  background: radial-gradient(circle, rgba(180, 130, 255, 0.1), transparent 65%);
  --op: 0.28;
  --tx: -25px;
  --ty: -18px;
  filter: blur(55px);
  animation-delay: -5s;
  animation-duration: 11s;
}

#blob-c {
  width: 300px;
  height: 300px;
  left: 44%;
  top: 28%;
  background: radial-gradient(circle, rgba(255, 200, 100, 0.06), transparent 65%);
  --op: 0.2;
  --tx: 10px;
  --ty: -10px;
  filter: blur(65px);
  animation-duration: 14s;
  animation-delay: -8s;
}

@keyframes blob-breathe {
  0%, 100% {
    transform: scale(1) translate(0, 0);
    opacity: var(--op);
  }
  50% {
    transform: scale(1.15) translate(var(--tx), var(--ty));
    opacity: var(--op);
  }
}

#opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  gap: 1.2rem;
}

#opening[hidden] {
  display: none !important;
}

.open-line {
  font-family: "Caveat", cursive;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: rgba(255, 179, 198, 0);
  text-align: center;
  letter-spacing: 0.05em;
  transition: color 1.4s ease;
}

.open-line.vis {
  color: rgba(255, 179, 198, 0.68);
}

.open-line.gone {
  color: rgba(255, 179, 198, 0);
}

#world {
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2.8s ease;
}

#world.alive {
  opacity: 1;
  pointer-events: auto;
}

.layer {
  position: absolute;
  inset: 0;
  will-change: transform;
  contain: layout style paint;
}

.molang {
  position: absolute;
  cursor: pointer;
  transform-origin: center bottom;
  outline: none;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.molang img {
  display: block;
  transition: filter 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.molang:hover img,
.molang:focus-visible img {
  filter: drop-shadow(0 0 22px rgba(255, 179, 198, 0.85)) brightness(1.15);
  transform: scale(1.07);
}

#m-cat {
  top: 6%;
  left: calc(50% - 45px);
  animation: fe 3.5s ease-in-out 0.2s infinite;
}

#m-kiss {
  top: 30%;
  left: 4%;
  animation: fc 3.1s ease-in-out 0.5s infinite;
}

#m-bye {
  top: 28%;
  right: 3%;
  animation: fd 2.9s ease-in-out 0.8s infinite;
}

#m-white {
  bottom: 17%;
  left: 5%;
  animation: fa 2.7s ease-in-out 0s infinite;
}

#m-coffee {
  bottom: 14%;
  left: 35%;
  animation: fb 3.3s ease-in-out 0.3s infinite;
}

#m-brown {
  bottom: 17%;
  right: 4%;
  animation: fe 2.8s ease-in-out 0.7s infinite;
}

@keyframes fa {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-16px) rotate(1.5deg); }
}

@keyframes fb {
  0%, 100% { transform: translateY(-4px) rotate(1deg); }
  50% { transform: translateY(10px) rotate(-2deg); }
}

@keyframes fc {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  33% { transform: translateY(-13px) rotate(-1deg); }
  66% { transform: translateY(6px) rotate(1.5deg); }
}

@keyframes fd {
  0%, 100% { transform: translateY(-8px) rotate(-2deg); }
  50% { transform: translateY(8px) rotate(2deg); }
}

@keyframes fe {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  50% { transform: translateY(-11px) rotate(-1.5deg) scale(1.03); }
}

.note {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  display: block;
  white-space: nowrap;
  font-family: "Caveat", cursive;
  font-size: 0.93rem;
  color: rgba(255, 220, 230, 0.85);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 179, 198, 0.22);
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(8px);
  z-index: 30;
}

#poem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

.poem-line {
  font-family: "Caveat", cursive;
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  color: rgba(255, 255, 255, 0);
  line-height: 1.65;
  transition: color 1.3s ease, text-shadow 1.3s ease;
}

.poem-line.lit {
  color: rgba(255, 235, 242, 0.88);
  text-shadow: 0 0 40px rgba(255, 179, 198, 0.4), 0 0 80px rgba(255, 179, 198, 0.15);
}

.poem-sig {
  font-family: "Caveat", cursive;
  font-size: clamp(1.1rem, 2.5vw, 1.7rem);
  color: rgba(255, 180, 198, 0);
  margin-top: 0.9rem;
  transition: color 1.4s ease 0.8s;
}

.poem-sig.lit {
  color: rgba(255, 180, 198, 0.7);
}

.poem-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 220px;
  background: radial-gradient(ellipse, rgba(255, 80, 150, 0.07) 0%, transparent 70%);
  filter: blur(35px);
  pointer-events: none;
  z-index: 9;
  animation: pglow 4s ease-in-out infinite;
}

@keyframes pglow {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18);
  }
}

#scooter-wrap {
  position: absolute;
  bottom: 13%;
  left: -180px;
  z-index: 8;
  pointer-events: none;
}

#scooter-wrap img {
  display: block;
  width: 130px;
}

#scooter-wrap.riding {
  animation: scoot 4.5s linear forwards;
}

@keyframes scoot {
  0% { left: -180px; }
  100% { left: calc(100vw + 60px); }
}

#hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.1);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

#hint.show {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  body.intro-world-active {
    cursor: auto;
  }

  #cursor {
    display: none;
  }
}

/* VIDEO BACKGROUND */

#video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.35s ease;
}

#video-bg.hidden {
  opacity: 0;
  pointer-events: none;
}

#video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: 177.78vh;
  height: 100vh;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
  background: #000;
}

/* OVERLAY */

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--initial-overlay-opacity));
  z-index: 1;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease;
}

#overlay.visible {
  opacity: 1;
}

/* SPARKLES */

#sparkles-container {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  pointer-events: none;
  animation: sparkle-appear 2.8s ease-out forwards;
  will-change: transform, opacity;
}

.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  background: rgba(255, 182, 193, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 4px 1px rgba(255, 140, 200, 0.5);
}

.sparkle::before {
  width: 3px;
  height: 3px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sparkle::after {
  width: 2px;
  height: 2px;
  top: calc(50% - 5px);
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes sparkle-appear {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  15% { opacity: 1; transform: scale(1.2) rotate(45deg); }
  70% { opacity: 0.8; transform: scale(1) rotate(135deg); }
  100% { opacity: 0; transform: scale(0) rotate(180deg); }
}

/* CONTENT (intro) */

#content {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 52px;
  transition: opacity 0.45s ease, transform 0.45s ease;
  padding: 24px 18px;
}

#content.hide {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  pointer-events: none;
}

#intro-sofi {
  width: min(360px, 72vw);
  max-height: 48vh;
  object-fit: contain;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 1s ease, transform 1s ease;
  user-select: none;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform, opacity;
}

#intro-sofi.visible {
  opacity: 1;
  animation: sofiFlagWave 4.2s ease-in-out infinite;
}

@keyframes sofiFlagWave {
  0% { transform: translateY(0) scale(1) rotate(0deg) skewX(0deg) skewY(0deg); }
  20% { transform: translateY(-4px) scale(1.01) rotate(-1.2deg) skewX(1.5deg) skewY(-0.8deg); }
  40% { transform: translateY(2px) scale(1) rotate(1deg) skewX(-1.2deg) skewY(0.7deg); }
  60% { transform: translateY(-3px) scale(1.015) rotate(-0.8deg) skewX(1deg) skewY(-0.5deg); }
  80% { transform: translateY(2px) scale(1) rotate(0.8deg) skewX(-0.8deg) skewY(0.5deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg) skewX(0deg) skewY(0deg); }
}

#typed-text {
  font-family: 'Tenor Sans', sans-serif;
  font-size: clamp(13px, 2vw, 22px);
  font-weight: 400;
  letter-spacing: 0.52em;
  color: #fff;
  text-transform: lowercase;
  min-height: 48px;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 4px rgba(255, 182, 193, 0.45));
  text-shadow:
    0 0 4px rgba(255, 182, 193, 0.72),
    0 0 12px rgba(255, 182, 193, 0.42),
    0 0 24px rgba(255, 182, 193, 0.30);
}

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(7px);
  will-change: transform, opacity;
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.char.show {
  opacity: 1;
  transform: translateY(0);
  text-shadow:
    0 0 4px rgba(255, 182, 193, 0.95),
    0 0 12px rgba(255, 182, 193, 0.7),
    0 0 24px rgba(255, 182, 193, 0.5);
}

.char-float {
  display: inline-block;
}

.char.show .char-float {
  animation: floatLetter 3.4s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

@keyframes floatLetter {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-5px) rotate(-0.35deg); }
  62% { transform: translateY(3px) rotate(0.35deg); }
}

#enter-btn {
  opacity: 0;
  transform: translateY(10px);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 60, 200, 0.867);
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Source Code Pro', monospace;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 8px 4px;
  text-transform: lowercase;
  transition: opacity 1s ease, transform 1s ease, color 0.35s ease, border-color 0.35s ease, text-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

#enter-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

#enter-btn:hover {
  color: rgba(238, 218, 255, 0.9);
  border-bottom-color: rgba(211, 153, 255, 0.74);
  text-shadow: 0 0 12px rgba(181, 81, 255, 0.55);
}

#enter-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 130, 200, 0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#enter-btn:active::after {
  opacity: 1;
}

/* EXIT OVERLAY */

#exit-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#exit-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* LOADING SCREEN */

#loading-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(86, 24, 125, 0.16), rgba(0, 0, 0, 0.94) 58%, #000 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

#loading-screen.show {
  display: flex;
  opacity: 1;
}

#sofi-card {
  width: min(520px, calc(100vw - 46px));
  min-height: 214px;
  display: grid;
  grid-template-columns: 144px 1fr;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  background: rgba(8, 6, 13, 0.84);
  border: 1px solid rgba(213, 149, 255, 0.28);
  box-shadow:
    0 0 22px rgba(160, 72, 255, 0.24),
    0 0 60px rgba(112, 26, 170, 0.18),
    inset 0 0 24px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(10px) scale(0.96);
  animation: cardIn 0.5s ease forwards, cardGlow 2.8s ease-in-out infinite;
}

@media (max-width: 480px) {
  #sofi-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: unset;
    gap: 14px;
    padding: 20px 16px;
  }

  .profile-side {
    flex-direction: row !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(225, 182, 255, 0.12);
    padding-right: 0 !important;
    padding-bottom: 14px;
    justify-content: flex-start !important;
    gap: 14px !important;
  }

  .terminal-side {
    min-width: unset;
  }
}

@keyframes cardIn {
  to { transform: translateY(0) scale(1); }
}

@keyframes cardGlow {
  0%, 100% {
    box-shadow: 0 0 22px rgba(160, 72, 255, 0.24), 0 0 60px rgba(112, 26, 170, 0.18), inset 0 0 24px rgba(255, 255, 255, 0.025);
  }
  50% {
    box-shadow: 0 0 30px rgba(184, 96, 255, 0.34), 0 0 80px rgba(144, 47, 214, 0.24), inset 0 0 30px rgba(255, 255, 255, 0.035);
  }
}

.profile-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-right: 1px solid rgba(225, 182, 255, 0.12);
  padding-right: 18px;
}

.avatar-wrap {
  width: 82px;
  height: 82px;
  position: relative;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, rgba(255, 31, 184, 0.95), rgba(211, 30, 243, 0.55));
  box-shadow: 0 0 20px rgba(246, 16, 234, 0.45);
  animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(246, 16, 234, 0.45); }
  50% { box-shadow: 0 0 32px rgba(246, 16, 234, 0.65); }
}

#discord-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #18131f;
}

#discord-avatar-decoration {
  position: absolute;
  inset: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.avatar-fallback {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Tenor Sans', sans-serif;
  font-size: 31px;
  color: rgba(250, 239, 255, 0.95);
  background: linear-gradient(135deg, #1f172b, #3b1758);
  text-shadow: 0 0 12px rgba(255, 5, 197, 0.55);
}

.avatar-fallback.show {
  display: flex;
}

#loading-profile-name {
  font-family: 'Tenor Sans', sans-serif;
  color: rgba(234, 234, 234, 0.938);
  font-size: 14px;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  text-shadow: 0 0 10px rgba(255, 93, 242, 0.706);
}

#loading-profile-user {
  font-family: "Source Code Pro", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 210, 236, 0.72);
  text-shadow: 0 0 8px rgba(255, 93, 242, 0.35);
  margin-top: -4px;
}

.terminal-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.terminal-top {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  opacity: 0.82;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 12, 206, 0.55);
  box-shadow: 0 0 8px rgba(128, 15, 100, 0.5);
}

.terminal-title {
  margin-left: 6px;
  font-family: 'Source Code Pro', monospace;
  color: rgba(213, 60, 185, 0.48);
  font-size: 9px;
  letter-spacing: 0.08em;
}

#terminal-lines {
  min-height: 128px;
  white-space: pre-wrap;
  font-family: 'Source Code Pro', monospace;
  color: rgba(184, 47, 140, 0.86);
  font-size: clamp(10px, 2.35vw, 12px);
  line-height: 1.7;
  text-shadow: 0 0 10px hsla(295, 100%, 60%, 0.38);
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 2px;
  background: rgba(194, 31, 151, 0.78);
  box-shadow: 0 0 9px rgba(177, 27, 142, 0.65);
  animation: blink 0.78s steps(2, start) infinite;
  vertical-align: -2px;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* FINAL BLACK */

#final-black {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease;
}

#final-black.show {
  opacity: 1;
  pointer-events: all;
}

/* STORY STAGE */

#story-stage {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: none;
  background: #000;
  overflow: hidden;
}

#story-stage.show {
  display: block;
}

.story-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.story-scene.show {
  opacity: 1;
  pointer-events: auto;
}

#letter-scene {
  padding: 28px;
  flex-direction: column;
  gap: 20px;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(60, 10, 40, 0.6) 0%, transparent 70%);
}

#letter-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 50% 50%, rgba(255, 130, 180, 0.06) 0%, transparent 70%);
  animation: letterAmbient 3s ease-in-out infinite;
}

@keyframes letterAmbient {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

#letter-hint {
  font-family: 'Source Code Pro', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 180, 210, 0.38);
  text-transform: lowercase;
  animation: hintPulse 2.2s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}

#letter-button {
  border: none;
  background: transparent;
  transform: rotate(-8deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

#letter-button:hover {
  transform: rotate(-5deg) scale(1.04);
  filter: drop-shadow(0 0 22px rgba(255, 182, 193, 0.28));
}

#letter-button.opening {
  animation: letterOpen 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes letterOpen {
  0% { transform: rotate(-8deg) scale(1); filter: brightness(1); }
  30% { transform: rotate(2deg) scale(1.06); filter: brightness(1.2) drop-shadow(0 0 30px rgba(255, 182, 193, 0.5)); }
  60% { transform: rotate(-3deg) scale(1.04); filter: brightness(1.4) drop-shadow(0 0 40px rgba(255, 130, 180, 0.7)); }
  100% { transform: rotate(-8deg) scale(2) translateY(-20px); opacity: 0; filter: brightness(2); }
}

#letter-image {
  display: block;
  width: min(360px, 78vw);
  max-height: 72vh;
  object-fit: contain;
  user-select: none;
}

.content-root {
  width: 100vw;
  min-height: 100dvh;
  background: radial-gradient(ellipse 130% 80% at 50% 10%, #2a0d1e 0%, #160811 40%, #0a040e 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.8s ease;
  contain: layout paint;
}

.content-root.closing {
  opacity: 0;
}

.soft-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 50% 70%, rgba(160, 40, 100, 0.07) 0%, transparent 70%);
}

.floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  contain: paint;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  opacity: 0;
  animation-name: heart-float;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

@keyframes heart-float {
  0% { transform: translateY(0) scale(0.7) rotate(0deg); opacity: 0; }
  12% { opacity: 0.55; }
  100% { transform: translateY(-110vh) scale(1.25) rotate(18deg); opacity: 0; }
}

.heart-burst {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  animation: heartBurst 0.55s ease-out forwards;
}

@keyframes heartBurst {
  0% { transform: scale(0) translateY(0); opacity: 0.85; }
  50% { transform: scale(1.2) translateY(-8px); opacity: 0.6; }
  100% { transform: scale(2) translateY(-20px); opacity: 0; }
}

.page-arrow {
  position: absolute;
  top: 50%;
  width: clamp(46px, 6vw, 64px);
  height: clamp(58px, 7vw, 78px);
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  background: none;
  border: none;
  z-index: 10;
  padding: 16px 8px;
  transition: opacity 0.25s ease;
}

.page-arrow:hover {
  opacity: 1 !important;
}

.page-arrow.left {
  left: clamp(6px, 1.5vw, 18px);
}

.page-arrow.right {
  right: clamp(6px, 1.5vw, 18px);
}

.page-arrow img {
  width: clamp(28px, 4vw, 44px);
  height: clamp(28px, 4vw, 44px);
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.75;
  pointer-events: none;
}

.page-arrow.right img {
  animation: page-arrow-pulse 2.2s ease-in-out infinite;
}

.page-arrow.left img {
  animation: page-arrow-pulse-left 2.2s ease-in-out infinite;
  transform: scaleX(-1);
}

@keyframes page-arrow-pulse {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(5px); opacity: 0.95; }
}

@keyframes page-arrow-pulse-left {
  0%, 100% { transform: scaleX(-1) translateX(0); opacity: 0.55; }
  50% { transform: scaleX(-1) translateX(5px); opacity: 0.95; }
}

.page-dots {
  position: absolute;
  top: clamp(10px, 2vh, 18px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.page-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 182, 219, 0.22);
  transition: all 0.3s ease;
}

.page-dot.active {
  width: 18px;
  background: rgba(255, 140, 195, 0.85);
}

.page-wrap {
  width: 100%;
  max-width: 940px;
  padding: clamp(14px, 2.5vw, 28px) clamp(44px, 6vw, 64px);
  position: relative;
  z-index: 2;
  contain: layout style paint;
}

.page-wrap.from-right {
  animation: fade-slide-in 0.4s ease forwards;
}

.page-wrap.from-left {
  animation: fade-slide-in-left 0.4s ease forwards;
}

@keyframes fade-slide-in {
  0% { opacity: 0; transform: translateX(24px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes fade-slide-in-left {
  0% { opacity: 0; transform: translateX(-24px); }
  100% { opacity: 1; transform: translateX(0); }
}

.profile-layout {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.profile-layout-single .letter-card {
  max-width: clamp(300px, 60vw, 520px);
}

.profile-card,
.letter-card,
.text-card {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 130, 180, 0.12);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(255, 105, 170, 0.06);
}

.profile-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 130, 180, 0.16);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: clamp(160px, 22vw, 200px);
  box-shadow: 0 0 40px rgba(255, 105, 170, 0.08);
  animation: glow-pulse 3.5s ease-in-out infinite;
}

.avatar,
.avatar-placeholder {
  width: clamp(88px, 13vw, 126px);
  height: clamp(88px, 13vw, 126px);
  border-radius: 50%;
}

.avatar {
  object-fit: cover;
  animation: avatar-glow 3.5s ease-in-out infinite;
}

.avatar-display {
  position: relative;
  width: clamp(88px, 13vw, 126px);
  height: clamp(88px, 13vw, 126px);
}

.avatar-frame {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: contain;
  pointer-events: none;
}

.avatar-placeholder {
  background: radial-gradient(ellipse at center, rgba(255, 130, 180, 0.1) 0%, rgba(255, 130, 180, 0.03) 100%);
  border: 1.5px solid rgba(255, 130, 180, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-placeholder img {
  width: 50%;
}

.profile-name {
  color: rgba(255, 230, 242, 0.9);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 2.2vw, 19px);
  letter-spacing: 0.07em;
}

.profile-user {
  color: rgba(255, 220, 240, 0.68);
  font-family: "Source Code Pro", monospace;
  font-size: clamp(10px, 1.2vw, 12px);
  margin-top: -7px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-text {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-family: "Nunito", sans-serif;
}

.activity {
  color: rgba(255, 200, 220, 0.45);
  font-size: 11px;
  font-family: "Nunito", sans-serif;
  text-align: center;
  max-width: 160px;
  line-height: 1.4;
}

.bear {
  width: clamp(44px, 7vw, 64px);
  border-radius: 8px;
  opacity: 0.88;
  margin-top: 4px;
}

.letter-card {
  padding: clamp(20px, 3vw, 36px);
  max-width: clamp(260px, 45vw, 380px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.letter-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.letter-title-row img {
  width: 20px;
  animation: float-gentle 2.5s ease-in-out infinite;
}

.profile-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex: 0 0 auto;
}

.profile-badge-xs {
  width: 18px;
  height: 18px;
}

.profile-badge-sm {
  width: 22px;
  height: 22px;
}

.profile-badge-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 180, 210, 0.32);
}

.profile-badge-frame {
  position: absolute;
  inset: -25%;
  width: 150%;
  height: 150%;
  object-fit: contain;
  pointer-events: none;
}

.letter-title {
  color: #ff8cc8;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 2.2vw, 19px);
  animation: neon-pulse 4s ease-in-out infinite;
}

.letter-card p,
.text-card p {
  color: rgba(255, 245, 250, 0.75);
  font-family: "Nunito", sans-serif;
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 1.85;
  margin: 0;
}

.pink {
  color: #ff8cc8;
  font-weight: 800;
}

.text-layout {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.text-card {
  padding: clamp(20px, 3.5vw, 40px) clamp(18px, 3.5vw, 44px);
  max-width: 480px;
  flex: 1 1 260px;
  box-shadow: 0 0 50px rgba(255, 105, 170, 0.07);
  animation: textCardIn 0.5s ease forwards;
}

@keyframes textCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-label-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(10px, 1.5vw, 14px);
}

.section-label-row img {
  width: 16px;
  opacity: 0.65;
}

.section-label {
  color: rgba(255, 200, 220, 0.45);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(9px, 1.1vw, 11px);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.page-number {
  color: rgba(255, 200, 220, 0.2);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(9px, 1.1vw, 10px);
  letter-spacing: 0.2em;
  margin-bottom: clamp(8px, 1.2vw, 12px);
}

.text-card p {
  color: rgba(255, 245, 250, 0.8);
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.88;
  font-weight: 500;
}

.highlight-text {
  color: #ff8cc8;
  font-weight: 800;
  animation: neon-pulse 4s ease-in-out infinite;
}

.close-button {
  margin-top: clamp(16px, 2.5vw, 22px);
  background: rgba(255, 130, 180, 0.1);
  border: 1px solid rgba(255, 130, 180, 0.32);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: 0.15em;
  padding: 10px 26px;
  animation: fade-in-up 0.5s ease 0.3s both;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

.close-button:hover {
  background: rgba(255, 130, 180, 0.18);
  border-color: rgba(255, 130, 180, 0.5);
  transform: translateY(-1px);
}

.close-button img {
  width: 14px;
  height: 14px;
  mix-blend-mode: screen;
}

.slot-image {
  width: clamp(130px, 22vw, 220px);
  aspect-ratio: 4 / 5;
  max-height: min(52vh, 320px);
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 30px rgba(255, 130, 180, 0.2);
  border: 1px solid rgba(255, 130, 180, 0.15);
  flex: 0 0 auto;
  opacity: 0;
  animation: imageReveal 0.7s ease 0.2s forwards;
  content-visibility: auto;
}

@keyframes imageReveal {
  from { opacity: 0; transform: scale(0.95); filter: blur(4px); }
  to { opacity: 1; transform: scale(1); filter: blur(0px); }
}

.image-placeholder {
  width: clamp(110px, 20vw, 190px);
  height: clamp(130px, 24vw, 220px);
  border-radius: 16px;
  border: 1px dashed rgba(255, 130, 180, 0.25);
  background: rgba(255, 130, 180, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
}

.image-placeholder img {
  width: 36px;
  opacity: 0.4;
}

.image-placeholder span {
  color: rgba(255, 180, 210, 0.3);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-align: center;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 36px rgba(255, 105, 170, 0.06); }
  50% { box-shadow: 0 0 58px rgba(255, 105, 170, 0.16); }
}

@keyframes avatar-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 130, 180, 0); }
  50% { box-shadow: 0 0 28px rgba(255, 130, 180, 0.35); }
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes neon-pulse {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 140, 200, 0.18); }
  50% { text-shadow: 0 0 18px rgba(255, 140, 200, 0.55); }
}

@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

#contentRoot {
  display: none;
  opacity: 0;
}

#contentRoot.active {
  display: flex;
  opacity: 1;
  animation: interactiveSceneIn 0.7s ease forwards;
}

@keyframes interactiveSceneIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.swipe-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(255, 180, 210, 0.28);
  text-transform: lowercase;
  pointer-events: none;
  animation: fade-in-up 0.5s ease 1s both;
}

@media (pointer: fine) {
  .swipe-hint { display: none; }
}

/* =========================
   Windows Transition Scene
   ========================= */
#winx-stage {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  overflow: hidden;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background: #000;
}

#winx-stage.show {
  display: block;
}

.winx-intro {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  perspective: 1200px;
  background: #000;
}

.winx-intro::before,
.winx-intro::after {
  content: "";
  position: absolute;
  width: 100%;
  text-align: center;
  color: rgba(255, 105, 180, .28);
  font-size: clamp(26px, 5vw, 76px);
  letter-spacing: .35em;
  pointer-events: none;
  display: none;
}

.winx-intro::before { top: 10%; }
.winx-intro::after {
  bottom: 10%;
  animation-delay: -3.5s;
  transform: rotate(180deg);
}

@keyframes winxFlutuarDecor {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.winx-boot {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: none;
  opacity: 0;
  background: #000;
  transition: opacity .42s ease;
}

.winx-boot.show {
  display: block;
  opacity: 1;
}

#winx-boot-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.winx-carta {
  position: relative;
  width: min(86vw, 430px);
  min-height: 300px;
  padding: 34px 30px 26px;
  border-radius: 28px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,240,248,.92)),
    repeating-linear-gradient(-45deg, rgba(255,143,188,.18) 0 10px, transparent 10px 20px);
  border: 2px solid rgba(255,255,255,.86);
  box-shadow: 0 22px 60px rgba(172, 43, 101, 0.28), inset 0 0 0 1px rgba(255, 143, 188, .25);
  transform-style: preserve-3d;
  transform-origin: 50% 55%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: filter .25s ease;
  will-change: transform, clip-path, opacity;
  cursor: pointer;
}

.winx-carta::before,
.winx-carta::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.winx-carta::before {
  border-top: 2px dashed rgba(255, 95, 166, .32);
  transform: rotateX(62deg) translateZ(8px);
  transform-origin: top center;
}

.winx-carta::after {
  background:
    linear-gradient(135deg, transparent 49%, rgba(255, 95, 166, .22) 50%, transparent 51%),
    linear-gradient(45deg, transparent 49%, rgba(255, 95, 166, .18) 50%, transparent 51%);
  mix-blend-mode: multiply;
}

.winx-selinho {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 34% 25%, #fff 0 11%, transparent 12%), linear-gradient(135deg, #ff91bf, #ff5fa6);
  color: #fff;
  font-size: 34px;
  box-shadow: 0 12px 26px rgba(255, 95, 166, .35);
}

.winx-intro-warning {
  position: absolute;
  left: 50%;
  bottom: 16%;
  margin: 0;
  transform: translate(-50%, 10px);
  font: 900 clamp(20px, 4vw, 42px) / 1.1 "Trebuchet MS", "Segoe UI", sans-serif;
  letter-spacing: .02em;
  color: #ffe8f5;
  text-shadow: 0 0 14px rgba(255, 90, 170, .9), 0 0 30px rgba(255, 90, 170, .52);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.winx-intro-warning.show {
  opacity: 1;
  transform: translate(-50%, 0);
}


.winx-carta.dobrando {
  pointer-events: none;
  animation: winxCartaParaAviao 1.75s cubic-bezier(.2,.9,.2,1) forwards;
}

.winx-carta.dobrando::before,
.winx-carta.dobrando::after {
  opacity: 1;
}

.winx-carta.dobrando .winx-conteudo-carta {
  animation: winxEsconderConteudo .45s ease forwards;
}

@keyframes winxEsconderConteudo {
  to { opacity: 0; transform: translateZ(-30px) scale(.82); }
}

@keyframes winxCartaParaAviao {
  0% {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: translate3d(0,0,0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
  22% {
    clip-path: polygon(50% 5%, 100% 45%, 68% 52%, 100% 95%, 50% 72%, 0 95%, 32% 52%, 0 45%);
    transform: translate3d(0,0,0) rotateX(54deg) rotateY(-12deg) rotateZ(-3deg) scale(.86);
  }
  48% {
    clip-path: polygon(0 48%, 100% 0, 78% 53%, 100% 100%, 0 58%, 30% 50%);
    transform: translate3d(12vw,-10vh,80px) rotateX(64deg) rotateY(-42deg) rotateZ(18deg) scale(.64);
    filter: drop-shadow(0 22px 20px rgba(135, 36, 83, .25));
  }
  72% {
    opacity: .96;
    clip-path: polygon(0 48%, 100% 0, 78% 53%, 100% 100%, 0 58%, 30% 50%);
    transform: translate3d(45vw,-34vh,120px) rotateX(72deg) rotateY(-64deg) rotateZ(34deg) scale(.46);
  }
  100% {
    opacity: 0;
    clip-path: polygon(0 48%, 100% 0, 78% 53%, 100% 100%, 0 58%, 30% 50%);
    transform: translate3d(82vw,-68vh,160px) rotateX(80deg) rotateY(-82deg) rotateZ(52deg) scale(.2);
  }
}

.winx-blink {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}

.winx-palpebra-sup,
.winx-palpebra-inf {
  position: absolute;
  left: 0;
  width: 100%;
  height: 52%;
  background: radial-gradient(ellipse at 50% 100%, rgba(40,0,18,.98), #000 62%), #000;
  box-shadow: 0 0 40px rgba(0,0,0,.8);
  will-change: transform;
}

.winx-palpebra-sup {
  top: 0;
  transform: translateY(-105%);
  border-bottom-left-radius: 50% 18%;
  border-bottom-right-radius: 50% 18%;
}

.winx-palpebra-inf {
  bottom: 0;
  transform: translateY(105%);
  border-top-left-radius: 50% 18%;
  border-top-right-radius: 50% 18%;
}

.winx-blink.ativo .winx-palpebra-sup {
  animation: winxPiscarSup 1.08s cubic-bezier(.75,0,.25,1) forwards;
}

.winx-blink.ativo .winx-palpebra-inf {
  animation: winxPiscarInf 1.08s cubic-bezier(.75,0,.25,1) forwards;
}

@keyframes winxPiscarSup {
  0% { transform: translateY(-105%); }
  26% { transform: translateY(0%); }
  44% { transform: translateY(0%); }
  100% { transform: translateY(-105%); }
}

@keyframes winxPiscarInf {
  0% { transform: translateY(105%); }
  26% { transform: translateY(0%); }
  44% { transform: translateY(0%); }
  100% { transform: translateY(105%); }
}

.winx-foco {
  position: absolute;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
}

.winx-foco.ativo {
  animation: winxFocar .78s ease forwards;
}

@keyframes winxFocar {
  0% {
    opacity: .58;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, .44);
  }
  100% {
    opacity: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0);
  }
}

.winx-desktop {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 191, 214, .20), rgba(255, 219, 235, .22)),
    url("./public/sofi-wallpaper.png") center / cover no-repeat,
    radial-gradient(circle at 18% 22%, #fff 0 0.9%, transparent 1%),
    linear-gradient(135deg, #ffd2e6, #ffedf5 45%, #ffc0d8);
}

.winx-desktop.visivel { display: block; }

.winx-vm-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  z-index: 3;
  background: rgba(0,0,0,.92);
  color: #ffb6d4;
  font: 13px/1 "Courier New", Courier, monospace;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.winx-desktop-icons {
  position: absolute;
  top: 44px;
  left: 22px;
  display: grid;
  gap: 18px;
  z-index: 2;
}

.winx-desk-icon-button {
  width: 88px;
  min-height: 82px;
  display: grid;
  place-items: center;
  gap: 5px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 4px rgba(80, 15, 45, .95);
  font-size: 12px;
  padding: 8px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.winx-desk-icon-button:hover {
  background: rgba(255,255,255,.20);
  outline: 1px solid rgba(255,255,255,.28);
}

.winx-desk-icon-button span {
  line-height: 1.1;
}

.winx-icon-canvas {
  width: 48px;
  height: 48px;
  display: block;
  image-rendering: auto;
}

.winx-taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #ffc0cb66;
  border-top: 1px solid rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 -10px 34px rgba(255, 95, 166, .25);
  backdrop-filter: blur(10px) saturate(1.45);
  -webkit-backdrop-filter: blur(10px) saturate(1.45);
}

.winx-start-button,
.winx-task-icon,
.winx-controle {
  height: 32px;
  min-width: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.45);
  background: linear-gradient(to bottom, rgba(255,255,255,.58), rgba(255,159,197,.30));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 4px 14px rgba(125, 33, 77, .22);
  color: #ff4f9d;
  cursor: pointer;
}

.winx-start-button {
  width: 50px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.winx-task-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.winx-task-icon {
  width: 46px;
  border: 0;
}

.winx-start-canvas {
  width: 30px;
  height: 30px;
  display: block;
}

.winx-task-canvas {
  width: 28px;
  height: 28px;
  display: block;
}

.winx-tray {
  margin-left: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7b2a53;
  font-size: 12px;
}

.winx-internet {
  width: 24px;
  height: 22px;
  position: relative;
}

.winx-internet span {
  position: absolute;
  bottom: 3px;
  width: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(#fff, #ff61a8);
}

.winx-internet span:nth-child(1) { left: 2px; height: 6px; }
.winx-internet span:nth-child(2) { left: 8px; height: 10px; }
.winx-internet span:nth-child(3) { left: 14px; height: 15px; }
.winx-internet span:nth-child(4) { left: 20px; height: 19px; }

.winx-clock {
  min-width: 60px;
  text-align: center;
  line-height: 1.15;
}

.winx-janela {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92vw, 620px);
  height: min(74vh, 520px);
  transform: translate(-50%, -50%) scale(.92);
  opacity: 0;
  z-index: 8;
  display: none;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.78);
  background: rgba(255, 238, 247, .72);
  box-shadow: 0 22px 70px rgba(102, 22, 62, .42), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.winx-janela.aberta {
  display: block;
  animation: winxAbrirJanela .28s cubic-bezier(.2,1.05,.4,1) forwards;
}

@keyframes winxAbrirJanela {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.winx-janela-titulo {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  background: linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,155,196,.45));
  border-bottom: 1px solid rgba(255,255,255,.75);
  color: #7b2a53;
  font-size: 13px;
  font-weight: 800;
}

.winx-titulo-texto { flex: 1; }
.winx-janela-controles { display: flex; gap: 6px; }
.winx-controle { width: 28px; height: 20px; font-weight: 900; }

.winx-title-icon-canvas {
  width: 18px;
  height: 18px;
  display: block;
}

.winx-letter-window {
  width: min(88vw, 520px);
  height: min(70vh, 420px);
}

.winx-letter-content {
  position: relative;
  height: calc(100% - 34px);
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  color: #7b2a53;
}

.winx-letter-content img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 8px 24px rgba(123, 42, 83, .16);
}

.winx-letter-warning {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%) scale(.92);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 130, 180, 0.62);
  color: #8c2c5e;
  border-radius: 12px;
  padding: 10px 16px;
  font: 800 13px/1.2 "Source Code Pro", monospace;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 26px rgba(123, 42, 83, .2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}

.winx-letter-warning.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.winx-letter-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.winx-game-area {
  position: relative;
  height: calc(100% - 34px);
  padding: 12px;
}

.winx-game-stage {
  position: absolute;
  inset: 12px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.95), transparent 18%),
    linear-gradient(180deg, rgba(255,235,246,.92), rgba(255,206,226,.88));
  border: 1px solid rgba(255,255,255,.78);
}

.winx-hud {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  height: 42px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.8);
  color: #8c2c5e;
  font-size: 14px;
  font-weight: 900;
}

.winx-hud small { font-weight: 700; opacity: .82; }

.winx-catcher {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 82px;
  height: 56px;
  z-index: 3;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.winx-catcher img {
  width: 82px;
  height: 56px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.winx-catcher.explodindo {
  animation: winxBoomMolang .28s ease;
}

@keyframes winxBoomMolang {
  0% { transform: translateX(-50%) scale(1); filter: none; }
  35% { transform: translateX(-50%) scale(1.12); filter: brightness(1.25); }
  70% { transform: translateX(-50%) scale(0.96); filter: brightness(0.9); }
  100% { transform: translateX(-50%) scale(1); filter: none; }
}

.winx-falling {
  position: absolute;
  z-index: 2;
  width: 36px;
  height: 36px;
  transform-origin: center center;
}

.winx-falling img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.winx-treat-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.winx-boom-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  animation: winxBoomParticle .34s ease-out forwards;
}

@keyframes winxBoomParticle {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.5); }
}

.winx-game-message {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(82%, 360px);
  padding: 18px 18px 16px;
  transform: translate(-50%, -50%);
  text-align: center;
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.9);
}

.winx-game-message h2 {
  margin: 0 0 8px;
  color: #ff4f9d;
  font-size: 26px;
}

.winx-game-message p {
  margin: 0 0 14px;
  color: #8c2c5e;
  line-height: 1.45;
  font-size: 14px;
}

.winx-game-message button,
.winx-hud button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #ff91bf, #ff5fa6);
}

.winx-game-message.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .winx-janela {
    width: calc(100vw - 18px);
    height: calc(100vh - 88px);
    top: calc(50% - 8px);
  }

  .winx-desktop-icons { display: none; }
  .winx-hud { font-size: 12px; padding: 0 10px; }
  .winx-hud small { display: none; }
}

