:root {
  --bg: #1a0c08;
  --bg-2: #2a140c;
  --card: rgba(255, 236, 210, 0.07);
  --card-2: rgba(255, 236, 210, 0.12);
  --line: rgba(242, 182, 50, 0.24);
  --text: #fbf1e2;
  --muted: #dcc2a2;
  --gold: #f2b632;
  --gold-2: #ffd98a;
  --ok: #2fd88a;
  --bad: #ff5a5a;
  --a: #1cc7b1;
  --b: #f2b632;
  --c: #e0443a;
  --d: #2f7fd8;
  --r: 18px;
  --r-lg: 28px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --head: "Unbounded", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--head); margin: 0; line-height: 1.12; letter-spacing: -0.01em; }

/* фон: ночное небо + звёзды */
.sky {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(224, 68, 58, 0.28), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(242, 182, 50, 0.12), transparent 60%),
    linear-gradient(180deg, #2a0f09 0%, #1a0c08 55%, #120805 100%);
}
.sky img, .sky video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; animation: kenburns 50s ease-in-out infinite alternate; }
.sky video { animation: none; }
.sky .missing { display: none; }
.sky .shade { position: absolute; inset: 0; background: radial-gradient(75% 70% at 50% 50%, rgba(22, 9, 5, 0.55), rgba(22, 9, 5, 0.2) 80%); }
@keyframes kenburns { from { transform: scale(1.01); } to { transform: scale(1.05); } }
.sky::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 58% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 90% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 66% 46%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 8% 70%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 72%, #fff 50%, transparent 51%);
  opacity: 0; animation: none;
}
@keyframes twinkle { from { opacity: 0.3; } to { opacity: 0.7; } }

