* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #4a102d;
  --bg-deep: #2a0819;
  --panel: #54142f;
  --panel-2: #6b1d3d;
  --purple: #ff4f9a;
  --purple-light: #ff82b7;
  --pink: #ff5fa8;
  --cyan: #ffd0e2;
  --text: #fffaff;
  --muted: #d8aebe;
  --line: rgba(255,255,255,.12);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #e83f87;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 22px 16px;
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,.15), transparent 32%),
    linear-gradient(145deg, #f0529a 0%, #df3c82 42%, #bf286b 100%);
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}

.app-shell::before {
  width: 160px;
  height: 160px;
  left: -55px;
  top: 190px;
}

.app-shell::after {
  width: 110px;
  height: 110px;
  right: -30px;
  top: 15px;
}

.ambient {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.09);
  filter: blur(.3px);
  pointer-events: none;
}

.ambient-1 { width: 22px; height: 22px; top: 8%; left: 18%; }
.ambient-2 { width: 38px; height: 38px; top: 14%; right: 13%; }
.ambient-3 { width: 17px; height: 17px; top: 31%; left: 7%; }

.start-card {
  position: relative;
  z-index: 2;
  width: min(100%, 470px);
  min-height: calc(100vh - 44px);
  padding: 20px 18px 24px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,72,145,.18), transparent 28%),
    linear-gradient(180deg, #55142f 0%, #300b1f 100%);
  box-shadow:
    0 30px 80px rgba(29, 10, 88, .42),
    inset 0 1px 0 rgba(255,255,255,.08);
  overflow: hidden;
}

.start-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(104, 66, 255, .08);
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.6px;
}

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-size: 21px;
  background: linear-gradient(145deg, #ff76b0, #d83278);
  box-shadow: 0 7px 18px rgba(255,74,145,.35), inset 0 1px 0 rgba(255,255,255,.25);
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #b99fff;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  font-size: 19px;
}

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 25px;
}

.title-3d {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  line-height: .95;
  font-size: clamp(31px, 8.5vw, 48px);
  font-weight: 950;
  letter-spacing: -2.7px;
  transform: perspective(500px) rotateX(2deg);
  text-shadow:
    0 4px 0 rgba(0,0,0,.20),
    0 10px 24px rgba(0,0,0,.30);
}

.title-3d .lead {
  color: #ffd16a;
  text-shadow: 0 3px 0 #a94761, 0 8px 18px rgba(255,180,70,.2);
}

.title-3d .follow {
  color: #ffb2cf;
  text-shadow: 0 3px 0 #a33d65, 0 8px 18px rgba(50,220,230,.2);
}

.title-3d .switch {
  color: #ff62a4;
  text-shadow: 0 3px 0 #a3265d, 0 8px 18px rgba(255,60,145,.22);
}

.title-3d .dot {
  color: rgba(255,255,255,.65);
  font-size: .72em;
}

.tagline {
  margin: 12px 0 0;
  color: var(--cyan);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .2px;
  text-shadow: 0 0 18px rgba(73,229,225,.22);
}

.bottle-stage {
  position: relative;
  height: 245px;
  margin: 3px auto 0;
  display: grid;
  place-items: center;
}

.glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,72,145,.34), transparent 68%);
  filter: blur(7px);
}

.bottle-shadow {
  position: absolute;
  width: 126px;
  height: 23px;
  bottom: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,.42);
  filter: blur(8px);
}

.bottle {
  position: relative;
  width: 102px;
  height: 178px;
  transform: rotate(-14deg) perspective(500px) rotateY(-9deg);
  filter: drop-shadow(15px 20px 13px rgba(0,0,0,.34));
  animation: floatBottle 3.5s ease-in-out infinite;
}

.bottle-neck {
  position: absolute;
  width: 38px;
  height: 42px;
  left: 32px;
  top: 0;
  border-radius: 10px 10px 5px 5px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,.62) 40%, rgba(157,114,255,.32));
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: inset -5px 0 7px rgba(170,35,91,.2);
}

.bottle-neck::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 8px;
  left: -5px;
  top: -3px;
  border-radius: 5px;
  background: linear-gradient(180deg, #e8dcff, #e85a97);
  border: 1px solid rgba(255,255,255,.5);
}

