﻿:root {
      --bg-top: #0b1222;
      --bg-mid: #111a33;
      --bg-bottom: #1a2542;
      --cloud: #edf5ff;
      --cloud-shadow: rgba(84, 118, 160, 0.35);
      --rain: #9fd5ff;
      --rain-bright: #d9f2ff;
      --face: #56687d;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html,
    body {
      width: 100%;
      min-height: 100%;
      overflow-x: hidden;
    }

    body {
      min-height: 100vh;
      min-height: 100svh;
      overflow: hidden;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: white;
      background:
        radial-gradient(circle at 50% 12%, rgba(92, 147, 200, 0.25), transparent 32%),
        linear-gradient(180deg, var(--bg-top), var(--bg-mid) 45%, var(--bg-bottom));
    }

    .page {
      position: relative;
      min-height: 100vh;
      min-height: 100svh;
      display: grid;
      place-items: center;
      padding: clamp(14px, 4vw, 24px);
      overflow: hidden;
    }

    .stars,
    .mist,
    .shooting-stars {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    .stars {
      z-index: 0;
      overflow: hidden;
      contain: layout paint style;
    }

    .star {
      position: absolute;
      width: var(--size);
      height: var(--size);
      border-radius: 50%;
      background: rgba(255,255,255,0.92);
      opacity: var(--alpha);
      box-shadow: 0 0 8px rgba(255,255,255,0.18);
      animation: twinkle var(--twinkle) ease-in-out infinite;
      animation-delay: var(--delay);
    }

    .shooting-stars {
      z-index: 1;
      overflow: hidden;
      contain: layout paint style;
    }

    .shooting-star {
      position: absolute;
      width: 120px;
      height: 2px;
      border-radius: 999px;
      background: linear-gradient(
        90deg,
        rgba(255,255,255,0),
        var(--star-core, rgba(255,255,255,0.95)) 45%,
        var(--star-trail, rgba(159,213,255,0.75)) 70%,
        rgba(255,255,255,0)
      );
      box-shadow:
        0 0 10px var(--star-glow-soft, rgba(255,255,255,0.4)),
        0 0 18px var(--star-glow, rgba(159,213,255,0.28));
      transform: translate3d(0, 0, 0) rotate(var(--angle));
      opacity: 0;
      animation: shoot var(--shoot-duration) ease-out forwards;
    }

    .shooting-star::after {
      content: "";
      position: absolute;
      right: -2px;
      top: 50%;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      transform: translateY(-50%);
      background: var(--star-core, rgba(255,255,255,0.95));
      box-shadow: 0 0 12px var(--star-glow, rgba(255,255,255,0.55));
    }

    .mist {
      z-index: 1;
      background:
        radial-gradient(ellipse at 50% 62%, rgba(135, 192, 255, 0.13), transparent 38%),
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.08), transparent 35%),
        radial-gradient(ellipse at 80% 82%, rgba(255,255,255,0.07), transparent 35%);
      filter: blur(18px);
      animation: breathe 7s ease-in-out infinite alternate;
    }

    .hero {
      position: relative;
      width: min(1000px, 96vw);
      height: min(760px, 92svh);
      min-height: 620px;
      display: grid;
      place-items: center;
      isolation: isolate;
      z-index: 2;
    }

    .hero.flash::before {
      content: "";
      position: absolute;
      left: 50%;
      top: 36%;
      width: 150vmax;
      height: 150vmax;
      transform: translate(-50%, -50%);
      background: radial-gradient(
        circle,
        rgba(232,247,255,0.30) 0%,
        rgba(185,226,255,0.16) 16%,
        rgba(118,190,255,0.055) 34%,
        transparent 58%
      );
      animation: flashPulse 520ms ease-out;
      pointer-events: none;
      z-index: 9;
      border-radius: 50%;
      mix-blend-mode: screen;
    }

    .cloud-wrap {
      --mx: 0px;
      --my: 0px;
      --scale: 1;
      position: absolute;
      top: clamp(48px, 10svh, 80px);
      left: 50%;
      width: min(460px, 72vw);
      height: 190px;
      transform: translateX(-50%) translate(var(--mx), var(--my)) scale(var(--scale));
      z-index: 6;
      cursor: pointer;
      filter: drop-shadow(0 26px 42px rgba(0, 0, 0, 0.28));
      transition: filter 360ms ease;
      will-change: transform;
    }

    .cloud-wrap:hover {
      --scale: 1.035;
      filter: drop-shadow(0 32px 52px rgba(0, 0, 0, 0.36));
    }

    .cloud-wrap.strike-flash {
      animation: cloudStrikeFlash 520ms ease-out;
    }

    .cloud-jolt,
    .stage-jolt {
      position: absolute;
      inset: 0;
      transform: translateX(0);
      transform-origin: center center;
    }

    .stage-jolt {
      width: 100%;
      height: 100%;
    }

    .cloud-jolt.jolt,
    .stage-jolt.jolt {
      animation: sideJolt 360ms ease-out;
    }

    .cloud {
      position: absolute;
      inset: 0;
    }

    .puff {
      position: absolute;
      border-radius: 999px;
      background:
        radial-gradient(circle at 34% 24%, white, var(--cloud) 52%, #cbdcf0 100%);
      box-shadow:
        inset -14px -18px 28px rgba(112, 141, 177, 0.2),
        inset 16px 15px 26px rgba(255,255,255,0.8),
        0 18px 24px var(--cloud-shadow);
    }

    .p1 { width: 190px; height: 118px; left: 10px; top: 70px; }
    .p2 { width: 190px; height: 168px; left: 92px; top: 28px; }
    .p3 { width: 215px; height: 150px; left: 210px; top: 50px; }
    .p4 { width: 250px; height: 96px; left: 94px; top: 104px; }
    .p5 { width: 130px; height: 86px; left: 310px; top: 92px; }

    .cloud-base {
      position: absolute;
      left: 34px;
      right: 26px;
      bottom: 15px;
      height: 80px;
      border-radius: 999px;
      background: linear-gradient(180deg, #f9fcff, #d8e7f6);
      box-shadow:
        inset 0 -16px 22px rgba(87, 119, 154, 0.2),
        inset 0 13px 18px rgba(255,255,255,0.82);
    }

    .cloud-face {
      position: absolute;
      left: 50%;
      top: 88px;
      width: 112px;
      height: 56px;
      transform: translateX(-50%);
      opacity: 0.46;
      pointer-events: none;
    }

    .eye {
      position: absolute;
      top: 10px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--face);
      box-shadow: 0 0 0 4px rgba(255,255,255,0.18);
    }

    .eye:first-child {
      left: 20px;
    }

    .eye:nth-child(2) {
      right: 20px;
    }

    .smile {
      position: absolute;
      left: 50%;
      top: 32px;
      width: 34px;
      height: 5px;
      transform: translateX(-50%);
      border-bottom: 2.5px solid rgba(86, 104, 125, 0.95);
      border-radius: 0 0 999px 999px;
      opacity: 1;
    }

    .rain-field {
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
      contain: layout paint style;
    }

    .drop {
      position: absolute;
      top: var(--start-y);
      left: var(--x);
      width: var(--w);
      height: var(--h);
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(235,249,255,0.88), rgba(125,208,255,0.72));
      box-shadow: 0 0 8px rgba(130, 211, 255, 0.16);
      opacity: var(--opacity);
      transform: translate3d(0, 0, 0) rotate(var(--angle));
      animation: rainFall var(--speed) linear infinite;
      animation-delay: var(--delay);
      backface-visibility: hidden;
    }

    .drop.stream {
      box-shadow:
        0 0 8px rgba(180, 232, 255, 0.22),
        0 0 14px rgba(111, 205, 255, 0.14);
    }

    .letter-stage {
      position: absolute;
      left: 50%;
      top: clamp(278px, 41svh, 300px);
      width: min(920px, 96vw);
      height: 320px;
      transform: translateX(-50%);
      z-index: 4;
      pointer-events: auto;
      contain: layout paint style;
    }

    .letter-particle {
      position: absolute;
      width: var(--pw, 4px);
      height: var(--ph, 16px);
      border-radius: 999px;
      background: linear-gradient(180deg, var(--rain-bright), var(--rain));
      box-shadow:
        0 0 7px rgba(157, 218, 255, 0.42),
        0 0 14px rgba(102, 194, 255, 0.12);
      opacity: 0;
      transform: translate3d(var(--sx), var(--sy), 0) rotate(var(--start-rot, 8deg));
      animation:
        formText var(--duration, 1500ms) cubic-bezier(.18,.88,.22,1) forwards,
        shimmer 2400ms ease-in-out infinite;
      animation-delay: var(--delay), calc(var(--delay) + var(--duration, 1500ms));
      animation-fill-mode: forwards, both;
      animation-iteration-count: 1, infinite;
      transition:
        transform 520ms cubic-bezier(.2,.85,.2,1),
        opacity 320ms ease,
        filter 320ms ease;
      backface-visibility: hidden;
    }

    .letter-stage:hover .letter-particle,
    .letter-stage.active .letter-particle {
      transform: translate3d(
        calc(var(--tx) + var(--spread-x)),
        calc(var(--ty) + var(--spread-y)),
        0
      ) rotate(var(--rot)) scale(1.14);
      filter: brightness(1.22);
    }

    .letter-stage.clicked .letter-particle {
      animation: burst 760ms cubic-bezier(.12,.78,.22,1) forwards !important;
    }

    .letter-stage.storm-break .letter-particle {
      animation: lightningBreak 820ms cubic-bezier(.15,.85,.22,1) forwards !important;
    }

    .lightning-layer {
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
      overflow: visible;
    }

    .mobile-title {
      display: none;
      position: absolute;
      left: 50%;
      top: 20px;
      transform: translateX(-50%);
      z-index: 8;
      font-size: 14px;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: rgba(231, 247, 255, 0.64);
      white-space: nowrap;
    }

    .enter-card {
      position: absolute;
      left: 50%;
      bottom: 64px;
      width: min(340px, calc(100vw - 28px));
      transform: translateX(-50%);
      z-index: 7;
      padding: 16px;
      border: 1px solid rgba(212, 238, 255, 0.22);
      border-radius: 24px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.055)),
        rgba(7, 18, 35, 0.36);
      backdrop-filter: blur(18px);
      box-shadow:
        0 22px 70px rgba(0,0,0,0.28),
        inset 0 1px 0 rgba(255,255,255,0.18);
      text-align: center;
      transition:
        transform 520ms cubic-bezier(.2,.9,.2,1),
        opacity 360ms ease,
        filter 360ms ease;
    }

    .enter-card.consumed {
      opacity: 0;
      filter: blur(6px) brightness(1.4);
      transform: translateX(-50%) translateY(-330px) scale(0.22);
      pointer-events: none;
    }

    .enter-card.hidden {
      display: none;
    }

    .enter-button {
      width: 100%;
      border: 0;
      border-radius: 18px;
      padding: 15px 18px;
      cursor: pointer;
      color: #f4fbff;
      font: inherit;
      font-weight: 800;
      font-size: 18px;
      letter-spacing: 0.03em;
      background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.24), transparent 46%),
        linear-gradient(135deg, rgba(120, 205, 255, 0.34), rgba(200, 234, 255, 0.16));
      box-shadow:
        0 12px 28px rgba(77, 175, 255, 0.16),
        inset 0 1px 0 rgba(255,255,255,0.24);
      transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
    }

    .enter-button:hover {
      transform: translateY(-2px);
      filter: brightness(1.12);
      box-shadow:
        0 16px 34px rgba(77, 175, 255, 0.24),
        inset 0 1px 0 rgba(255,255,255,0.3);
    }

    .login-panel {
      position: absolute;
      left: 50%;
      top: 50%;
      width: min(390px, calc(100vw - 28px));
      transform: translate(-50%, -50%) scale(0.92);
      z-index: 10;
      padding: 22px;
      border: 1px solid rgba(220, 243, 255, 0.24);
      border-radius: 28px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07)),
        rgba(8, 18, 34, 0.58);
      backdrop-filter: blur(22px);
      box-shadow:
        0 28px 90px rgba(0,0,0,0.38),
        inset 0 1px 0 rgba(255,255,255,0.2);
      opacity: 0;
      pointer-events: none;
      transition:
        opacity 520ms ease,
        transform 560ms cubic-bezier(.2,.9,.2,1);
    }

    .login-panel.visible {
      opacity: 1;
      pointer-events: auto;
      transform: translate(-50%, -50%) scale(1);
    }

    .login-panel h2 {
      font-size: clamp(26px, 6vw, 34px);
      line-height: 1;
      margin-bottom: 9px;
      letter-spacing: -0.04em;
    }

    .login-panel p {
      color: rgba(232, 247, 255, 0.62);
      font-size: 14px;
      line-height: 1.45;
      margin-bottom: 18px;
    }

    .login-field {
      display: block;
      width: 100%;
      margin-top: 11px;
      padding: 14px 15px;
      border: 1px solid rgba(214, 240, 255, 0.18);
      border-radius: 16px;
      color: white;
      background: rgba(2, 10, 22, 0.34);
      outline: none;
      font: inherit;
    }

    .login-field::placeholder {
      color: rgba(235, 248, 255, 0.42);
    }

    .login-submit {
      width: 100%;
      margin-top: 16px;
      padding: 14px 16px;
      border: 0;
      border-radius: 16px;
      cursor: pointer;
      color: #102033;
      font: inherit;
      font-weight: 850;
      background: linear-gradient(135deg, #dff6ff, #8fd8ff);
      box-shadow: 0 14px 30px rgba(94, 190, 255, 0.2);
    }

    .back-button {
      display: block;
      margin: 14px auto 0;
      border: 0;
      color: rgba(231, 247, 255, 0.62);
      background: transparent;
      cursor: pointer;
      font: inherit;
      font-size: 13px;
    }

    .login-mode .letter-stage,
    .login-mode .enter-card {
      pointer-events: none;
    }

    .login-mode .letter-stage {
      opacity: 0.28;
      filter: blur(2px);
    }

    .glow-floor {
      position: absolute;
      left: 50%;
      top: 602px;
      width: min(760px, 82vw);
      height: 120px;
      transform: translateX(-50%);
      border-radius: 50%;
      background: radial-gradient(ellipse, rgba(117, 198, 255, 0.22), transparent 70%);
      filter: blur(18px);
      z-index: 1;
    }

    @keyframes rainFall {
      0% { transform: translate3d(0, 0, 0) rotate(var(--angle)); opacity: 0; }
      12% { opacity: var(--opacity); }
      82% { opacity: var(--opacity); }
      100% { transform: translate3d(var(--wind), var(--fall-distance, 620px), 0) rotate(var(--angle)); opacity: 0; }
    }

    @keyframes formText {
      0% { opacity: 0; transform: translate3d(var(--sx), var(--sy), 0) rotate(var(--start-rot, 8deg)) scaleY(1.18); }
      18% { opacity: 1; }
      100% { opacity: 1; transform: translate3d(var(--tx), var(--ty), 0) rotate(0deg) scaleY(1); }
    }

    @keyframes shimmer {
      0%, 100% { opacity: 0.88; box-shadow: 0 0 8px rgba(157, 218, 255, 0.42), 0 0 18px rgba(102, 194, 255, 0.12); }
      50% { opacity: 1; box-shadow: 0 0 11px rgba(197, 239, 255, 0.62), 0 0 24px rgba(102, 194, 255, 0.22); }
    }

    @keyframes burst {
      0% { opacity: 1; transform: translate3d(var(--tx), var(--ty), 0) rotate(0deg) scale(1); }
      52% { opacity: 1; }
      100% { opacity: 0; transform: translate3d(calc(var(--tx) + var(--burst-x)), calc(var(--ty) + var(--burst-y)), 0) rotate(var(--rot)) scale(0.7); }
    }

    @keyframes lightningBreak {
      0% { opacity: 1; transform: translate3d(var(--tx), var(--ty), 0) rotate(0deg) scale(1); filter: brightness(1.2); }
      18% { opacity: 1; filter: brightness(2.25); }
      100% { opacity: 0; transform: translate3d(calc(var(--tx) + var(--burst-x)), calc(var(--ty) + var(--burst-y)), 0) rotate(var(--rot)) scale(0.6); filter: brightness(1.5); }
    }

    @keyframes twinkle {
      0%, 100% { opacity: var(--alpha); transform: scale(1); }
      50% { opacity: calc(var(--alpha) * 0.38 + 0.16); transform: scale(1.18); }
    }

    @keyframes shoot {
      0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(var(--angle)) scaleX(0.5); }
      10% { opacity: 1; }
      100% { opacity: 0; transform: translate3d(var(--travel-x), var(--travel-y), 0) rotate(var(--angle)) scaleX(1.08); }
    }

    @keyframes breathe {
      from { opacity: 0.55; transform: scale(1); }
      to { opacity: 0.9; transform: scale(1.04); }
    }

    @keyframes flashPulse {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
      35% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
      100% { opacity: 0; transform: translate(-50%, -50%) scale(1.08); }
    }

    @keyframes cloudStrikeFlash {
      0% { filter: drop-shadow(0 26px 42px rgba(0, 0, 0, 0.28)) brightness(1); }
      30% { filter: drop-shadow(0 0 12px rgba(190, 235, 255, 0.85)) drop-shadow(0 0 28px rgba(148, 214, 255, 0.45)) brightness(1.18); }
      100% { filter: drop-shadow(0 26px 42px rgba(0, 0, 0, 0.28)) brightness(1); }
    }

    @keyframes sideJolt {
      0%   { transform: translateX(0); }
      24%  { transform: translateX(12px); }
      48%  { transform: translateX(-5px); }
      72%  { transform: translateX(2px); }
      100% { transform: translateX(0); }
    }

    @media (max-width: 720px) {
      body { overflow: hidden; }
      .page { align-items: start; padding: 10px 12px 18px; }
      .hero { width: 100vw; height: 100svh; min-height: 560px; overflow: hidden; }
      .mobile-title { display: block; }
      .cloud-wrap { top: 54px; width: 310px; height: 130px; --scale: 0.72; transform: translateX(-50%) translate(var(--mx), var(--my)) scale(var(--scale)); transform-origin: center top; }
      .cloud-wrap:hover { --scale: 0.74; }
      .p1 { width: 150px; height: 90px; left: 16px; top: 56px; }
      .p2 { width: 150px; height: 132px; left: 78px; top: 20px; }
      .p3 { width: 170px; height: 116px; left: 170px; top: 42px; }
      .p4 { width: 210px; height: 76px; left: 72px; top: 88px; }
      .p5 { width: 102px; height: 70px; left: 258px; top: 76px; }
      .cloud-base { left: 36px; right: -16px; bottom: -18px; height: 66px; }
      .cloud-face { top: 72px; width: 92px; height: 48px; }
      .eye { top: 9px; width: 10px; height: 10px; background: var(--face); box-shadow: 0 0 0 3px rgba(255,255,255,0.16); }
      .eye:first-child { left: 17px; }
      .eye:nth-child(2) { right: 17px; }
      .smile { top: 27px; width: 28px; height: 4px; border-bottom-width: 2px; }
      .letter-stage { top: 228px; width: 100vw; height: 330px; transform: translateX(-50%); }
      .letter-particle { --pw: 3.4px; --ph: 13px; }
      .glow-floor { top: 486px; width: 92vw; height: 90px; }
      .enter-card { bottom: 34px; width: calc(100vw - 24px); max-width: 340px; padding: 14px; border-radius: 20px; }
      .enter-button { padding: 13px 14px; font-size: 16px; border-radius: 16px; }
      .login-panel { top: 52%; width: calc(100vw - 24px); max-width: 360px; padding: 18px; border-radius: 24px; }
    }

    @media (max-width: 390px) {
      .cloud-wrap { top: 50px; --scale: 0.64; }
      .cloud-wrap:hover { --scale: 0.66; }
      .letter-stage { top: 218px; height: 330px; }
      .glow-floor { top: 470px; }
    }
