:root {
  color-scheme: dark;
  --bg: #040506;
  --panel: rgba(15, 18, 24, 0.78);
  --line: rgba(255,255,255,0.14);
  --text: #f7f2e8;
  --muted: rgba(247, 242, 232, 0.62);
  --accent: #c95f77;
  --accent-blue: #6f86ff;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  overflow-y: clip;
  font-family: Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(76, 121, 214, 0.14), transparent 42%),
    radial-gradient(circle at right, rgba(176, 62, 49, 0.12), transparent 38%),
    linear-gradient(180deg, #05070b 0%, #04050a 42%, #020304 100%);
}
.stage-video {
  position: fixed;
    inset: 0;
    left: -50%;
    top: -50%;
    z-index: 0;
    width: 200%;
    height: 200%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0.18;
    mix-blend-mode: screen;
    filter: saturate(0.7) brightness(0.34) contrast(0.96);
}

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 44px 24px 92px;
  perspective: 1800px;
  perspective-origin: 50% 42%;
  isolation: isolate;
  overflow: clip;
}

.card-title {
  position: absolute;
  top: 26px;
  left: 50%;
  z-index: 3;
  margin: 0;
  padding: 10px 18px;
  max-width: min(72vw, 620px);
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.52);
  backdrop-filter: blur(14px);
  color: rgba(247, 242, 232, 0.92);
  font-size: clamp(12px, 1.4vw, 15px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.32;
  pointer-events: none;
}

.stage::before {
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  filter: none;
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(2, 5, 8, 0.7), rgba(2, 4, 7, 0.8)),
    radial-gradient(circle at top, rgba(76, 121, 214, 0.12), transparent 42%),
    radial-gradient(circle at right, rgba(176, 62, 49, 0.12), transparent 38%);
}

.stage::after {
  width: 320px;
  height: 320px;
  background: rgba(78, 128, 221, 0.34);
  transform: translate(-38vw, -24vh);
}

.stage .stage-glow {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.32;
  pointer-events: none;
  width: 360px;
  height: 360px;
  background: rgba(195, 96, 71, 0.26);
  transform: translate(34vw, 22vh);
}

.card-shell {
  --card-glare-x: 50%;
  --card-glare-y: 42%;
  --card-shadow-scale: 1;
  --card-shadow-opacity: 0.42;
  position: relative;
  width: min(72vw, 430px);
  max-width: calc((100vh - 128px) * (1094 / 1698));
  max-height: calc(100vh - 128px);
  aspect-ratio: 1094 / 1698;
  transform-style: preserve-3d;
  transform: translateY(16px);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.card-shell.is-dragging {
  cursor: grabbing;
}

.admin-qr-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.7);
  color: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.admin-qr-button:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 95, 119, 0.4);
  background: rgba(255,255,255,0.08);
}

.card-tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.card-glare {
  position: absolute;
  inset: 1.2%;
  z-index: 3;
  border-radius: 20px;
  background:
    linear-gradient(125deg, rgba(255,255,255,0.16), transparent 30%, transparent 65%, rgba(255,255,255,0.08));
  mix-blend-mode: screen;
  opacity: 0.72;
  pointer-events: none;
  transform: translateZ(30px);
  transition: opacity 240ms ease;
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  backface-visibility: hidden;
  box-shadow: var(--shadow);
}

.card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255,255,255,0.2), transparent 24%),
    linear-gradient(320deg, rgba(255,255,255,0.06), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 32%, rgba(0,0,0,0.1));
  mix-blend-mode: screen;
  pointer-events: none;
}

.card-face img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.card-face--back {
  transform: rotateY(180deg);
}

.card-shadow {
  position: absolute;
  inset: auto 10% -10% 10%;
  height: 16%;
  background: radial-gradient(circle, rgba(0,0,0,var(--card-shadow-opacity)), transparent 68%);
  filter: blur(30px);
  transform: translateZ(-80px) scale(var(--card-shadow-scale));
  pointer-events: none;
  transition: background 180ms linear;
}

.card-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.card-note {
  position: absolute;
  left: 50%;
  bottom: 7.6%;
  z-index: 2;
  margin: 0;
  padding: 10px 16px;
  width: min(74%, 280px);
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.68);
  backdrop-filter: blur(12px);
  color: rgba(255, 214, 236, 0.96);
  font-size: clamp(11px, 1.15vw, 13px);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.qr-link {
  position: absolute;
  top: 39.5%;
  left: 50%;
  width: 32.5%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  display: block;
  z-index: 2;
  pointer-events: none;
  text-decoration: none;
  cursor: default;
  transform-style: preserve-3d;
}

.qr-link::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 62%);
  filter: blur(18px);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.qr-link::after {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.82), rgba(255,255,255,0.24) 42%, transparent 72%);
  opacity: 0;
  transform: scale(0.86);
  filter: blur(10px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.qr-wrap {
  position: absolute;
  inset: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translateZ(14px);
  transform-origin: 50% 50%;
}

.qr-wrap > div,
.qr-wrap svg,
.qr-wrap canvas,
.qr-wrap img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: transparent !important;
  pointer-events: none;
}

