:root {
  color-scheme: dark;
  --ink: #fffdf5;
  --muted: rgba(255, 255, 255, 0.82);
  --blue: #42dcff;
  --blue-deep: #086c9c;
  --pink: #ff7edb;
  --pink-deep: #a62f86;
  --gold: #ffe08a;
  --panel: rgba(11, 24, 49, 0.7);
  --border: rgba(255, 255, 255, 0.28);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
  background: #102f48 url("../galeri/background/start1.webp") center / cover fixed no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(3, 16, 34, 0.5), rgba(25, 8, 39, 0.36) 55%, rgba(2, 14, 31, 0.72)),
    radial-gradient(circle at 50% 34%, transparent 5%, rgba(2, 11, 26, 0.16) 64%, rgba(2, 8, 20, 0.62));
}

body.modal-open { overflow: hidden; }

a, button { -webkit-tap-highlight-color: transparent; }

button, a { font: inherit; }

.magic-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: min(38rem, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: drift 9s ease-in-out infinite alternate;
}

.glow-blue { left: -16rem; bottom: -17rem; background: #00d9ff; }
.glow-pink { right: -16rem; top: -17rem; background: #ff40cb; animation-delay: -4s; }

.sparkle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  left: var(--left);
  top: var(--top);
  border-radius: 50%;
  background: #fff8cc;
  box-shadow: 0 0 8px #fff, 0 0 18px var(--color);
  opacity: 0;
  animation: twinkle var(--speed) ease-in-out var(--delay) infinite;
}

.topbar {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 5;
}

.home-link, .demo-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 16, 35, 0.56);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.home-link {
  min-height: 48px;
  padding: 5px 17px 5px 7px;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.home-link img { width: 38px; height: 38px; object-fit: contain; }

.demo-badge {
  padding: 10px 16px;
  gap: 7px;
  color: #fff2b2;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.start-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 42px;
}

.welcome {
  max-width: 830px;
  margin: 0 auto 18px;
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
}

.eyebrow {
  margin: 0 0 3px;
  color: #fff1a8;
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #fff 3%, #fff5b5 44%, #ffc86c 78%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(100, 38, 24, 0.35));
}

.lead {
  max-width: 680px;
  margin: 11px auto 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.7vw, 1.15rem);
  line-height: 1.5;
}

.world-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.62fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(14px, 2.2vw, 28px);
}

.world-card {
  min-height: clamp(345px, 49vh, 520px);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 34px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(255, 255, 255, 0.09);
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.world-card::before, .world-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.world-card::after {
  z-index: -1;
  background: linear-gradient(180deg, transparent 22%, rgba(5, 14, 33, 0.14) 45%, rgba(3, 9, 24, 0.94) 100%);
}

.world-riko::before {
  background:
    radial-gradient(circle at 50% 24%, rgba(99, 238, 255, 0.22), transparent 44%),
    linear-gradient(145deg, rgba(7, 85, 118, 0.66), rgba(5, 27, 57, 0.82));
}

.world-lili::before {
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 195, 241, 0.27), transparent 44%),
    linear-gradient(145deg, rgba(157, 43, 121, 0.7), rgba(64, 17, 72, 0.86));
}

.world-card:hover, .world-card:focus-visible {
  transform: translateY(-8px) scale(1.015);
  outline: none;
}

.world-riko:hover, .world-riko:focus-visible {
  border-color: #8cedff;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45), 0 0 34px rgba(66, 220, 255, 0.52);
}

.world-lili:hover, .world-lili:focus-visible {
  border-color: #ffc0ef;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45), 0 0 34px rgba(255, 126, 219, 0.5);
}

.card-shine {
  position: absolute;
  width: 90%;
  height: 70%;
  left: -70%;
  top: -24%;
  transform: rotate(28deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transition: left 0.7s ease;
}

.world-card:hover .card-shine, .world-card:focus-visible .card-shine { left: 110%; }

.mascot-wrap {
  position: absolute;
  inset: 5px 12px 108px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mascot-wrap img {
  width: auto;
  height: min(100%, 340px);
  max-width: 94%;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.42));
  transition: transform 0.3s ease;
}

.world-card:hover .mascot-wrap img, .world-card:focus-visible .mascot-wrap img { transform: translateY(-4px) scale(1.035); }

.world-copy {
  width: 100%;
  min-height: 130px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 16px 18px;
  text-align: center;
}

.world-copy small { color: rgba(255, 255, 255, 0.74); font-size: 0.78rem; }
.world-copy strong { margin: 2px 0 9px; font-family: Georgia, serif; font-size: clamp(1.35rem, 2.5vw, 2rem); }

.card-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 0.84rem;
  font-weight: 900;
}

