:root {
  --bg: #1f2328;
  --text: #f2f4f7;
  --muted: #aab3bd;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ff2b2b;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% 0%, #2c3440, var(--bg));
  color: var(--text);
}

.page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(980px, 100%);
  background: rgba(38, 43, 49, 0.75);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 18px 0 18px;
}

.logo {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.headerText h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.congratsBtn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.congratsBtn:hover { opacity: 0.9; }
.congratsBtn:active { transform: translateY(1px); }

.content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 18px;
}

.qr {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  object-fit: cover;
  display: block;
}

.right h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.subtitle {
  margin: 0 0 16px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  transition: transform 0.08s ease, background 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.btn.primary {
  border-color: rgba(255, 43, 43, 0.45);
  background: rgba(255, 43, 43, 0.14);
}

.note {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* Карусель */
.carousel {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.carousel h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.carouselWrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carouselViewport {
  overflow: hidden;
  flex: 1;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.carouselTrack {
  display: flex;
  transition: transform 0.3s ease;
}

.carouselTrack img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
  display: block;
}

.nav {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}
.nav:hover { background: rgba(255,255,255,0.15); }

/* Рулетка */
.funSection {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.hidden { display: none; }

.wheelWrap {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  margin: 14px auto 10px;
  border-radius: 50%;
}

.pointer {
  position: absolute;
  top: -6px;                /* остаётся над колесом */
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;

  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid var(--accent); /* 🔥 СМОТРИТ ВНИЗ, ВНУТРЬ */

  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.4));
  z-index: 5;
}

.wheelCanvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  background: rgba(255,255,255,0.03);
}

.wheelControls {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 12px;
}

.wheelResult {
  color: var(--muted);
  font-size: 14px;
}

/* Футер */
.footer {
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  color: var(--muted);
}

.footerInner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.dogBtn {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}
.dogBtn:hover { transform: translateY(-1px); }

/* Конфетти */
.confetti {
  position: fixed;
  left: 0;
  top: 0;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

/* Адаптив */
@media (max-width: 820px) {
  .content { grid-template-columns: 1fr; }
  .logo { width: 76px; height: 76px; }
}