/* орнамент-полоса */
.orn { height: 22px; opacity: 0.8; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2064%2026%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M32%2024V16C32%208%2025%204%2019%206C13%208%2012%2015%2016%2017C19%2019%2022%2016%2020%2013%27/%3E%3Cpath%20d%3D%27M32%2016C32%208%2039%204%2045%206C51%208%2052%2015%2048%2017C45%2019%2042%2016%2044%2013%27/%3E%3Cpath%20d%3D%27M0%2024H64%27%20stroke-width%3D%271.4%27%20opacity%3D%27.7%27/%3E%3Ccircle%20cx%3D%274%27%20cy%3D%2714%27%20r%3D%271.6%27%20fill%3D%27%23f2b632%27%20stroke%3D%27none%27/%3E%3Ccircle%20cx%3D%2760%27%20cy%3D%2714%27%20r%3D%271.6%27%20fill%3D%27%23f2b632%27%20stroke%3D%27none%27/%3E%3C/g%3E%3C/svg%3E") center / 52px 22px repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.corners { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27translate%2840%200%29%20scale%28-1%201%29%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27translate%280%2040%29%20scale%281%20-1%29%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27translate%2840%2040%29%20scale%28-1%20-1%29%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E"); background-repeat: no-repeat;
  background-position: 10px 10px, calc(100% - 10px) 10px, 10px calc(100% - 10px), calc(100% - 10px) calc(100% - 10px); background-size: 34px 34px; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 14px;
  background: var(--card-2); color: var(--text); font-weight: 800; font-size: 16px;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.gold {
  background: linear-gradient(180deg, #ffd765, #f5a91d); color: #2a1a00;
  box-shadow: 0 8px 24px rgba(255, 180, 40, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn.gold:hover { background: linear-gradient(180deg, #ffe08a, #ffb627); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--card); }
.btn.danger { background: rgba(255, 90, 90, 0.16); color: #ffb3b3; }
.btn.big { min-height: 64px; font-size: 19px; padding: 0 30px; border-radius: 18px; }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

.card {
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E") 10px 10px / 30px 30px no-repeat, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27translate%2840%200%29%20scale%28-1%201%29%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E") calc(100% - 10px) 10px / 30px 30px no-repeat,
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27translate%280%2040%29%20scale%281%20-1%29%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E") 10px calc(100% - 10px) / 30px 30px no-repeat, url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cg%20transform%3D%27translate%2840%2040%29%20scale%28-1%20-1%29%27%20fill%3D%27none%27%20stroke%3D%27%23f2b632%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M4%2036V14C4%208%208%204%2014%204H36%27/%3E%3Cpath%20d%3D%27M10%2030V18C10%2013%2013%2010%2018%2010C23%2010%2025%2015%2022%2017C19%2019%2016%2016%2018%2014%27/%3E%3C/g%3E%3C/svg%3E") calc(100% - 10px) calc(100% - 10px) / 30px 30px no-repeat,
    linear-gradient(180deg, rgba(64, 22, 12, 0.8), rgba(30, 12, 7, 0.84));
  border: 1px solid var(--line); border-radius: var(--r-lg); position: relative;
  box-shadow: inset 0 0 0 5px rgba(20, 8, 4, 0.35), inset 0 0 0 6px rgba(242, 182, 50, 0.14), var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--card-2); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 0;
  background: var(--card); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background 0.2s, box-shadow 0.2s;
}
.seg button:hover { background: var(--card-2); }
.seg button[aria-pressed="true"] { background: rgba(242, 182, 50, 0.16); box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold-2); }

label.f { display: block; margin-bottom: 14px; }
label.f span { display: block; font-weight: 800; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
label.f small { font-weight: 600; opacity: 0.8; }
input.in {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px; border: 0;
  background: rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 17px; font-weight: 700;
  transition: box-shadow 0.2s;
}
input.in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
input.in::placeholder { color: rgba(255, 255, 255, 0.3); font-weight: 600; }

.err { color: #ffb3b3; background: rgba(255, 90, 90, 0.12); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin: 10px 0 0; }
.muted { color: var(--muted); }
.gold-t { color: var(--gold); }

/* картина команды: золотая рамка, свечение цвета команды, блик пробегает по картине */
.island { position: relative; aspect-ratio: 1; border-radius: 22%; isolation: isolate; animation: tileFloat 6s ease-in-out infinite; animation-delay: var(--fd, 0s); }
.island .pic { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: 1;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px rgba(20, 8, 4, .85), 0 0 0 6.5px color-mix(in srgb, var(--lc) 80%, #fff), 0 14px 34px rgba(0, 0, 0, .55), 0 0 40px color-mix(in srgb, var(--lc) 45%, transparent);
  background: radial-gradient(70% 70% at 50% 35%, color-mix(in srgb, var(--lc) 70%, #fff 10%), color-mix(in srgb, var(--lc) 35%, #1a0c08)), url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2060%2060%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23fff%27%20stroke-opacity%3D%27.18%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M30%2050V38C30%2028%2022%2024%2016%2026C10%2028%2010%2036%2014%2037C18%2038%2020%2034%2017%2032%27/%3E%3Cpath%20d%3D%27M30%2038C30%2028%2038%2024%2044%2026C50%2028%2050%2036%2046%2037C42%2038%2040%2034%2043%2032%27/%3E%3Cpath%20d%3D%27M30%2010V20%27/%3E%3C/g%3E%3C/svg%3E") center / 34% repeat; }
.island img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); animation: kb 14s ease-in-out infinite alternate; animation-delay: var(--fd, 0s); }
.island .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 240, 200, .45) 48%, transparent 60%) -150% 0 / 250% 100% no-repeat; animation: sheen 5s ease-in-out infinite; animation-delay: var(--fd, 0s); mix-blend-mode: soft-light; }
.island .pic::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 30px rgba(0, 0, 0, .45), inset 0 -40px 40px -20px rgba(0, 0, 0, .35); pointer-events: none; }
.island.noimg img { display: none; }
.island .glow { position: absolute; inset: 6%; border-radius: 30%; z-index: -1; background: color-mix(in srgb, var(--lc) 70%, transparent); filter: blur(26px); animation: pulse 4s ease-in-out infinite; animation-delay: var(--fd, 0s); }
.island .spark { position: absolute; z-index: 3; width: 6px; height: 6px; border-radius: 50%; background: #fff6dc; box-shadow: 0 0 10px 3px var(--gold); opacity: 0; animation: spark 3.2s ease-in-out infinite; }
.island .spark:nth-of-type(1) { left: 8%; top: 12%; animation-delay: calc(var(--fd, 0s) + 0.2s); }
.island .spark:nth-of-type(2) { left: 88%; top: 18%; animation-delay: calc(var(--fd, 0s) + 1.3s); }
.island .spark:nth-of-type(3) { left: 82%; top: 86%; animation-delay: calc(var(--fd, 0s) + 2.2s); }
@keyframes tileFloat { 0%, 100% { transform: translateY(0) rotate(-0.8deg); } 50% { transform: translateY(-3%) rotate(0.8deg); } }
@keyframes kb { to { transform: scale(1.14) translate(-2%, 1%); } }
@keyframes sheen { 0%, 55% { background-position: -150% 0; } 100% { background-position: 150% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%, 100% { opacity: 0.45; transform: scale(0.96); } 50% { opacity: 0.85; transform: scale(1.06); } }
@keyframes spark { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 45% { opacity: 1; transform: scale(1.2) rotate(45deg); } 70% { opacity: 0; transform: scale(0.5) rotate(90deg); } }
.l-a { --lc: var(--a); } .l-b { --lc: var(--b); } .l-c { --lc: var(--c); } .l-d { --lc: var(--d); }

/* блестящий текст */
.shine {
  background: linear-gradient(100deg, var(--gold) 0%, #fff6d6 18%, var(--gold) 36%, #f5a91d 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: shine 4s linear infinite;
}
@keyframes shine { from { background-position: 120% 0; } to { background-position: -130% 0; } }

/* бегущая золотая рамка */
.ring { position: relative; }
.ring::before {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; z-index: -1; padding: 3px;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 55%, var(--gold) 70%, #fff 75%, var(--gold) 80%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ang 3.5s linear infinite;
}
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ang { to { --ang: 360deg; } }

/* появление по очереди */
.stagger > * { animation: rise 0.6s cubic-bezier(0.2, 1, 0.3, 1) both; }
.stagger > *:nth-child(2) { animation-delay: 0.07s; } .stagger > *:nth-child(3) { animation-delay: 0.14s; }
.stagger > *:nth-child(4) { animation-delay: 0.21s; } .stagger > *:nth-child(5) { animation-delay: 0.28s; }
.stagger > *:nth-child(6) { animation-delay: 0.35s; }

.float-text {
  position: fixed; z-index: 75; transform: translate(-50%, -50%); pointer-events: none;
  font-family: var(--head); font-weight: 900; font-size: clamp(28px, 3vw, 56px); text-shadow: 0 0 24px currentColor;
  animation: floatUp 1.4s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); } 20% { opacity: 1; transform: translate(-50%, -40px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -140px) scale(1); } }

.countdown { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; background: radial-gradient(circle, rgba(40, 16, 8, 0.55), rgba(20, 8, 4, 0.93)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.countdown::before { content: ""; position: absolute; width: min(80vw, 80vh); aspect-ratio: 1; background: url(/img/shanyrak.jpg) center / contain no-repeat; opacity: .75; mix-blend-mode: screen; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.countdown span { position: relative;
  font-family: var(--head); font-weight: 900; font-size: min(42vw, 46vh); line-height: 1; color: #fff;
  text-shadow: 0 0 40px rgba(242, 182, 50, 0.9), 0 0 120px rgba(242, 182, 50, 0.6); animation: cd 0.8s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.countdown span.go { font-size: min(16vw, 22vh); color: var(--gold); }
.countdown.out { animation: toastOut 0.35s ease forwards; }
@keyframes cd { from { opacity: 0; transform: scale(2.4); filter: blur(10px); } 60% { opacity: 1; filter: blur(0); } to { transform: scale(1); } }

/* тосты */
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 50; max-width: min(420px, calc(100vw - 36px)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 16px;
  background: rgba(44, 20, 11, 0.95); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-weight: 800; animation: toastIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

.pop { animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } }
.rise { animation: rise 0.5s cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

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