.world-riko .card-action { color: #d8faff; }
.world-lili .card-action { color: #ffe0f7; }

.intro-orb {
  align-self: center;
  text-align: center;
}

.movie-button {
  width: min(250px, 100%);
  aspect-ratio: 1;
  margin: auto;
  position: relative;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  background: transparent;
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.movie-button::before {
  content: "";
  position: absolute;
  inset: 13%;
  border: 2px solid rgba(255, 248, 191, 0.62);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 224, 138, 0.66), inset 0 0 18px rgba(255, 255, 255, 0.2);
  animation: orbPulse 2.2s ease-in-out infinite;
}

.movie-button img { width: 100%; height: 100%; object-fit: contain; }

.play-icon {
  width: 58px;
  height: 58px;
  position: absolute;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(19, 8, 40, 0.58);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.55);
  font-size: 1.4rem;
}

.movie-label {
  position: absolute;
  bottom: 3%;
  width: 90%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(10, 10, 34, 0.78);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
  font-size: 0.8rem;
  font-weight: 900;
}

.movie-button:hover, .movie-button:focus-visible {
  transform: scale(1.06);
  filter: drop-shadow(0 23px 30px rgba(255, 215, 111, 0.27));
  outline: none;
}

.intro-orb p {
  max-width: 220px;
  margin: 8px auto 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  line-height: 1.4;
  text-shadow: 0 2px 9px #000;
}

.gentle-hint {
  width: fit-content;
  margin: 16px auto 0;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(5, 17, 34, 0.5);
  backdrop-filter: blur(10px);
  font-size: 0.86rem;
  text-align: center;
}

.movie-modal[hidden] { display: none; }

.movie-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 18, 0.82);
  backdrop-filter: blur(16px);
  animation: fadeIn 0.2s ease both;
}

.movie-panel {
  width: min(1050px, 100%);
  max-height: calc(100svh - 36px);
  position: relative;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(11, 35, 58, 0.98), rgba(58, 19, 66, 0.98));
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.76), 0 0 45px rgba(129, 213, 255, 0.18);
  animation: panelIn 0.25s ease both;
}

.movie-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 15px 12px 22px;
}

.movie-head span { color: #ffeca1; font-size: 0.74rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.movie-head h2 { margin: 2px 0 0; font-family: Georgia, serif; font-size: clamp(1.15rem, 3vw, 1.75rem); }

.close-button {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.close-button:hover, .close-button:focus-visible { background: rgba(255, 255, 255, 0.2); outline: 3px solid rgba(255, 224, 138, 0.55); }

.video-frame {
  width: calc(100% - 24px);
  aspect-ratio: 16 / 9;
  margin: 0 12px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 19px;
  background: #030713;
}

.video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; }

.movie-after {
  padding: 0 18px 18px;
  text-align: center;
}

.movie-after strong { display: block; margin-bottom: 9px; }
.movie-after > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

.mini-choice {
  min-width: 150px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.choice-riko { background: linear-gradient(135deg, #087ca5, #145080); }
.choice-lili { background: linear-gradient(135deg, #be458f, #7e347e); }

@keyframes drift { to { transform: translate3d(8%, -4%, 0) scale(1.08); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.3); } 45% { opacity: 0.9; transform: scale(1); } }
@keyframes orbPulse { 50% { transform: scale(1.04); opacity: 0.72; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

@media (max-width: 900px) {
  body { background-attachment: scroll; }
  .world-picker { grid-template-columns: 1fr 1fr; }
  .intro-orb { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; justify-content: center; gap: 8px 22px; }
  .movie-button { width: 170px; flex: 0 0 170px; }
  .intro-orb p { margin: 0; text-align: left; }
  .world-card { min-height: 410px; }
}

@media (max-width: 580px) {
  .topbar, .start-shell { width: min(100% - 20px, 1240px); }
  .topbar { min-height: 62px; }
  .home-link { width: 46px; min-height: 46px; padding: 4px; justify-content: center; }
  .home-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .demo-badge { padding: 8px 11px; font-size: 0.67rem; }
  .start-shell { padding-top: 8px; }
  .welcome { margin-bottom: 14px; }
  .lead { font-size: 0.9rem; }
  .world-picker { grid-template-columns: 1fr; }
  .intro-orb { grid-column: auto; display: flex; min-height: 140px; padding: 4px 9px; border: 1px solid rgba(255, 255, 255, 0.23); border-radius: 25px; background: rgba(8, 19, 43, 0.62); backdrop-filter: blur(10px); }
  .movie-button { width: 128px; flex-basis: 128px; }
  .play-icon { width: 44px; height: 44px; font-size: 1rem; }
  .movie-label { width: 108px; bottom: 0; padding: 6px 5px; font-size: 0.65rem; }
  .intro-orb p { max-width: 150px; font-size: 0.76rem; }
  .world-card { min-height: 375px; border-radius: 28px; }
  .mascot-wrap { bottom: 104px; }
  .gentle-hint { border-radius: 18px; }
  .movie-modal { padding: 8px; }
  .movie-panel { max-height: calc(100svh - 16px); border-radius: 19px; }
  .movie-head { min-height: 62px; padding: 9px 10px 9px 14px; }
  .close-button { width: 43px; height: 43px; }
  .video-frame { width: calc(100% - 12px); margin: 0 6px 8px; border-radius: 13px; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .topbar { min-height: 60px; }
  .start-shell { padding-top: 2px; }
  .welcome { margin-bottom: 10px; }
  .lead { margin-top: 6px; }
  .world-card { min-height: 395px; }
  .mascot-wrap { inset-top: 0; }
  .gentle-hint { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
