:root {
  --bg: #030405;
  --bg-2: #0a0d10;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --green: #34d399;
  --green-bright: #4ade80;
  --green-dim: rgba(52, 211, 153, 0.22);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.22);
  --red: #fb7185;
  --radius: 20px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 0, 0, 0.25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-height: 58px;
  --bet-strip-height: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: 58px;
  font-family: var(--font);
  color: var(--text);
  text-shadow: var(--text-shadow);
  background: var(--bg);
  overflow-x: hidden;
}

/* Liquid animated background */
.liquid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(165deg, #030405 0%, #061210 40%, #050a14 100%);
}

.liquid-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}

.liquid-bg__blob--1 {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  background: radial-gradient(circle, rgba(16, 120, 72, 0.55) 0%, transparent 70%);
  top: -12%;
  left: -8%;
  animation: blob-drift-1 22s ease-in-out infinite;
}

.liquid-bg__blob--2 {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  background: radial-gradient(circle, rgba(30, 64, 120, 0.5) 0%, transparent 70%);
  top: 35%;
  right: -10%;
  animation: blob-drift-2 26s ease-in-out infinite;
}

.liquid-bg__blob--3 {
  width: min(45vw, 340px);
  height: min(45vw, 340px);
  background: radial-gradient(circle, rgba(20, 90, 60, 0.45) 0%, transparent 70%);
  bottom: -8%;
  left: 20%;
  animation: blob-drift-3 20s ease-in-out infinite;
}

.liquid-bg__blob--4 {
  width: min(40vw, 300px);
  height: min(40vw, 300px);
  background: radial-gradient(circle, rgba(40, 50, 100, 0.4) 0%, transparent 70%);
  top: 15%;
  left: 45%;
  animation: blob-drift-4 24s ease-in-out infinite;
}

@keyframes blob-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8vw, 6vh) scale(1.08); }
  66% { transform: translate(4vw, -4vh) scale(0.95); }
}

@keyframes blob-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10vw, 8vh) scale(1.1); }
}

@keyframes blob-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(12vw, -6vh) scale(1.06); }
  80% { transform: translate(-6vw, 4vh) scale(0.92); }
}

@keyframes blob-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-8vw, -10vh) scale(1.12); }
}

/* Floating betting-themed icons */
.float-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.float-icon,
.float-coef {
  position: absolute;
  color: rgba(255, 255, 255, 0.12);
  will-change: transform;
}

.float-icon {
  width: clamp(48px, 8vw, 88px);
  height: auto;
}

.float-coef {
  font-weight: 800;
  font-size: clamp(1.1rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  color: rgba(52, 211, 153, 0.15);
}

.float-icon--1 { top: 18%; left: 8%; animation: float-drift-a 38s linear infinite; }
.float-icon--2 { top: 62%; left: 78%; width: clamp(56px, 9vw, 96px); animation: float-drift-b 45s linear infinite; }
.float-icon--3 { top: 42%; left: 62%; width: clamp(72px, 11vw, 110px); animation: float-drift-c 32s linear infinite; }
.float-icon--4 { top: 78%; left: 12%; animation: float-drift-d 40s linear infinite; }
.float-icon--5 { top: 28%; left: 82%; animation: float-drift-e 28s linear infinite; }
.float-icon--6 { top: 52%; left: 4%; animation: float-drift-f 34s linear infinite; }
.float-icon--7 { top: 8%; left: 48%; animation: float-drift-g 42s linear infinite; }
.float-icon--8 { top: 88%; left: 55%; animation: float-drift-h 36s linear infinite; }

@keyframes float-drift-a {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -40px) rotate(8deg); }
  50% { transform: translate(-20px, 25px) rotate(-5deg); }
  75% { transform: translate(15px, 35px) rotate(4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float-drift-b {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-35px, 20px) rotate(-10deg); }
  66% { transform: translate(25px, -30px) rotate(6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float-drift-c {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-40px, -25px); }
  100% { transform: translate(0, 0); }
}

@keyframes float-drift-d {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(35px, -45px) rotate(12deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float-drift-e {
  0% { transform: translate(0, 0); }
  50% { transform: translate(20px, 30px); }
  100% { transform: translate(0, 0); }
}

@keyframes float-drift-f {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-25px, -35px); }
  100% { transform: translate(0, 0); }
}

@keyframes float-drift-g {
  0% { transform: translate(0, 0); }
  50% { transform: translate(30px, 20px); }
  100% { transform: translate(0, 0); }
}

@keyframes float-drift-h {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 15px); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-bg__blob,
  .float-icon,
  .float-coef {
    animation: none !important;
  }
}

.glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 58px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: 1100px;
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
}

.logo-accent {
  color: var(--green);
}

.spots-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.92rem;
}

.spots-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.8);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
  }
}

.main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 18px 100px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: var(--text-shadow);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 62ch;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  color: #fff;
  text-shadow: var(--text-shadow);
}