.bottle-body {
  position: absolute;
  width: 102px;
  height: 143px;
  bottom: 0;
  border-radius: 28px 28px 20px 20px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.55);
  background: linear-gradient(115deg,
    rgba(255,255,255,.68) 0%,
    rgba(255,255,255,.18) 22%,
    rgba(130,91,237,.22) 53%,
    rgba(82,42,177,.43) 100%);
  box-shadow:
    inset 9px 0 13px rgba(255,255,255,.18),
    inset -9px 0 16px rgba(122,16,61,.24);
}

.liquid {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -7px;
  height: 67%;
  border-radius: 48% 48% 0 0;
  background: linear-gradient(180deg, rgba(255,91,165,.65), rgba(104,59,218,.9));
  box-shadow: 0 -7px 14px rgba(255,94,177,.24);
}

.liquid::before {
  content: "";
  position: absolute;
  left: 5%;
  top: -6px;
  width: 90%;
  height: 15px;
  border-radius: 50%;
  background: rgba(255,177,215,.4);
}

.glass-highlight {
  position: absolute;
  z-index: 3;
  left: 14px;
  top: 15px;
  width: 13px;
  height: 105px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  filter: blur(1px);
}

.love {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: 40%;
  text-align: center;
  color: #fff;
  font-size: 34px;
  text-shadow: 0 3px 10px rgba(255,60,145,.65);
}

.spark {
  position: absolute;
  color: #ff8fca;
  font-size: 23px;
  text-shadow: 0 0 15px rgba(255,85,180,.75);
  animation: pulseSpark 2.1s ease-in-out infinite;
}

.spark-a { top: 55px; left: 22%; }
.spark-b { top: 88px; right: 21%; animation-delay: .5s; }
.spark-c { bottom: 43px; left: 28%; animation-delay: 1s; }

.players {
  position: relative;
  z-index: 3;
  margin-top: -3px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 5px 11px;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.player-count {
  min-width: 46px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  color: #ff9fc5;
  background: rgba(255,255,255,.05);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.player-list {
  display: grid;
  gap: 9px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 53px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(73,43,133,.9), rgba(52,31,106,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 7px 17px rgba(0,0,0,.12);
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  background: linear-gradient(145deg, #ff6eab, #a8215b);
}

.player-input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
}

.player-input::placeholder {
  color: #cfa2b4;
}

.remove-player {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  color: #d6a1b7;
  background: rgba(0,0,0,.14);
  cursor: pointer;
}

.add-player {
  width: 100%;
  min-height: 46px;
  margin-top: 9px;
  border: 1px dashed rgba(255,105,169,.55);
  border-radius: 14px;
  color: #ffc1da;
  background: rgba(226,55,126,.09);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .4px;
  cursor: pointer;
}

.add-player:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.play-button {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 59px;
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, #ff72ae 0%, #e95396 48%, #cf357c 100%);
  box-shadow:
    0 12px 26px rgba(180,31,94,.38),
    inset 0 1px 0 rgba(255,255,255,.27),
    inset 0 -3px 0 rgba(111,13,54,.22);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.play-arrow {
  font-size: 25px;
  line-height: 1;
}

.play-button:active {
  transform: translateY(2px) scale(.99);
  box-shadow: 0 7px 15px rgba(180,31,94,.3), inset 0 -2px 0 rgba(111,13,54,.22);
}

.hint {
  position: relative;
  z-index: 3;
  margin: 10px 15px 0;
  color: #a98596;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.4;
}

@keyframes floatBottle {
  0%, 100% { transform: translateY(0) rotate(-14deg) perspective(500px) rotateY(-9deg); }
  50% { transform: translateY(-7px) rotate(-11deg) perspective(500px) rotateY(-9deg); }
}

@keyframes pulseSpark {
  0%, 100% { opacity: .35; transform: scale(.8) rotate(-10deg); }
  50% { opacity: 1; transform: scale(1.08) rotate(10deg); }
}

@media (min-width: 520px) {
  .app-shell { padding: 28px; }
  .start-card { min-height: auto; padding: 24px; }
}

@media (max-height: 760px) {
  .hero { padding-top: 17px; }
  .bottle-stage { height: 190px; }
  .bottle { transform: scale(.82) rotate(-14deg) perspective(500px) rotateY(-9deg); }
  .bottle:hover { transform: scale(.82) rotate(-11deg) perspective(500px) rotateY(-9deg); }
}