.qr-link:hover .qr-wrap,
.qr-link:focus-visible .qr-wrap,
.qr-link.is-active .qr-wrap {
  filter:
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.28))
    drop-shadow(0 0 34px rgba(255, 255, 255, 0.16));
  transform: scale(1.035);
}

.qr-wrap {
  transition: transform 180ms ease, filter 180ms ease;
}

.qr-link:hover::before,
.qr-link:focus-visible::before,
.qr-link.is-active::before {
  opacity: 0.88;
  transform: scale(1.02);
}

.qr-link.is-shining::before {
  opacity: 1;
  animation: qrAuraGlow 720ms ease-in-out 4 alternate;
}

.qr-link.is-shining::after {
  opacity: 0.92;
  animation: qrCoreGlow 740ms ease-in-out 4 alternate;
}

.qr-link.is-shining .qr-wrap {
  animation: qrSparkle 760ms ease-in-out 4 alternate;
  filter:
    drop-shadow(0 0 20px rgba(255, 255, 255, 0.36))
    drop-shadow(0 0 44px rgba(255, 255, 255, 0.3));
}

.card-shell.is-back-visible .card-glare {
  opacity: 0.92;
}

.card-shell.is-auto-flipping {
  pointer-events: none;
}

.card-socials {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.74);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
  max-width: calc(100vw - 20px);
  max-width: calc(100dvw - 20px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.card-socials::-webkit-scrollbar {
  display: none;
}

.card-socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: rgba(245, 241, 232, 0.88);
  text-decoration: none;
  appearance: none;
  font: inherit;
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, color 220ms ease;
}

.card-socials__link:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 95, 119, 0.28);
  background: rgba(255,255,255,0.07);
  color: #dfa4b3;
}

.card-socials__link--demo {
  width: auto;
  min-width: 180px;
  padding: 0 16px;
  border-color: rgba(201, 95, 119, 0.34);
  background: linear-gradient(180deg, rgba(201, 95, 119, 0.2), rgba(111, 134, 255, 0.16));
  color: #fff4f7;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.card-socials__link--demo:hover {
  border-color: rgba(201, 95, 119, 0.5);
  background: linear-gradient(180deg, rgba(201, 95, 119, 0.28), rgba(111, 134, 255, 0.22));
  color: #ffffff;
}

.card-socials__link--demo:active {
  transform: translateY(0) scale(0.98);
}

.card-socials__link--download {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05));
}

.card-socials__link--download:hover {
  border-color: rgba(201, 95, 119, 0.36);
  background: linear-gradient(180deg, rgba(255,255,255,0.17), rgba(255,255,255,0.08));
}

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

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 24%),
    radial-gradient(circle at center, rgba(84, 112, 170, 0.1), transparent 42%),
    rgba(1, 3, 6, 0.2);
  backdrop-filter: blur(10px);
}

.qr-modal__code {
  width: 80%;
  max-width: 300px;
  aspect-ratio: 1;
  position: relative;
  padding: 24px;
  cursor: pointer;
}

.qr-modal__code::before {
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 56%);
  filter: blur(34px);
  opacity: 0.78;
}

.qr-modal__code::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 58%),
    rgba(255,255,255,0.025);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
}

.qr-modal__code > div,
.qr-modal__code svg,
.qr-modal__code canvas,
.qr-modal__code img {
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  display: block;
  overflow: visible;
  border-radius: 0;
}

@keyframes qrSparkle {
  from {
    transform: translateZ(14px) scale(1);
  }
  to {
    transform: translateZ(14px) scale(1.08);
  }
}

@keyframes qrAuraGlow {
  from {
    opacity: 0.52;
    transform: scale(0.96);
    filter: blur(18px);
  }
  to {
    opacity: 1;
    transform: scale(1.12);
    filter: blur(28px);
  }
}

@keyframes qrCoreGlow {
  from {
    opacity: 0.18;
    transform: scale(0.82);
  }
  to {
    opacity: 0.92;
    transform: scale(1.08);
  }
}

@media (max-width: 640px) {
  .stage {
    min-height: 100svh;
    min-height: 100dvh;
    padding: 72px 16px 88px;
  }

  .card-title {
    top: 16px;
    max-width: calc(100vw - 36px);
    padding: 9px 14px;
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .card-shell {
    width: min(90vw, 410px);
    max-width: calc((100svh - 106px) * (1094 / 1698));
    max-width: calc((100dvh - 106px) * (1094 / 1698));
    max-height: calc(100svh - 106px);
    max-height: calc(100dvh - 106px);
    transform: translateY(10px);
  }

  .qr-link {
    top: 40%;
    width: 32%;
  }

  .card-note {
    bottom: 7.9%;
    width: min(78%, 260px);
    padding: 9px 14px;
    font-size: 11px;
  }

  .card-socials {
    bottom: 10px;
    left: 50%;
    gap: 8px;
    padding: 8px 9px;
  }

  .card-socials__link {
    width: 38px;
    height: 38px;
  }

  .card-socials__link--demo {
    min-width: 180px;
    padding: 0 14px;
  }
}