.section-head .muted {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.tiny {
  font-size: 0.78rem;
  line-height: 1.45;
}

.history-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 900px) {
  .history-layout {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.bet-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bet-feed-scroll {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.bet-feed-scroll::-webkit-scrollbar {
  width: 4px;
}

.bet-feed-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.bet-feed-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.bet-feed-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.bet-row {
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  gap: 6px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.bet-row:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.12);
}

.bet-row__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.bet-row__match {
  font-weight: 700;
  font-size: 1rem;
}

.bet-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.92rem;
}

.direction-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.direction-pill.over {
  color: var(--green);
  background: var(--green-dim);
}

.direction-pill.under {
  color: var(--blue);
  background: var(--blue-dim);
}

.coef {
  color: var(--text);
  font-weight: 600;
}

.result-badge {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

.result-badge.win {
  color: var(--green);
}

.result-badge.loss {
  color: var(--red);
}

.result-badge.pending {
  color: var(--muted);
}

.calc {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.calc h3 {
  margin: 0 0 8px;
}

.calc-result {
  margin: 12px 0 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--green);
}

.calc-result.negative {
  color: var(--red);
}

.about-text p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 12px;
}

.about-text h3 {
  margin: 20px 0 10px;
  font-size: 1.05rem;
  color: var(--text);
}

.about-text h3:first-of-type {
  margin-top: 0;
}

.about-divider {
  border: none;
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 18px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #16a34a, #34d399, #4ade80);
  color: #04120a;
  box-shadow: 0 8px 28px rgba(52, 211, 153, 0.35);
  text-shadow: none;
}

.btn-primary:hover {
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.65), 0 0 48px rgba(52, 211, 153, 0.35), 0 8px 32px rgba(52, 211, 153, 0.45);
  filter: brightness(1.05);
}

.btn-vk,
a.btn-vk,
a.vk-btn {
  background: linear-gradient(135deg, #2787f5, #4d9fff);
  color: #fff;
  box-shadow: 0 8px 28px rgba(39, 135, 245, 0.35);
  text-shadow: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-vk:hover,
a.btn-vk:hover,
a.vk-btn:hover {
  box-shadow: 0 0 24px rgba(39, 135, 245, 0.5), 0 8px 32px rgba(39, 135, 245, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}

#authSection .section-head {
  margin-bottom: 0;
}

.auth-guest {
  margin-top: 16px;
}

.vk-hint {
  margin-top: 10px;
}

.phone-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
  margin-top: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.field input {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  text-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.user-greet {
  margin: 0 0 8px;
  font-weight: 600;
}

.participant-line {
  margin-top: 12px;
  color: var(--green);
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-brand {
  margin: 0 0 4px;
  font-weight: 800;
}

.footer a {
  color: var(--green);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Плашка активной ставки (после ручного закрытия модалки) */
#betActiveStrip {
  position: fixed;
  top: 58px;
  left: 0;
  width: 100%;
  z-index: 999;
  margin: 0;
  border: none;
  box-sizing: border-box;
  min-height: 44px;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: clamp(0.78rem, 2.5vw, 0.92rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  color: #04120a;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
  transition: filter 0.2s ease, transform 0.15s ease;
}

.bet-active-strip:hover {
  filter: brightness(1.06);
}

.bet-active-strip:active {
  transform: scale(0.995);
}

.bet-active-strip.hidden {
  display: none;
}

.bet-active-strip.over {
  background: linear-gradient(135deg, #22c55e, #34d399);
}

.bet-active-strip.under {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: #0a1628;
}

body.has-bet-strip {
  padding-top: 102px;
}

/* Fullscreen bet modal */
.bet-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 5, 8, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fade-in 0.35s ease both;
}

.bet-modal.hidden {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bet-modal__pulse {
  position: absolute;
  inset: -8%;
  background: radial-gradient(circle at 50% 45%, rgba(52, 211, 153, 0.35), transparent 55%),
    radial-gradient(circle at 30% 70%, rgba(96, 165, 250, 0.22), transparent 50%);
  filter: blur(8px);
  animation: modal-pulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes modal-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

.bet-modal__content {
  position: relative;
  z-index: 2;
  width: min(960px, 92vw);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 40px);
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.45), 0 0 80px rgba(52, 211, 153, 0.08);
  animation: pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pop-in {
  from {
    transform: translateY(18px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.bet-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  text-shadow: none;
}

.bet-modal__teams {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.bet-modal__line {
  margin: 0 0 10px;
  font-size: clamp(3.2rem, 14vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.bet-modal__ou {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.bet-modal__ou.over {
  color: var(--green);
  text-shadow: 0 0 40px rgba(52, 211, 153, 0.55);
}

.bet-modal__ou.under {
  color: var(--blue);
  text-shadow: 0 0 40px rgba(96, 165, 250, 0.55);
}

/* Privacy sheet */
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.privacy-modal.hidden {
  display: none;
}

.privacy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 8, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.privacy-modal__sheet {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  border-radius: 20px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.privacy-text {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
  max-height: min(60vh, 480px);
  overflow: auto;
  margin: 12px 0 16px;
}

.privacy-text h3 {
  margin: 16px 0 8px;
  font-size: 0.92rem;
  color: var(--text);
}

.privacy-text h3:first-of-type {
  margin-top: 8px;
}

.privacy-date {
  color: var(--text);
  font-weight: 600;
}

.privacy-text a {
  color: var(--green);
  text-decoration: none;
}

.privacy-text a:hover {
  text-decoration: underline;
}

code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.85em;
}
