:root {
  --ink: #191528;
  --muted: #615b74;
  --paper: rgba(255, 255, 255, .92);
  --line: rgba(255, 255, 255, .58);
  --hot: #f00058;
  --hot-deep: #c70049;
  --violet: #7657ef;
  --aqua: #10c5cf;
  --shadow: 0 24px 70px rgba(30, 12, 78, .34);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: #7657ef;
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button { font: inherit; }

.portal-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  padding: clamp(18rem, 66vh, 34rem) 1rem 1.15rem;
  isolation: isolate;
  cursor: pointer;
  background-image: url("../images/luckycrush-background.webp");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

.portal-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(22, 10, 58, .02) 0%, rgba(22, 10, 58, .06) 50%, rgba(22, 10, 58, .62) 100%),
    radial-gradient(circle at 50% 78%, rgba(240, 0, 88, .18), transparent 34%);
}

.portal-stage:focus-visible {
  outline: 4px solid #fff;
  outline-offset: -7px;
}

.portal-card {
  width: min(760px, calc(100vw - 2rem));
  padding: clamp(1rem, 2.8vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  cursor: default;
  animation: portal-rise .65s cubic-bezier(.2, .8, .2, 1) both;
}

.portal-head {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: .9rem;
  align-items: center;
}

.portal-mark {
  width: 62px;
  height: 62px;
  display: block;
  filter: drop-shadow(0 8px 13px rgba(240, 0, 88, .22));
}

.portal-copy { min-width: 0; }

.portal-eyebrow {
  margin: 0 0 .18rem;
  color: var(--hot);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.portal-title {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 2rem);
  line-height: 1.07;
  letter-spacing: -.035em;
}

.portal-lead {
  margin: .65rem 0 .8rem;
  color: var(--muted);
  font-size: clamp(.88rem, 2.4vw, 1rem);
  line-height: 1.45;
}

.portal-preview {
  margin: -.2rem 0 .8rem;
  padding: .62rem .72rem;
  border-inline-start: 3px solid var(--hot);
  border-radius: 0 10px 10px 0;
  color: #575067;
  background: rgba(255, 255, 255, .58);
  font-size: .76rem;
  line-height: 1.42;
}

.portal-points {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 .95rem;
  padding: 0;
  list-style: none;
}

.portal-point {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  min-height: 30px;
  padding: .35rem .62rem;
  border: 1px solid rgba(118, 87, 239, .14);
  border-radius: 999px;
  color: #46405b;
  background: rgba(247, 245, 255, .86);
  font-size: .77rem;
  font-weight: 700;
}

.portal-point::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hot), var(--aqua));
  box-shadow: 0 0 0 3px rgba(240, 0, 88, .08);
}

.portal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: .65rem;
}

.portal-button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: .78rem 1rem;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.portal-button:hover { transform: translateY(-2px); }
.portal-button:active { transform: translateY(0); }
.portal-button:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

.portal-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--hot), #ff476b 60%, #ff6d72);
  box-shadow: 0 11px 24px rgba(240, 0, 88, .26);
}

.portal-primary:hover { box-shadow: 0 15px 30px rgba(240, 0, 88, .34); }

.portal-secondary {
  color: #3e3659;
  background: #eeeafc;
}

.portal-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .75rem;
  color: #6d667e;
  font-size: .71rem;
  line-height: 1.35;
}

.portal-account {
  border: 0;
  padding: .15rem 0;
  color: var(--hot-deep);
  background: transparent;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
  text-align: end;
}

.portal-account:hover { text-decoration: underline; }
.portal-account:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }

.portal-no {
  border: 0;
  padding: .15rem 0;
  color: #746e82;
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.portal-no:hover { color: #342e43; }

details {
  position: absolute;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

details summary { display: none; }

@keyframes portal-rise {
  from { opacity: 0; transform: translateY(28px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 860px) {
  .portal-stage {
    justify-items: end;
    align-items: center;
    padding: 1.5rem clamp(1.5rem, 5vw, 5rem);
  }
  .portal-card { width: min(430px, 38vw); }
}

@media (max-width: 520px) {
  .portal-stage {
    align-items: end;
    padding: 17rem .7rem .7rem;
    background-position: center top;
  }
  .portal-card { width: 100%; border-radius: 20px; padding: .9rem; }
  .portal-head { grid-template-columns: 50px 1fr; gap: .7rem; }
  .portal-mark { width: 50px; height: 50px; }
  .portal-lead { margin-top: .5rem; }
  .portal-points { gap: .35rem; margin-bottom: .7rem; }
  .portal-point { min-height: 27px; padding: .28rem .5rem; font-size: .69rem; }
  .portal-actions { grid-template-columns: 1fr; gap: .48rem; }
  .portal-button { min-height: 44px; }
  .portal-bottom { align-items: flex-end; font-size: .64rem; }
  .portal-account { max-width: 50%; font-size: .67rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
