/* Date Range */
.date-range {
  margin: 1.5rem 0;
  text-align: center;
}

.date-range-text {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  box-shadow: 0 5px 18px rgba(155, 44, 255, 0.25);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.date-range-text:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(155, 44, 255, 0.35);
}

/* Base */
:root {
  --bg: #f7f5fc; /* светлый фоновый */
  --panel: #ffffff; /* панели/карточки */
  --soft: #f1ecfb; /* мягкие элементы */
  --text: #1e1530; /* основной тёмный */
  --muted: #6e6683; /* приглушённый */
  --accent: #9b2cff; /* фиолетовый-ягодный */
  --accent-2: #ff4db8; /* розовый-ягодный */
  --accent-3: #6be4ff; /* ледяной голубой */
  --success: #39d98a;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: var(--text);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 800;
}
.nav {
  display: flex;
  gap: 16px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover {
  color: var(--text);
}
.auth {
  display: flex;
  gap: 10px;
}

/* WB-like header */
.site-header.wb {
  background: #6f00ff;
  border-bottom: 0;
}
.site-header.wb .wb-links {
  background: transparent;
  color: #fff;
  opacity: 0.9;
  font-size: 13px;
}
.site-header.wb .wb-links .links-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 34px;
}
.site-header.wb .wb-links a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}
.site-header.wb .wb-links a:hover {
  opacity: 1;
}
.site-header.wb .wb-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: 70px;
}
.site-header.wb .brand {
  color: #fff;
}
.site-header.wb .brand span {
  color: #fff;
}
.wb-burger {
  appearance: none;
  background: rgba(255, 255, 255, 0.22);
  border: 0;
  color: #fff;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}
.wb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border-radius: 16px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.wb-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 16px;
  color: #1c1c1c;
  background: transparent;
  padding: 12px;
}
.wb-search input::placeholder {
  color: #9aa1b2;
}
.wb-search .cam {
  appearance: none;
  border: 0;
  background: #f3f4f6;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  cursor: pointer;
}
.wb-actions {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  color: #fff;
}
.wb-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.wb-act .ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wb-act span:last-child {
  font-size: 12px;
  opacity: 0.95;
}

/* Compact responsiveness */
@media (max-width: 960px) {
  .site-header.wb .wb-top {
    grid-template-columns: auto 1fr auto;
  }
  .wb-act span:last-child {
    display: none;
  }
}
@media (max-width: 640px) {
  .wb-search input {
    font-size: 14px;
  }
  .wb-burger {
    width: 36px;
    height: 36px;
  }
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  color: var(--text);
  background: var(--soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  border-color: transparent;
}
.btn-primary:hover {
  filter: brightness(1.1);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
}
.btn-ghost {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.16);
  color: var(--text);
}
.btn-xl {
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 18px;
}
.w-100 {
  width: 100%;
}
.chip {
  border-radius: 999px;
  padding: 8px 14px;
  background: #f7f3ff;
  color: var(--muted);
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
}
.chip.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}

/* Hero */
.hero {
  padding: 48px 0 20px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.hero h1 {
  font-family: Montserrat, Inter, sans-serif;
  font-size: 44px;
  margin: 0 0 12px;
}
.hero p {
  color: var(--muted);
  margin: 0 0 18px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin: 10px 0 8px;
}
.hero-art img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.1));
}
.trust {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.countdown {
  display: flex;
  gap: 12px;
}
.countdown div {
  background: var(--panel);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  min-width: 84px;
  padding: 10px 8px;
  text-align: center;
}
.countdown span {
  display: block;
  font-weight: 800;
  font-size: 28px;
  font-family: Montserrat;
}
.countdown small {
  color: var(--muted);
}

/* Sections */
.section {
  padding: 36px 0;
}
.section.alt {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), transparent);
}
.section h2 {
  font-family: Montserrat, Inter, sans-serif;
  font-size: 28px;
  margin: 0 0 16px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step-card {
  background: var(--panel);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 18px;
}
.step-card h3 {
  margin: 10px 0 6px;
  font-size: 18px;
}
.step-card p {
  margin: 0;
  color: var(--muted);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card {
  background: #f7f3ff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card .media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  background: white;
  overflow: hidden;
}

.card .media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card:hover .media img {
  transform: scale(1.05);
}

.loss-item {
  background-color: #ffebee;
  color: #d32f2f;
  border: 1px solid #d32f2f;
}

/* Responsive adjustments for prizes page */
@media (max-width: 767px) {
  .section-head {
    flex-wrap: wrap;
    gap: 12px;
  }

  .section-head h2 {
    width: 100%;
    margin: 0;
    text-align: left;
  }

  .section-head .filters {
    order: 2; /* Place filters after the button on mobile */
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px; /* For scrollbar space */
    scrollbar-width: none; /* Firefox */
  }

  .section-head .filters::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
  }

  .section-head #btn-participate {
    order: 1;
    margin-left: auto; /* Keep it to the right of the title on the same line if space allows initially */
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card .body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h3 {
  margin: 0;
  font-size: 18px;
}
.card p {
  margin: 0;
  color: var(--muted);
}
.card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}
.card .actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Rules */
.rules {
  margin: 0 0 20px 0;
  padding: 20px;
  color: var(--muted);
  background: var(--soft);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.rules li {
  padding-left: 10px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.rules li::marker {
  color: var(--accent);
  font-weight: bold;
}

/* Winners */
.winners {
  display: grid;
  gap: 10px;
}
.winner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 10px;
}
.winner .badge {
  background: var(--accent-2);
  color: #2b2100;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 16px;
}
.footer-inner {
  display: grid;
  gap: 20px;
  padding: 26px 0;
}
.footer-inner.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}
.foot-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.foot-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: #2c223f;
}
.foot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.foot-list a {
  color: #4f4a63;
  text-decoration: none;
}
.foot-list a:hover {
  color: #2c223f;
}
.foot-app-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4f4a63;
}
.qr {
  display: inline-flex;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  margin-top: 6px;
}
.socials {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.socials.small img {
  opacity: 0.8;
}
.socials.small img:hover {
  opacity: 1;
}
.legal {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 0;
  color: var(--muted);
}

/* Modal */
.modal[hidden] {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.modal-card {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  max-width: 420px;
  margin: 10vh auto;
  padding: 18px;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: 24px;
  cursor: pointer;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: var(--text);
}
.hint {
  color: var(--muted);
  font-size: 12px;
}

/* Roulette Modal */
.roulette-card {
  max-width: 600px;
  text-align: center;
}
.roulette-container {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,.08);
  background: #f7f3ff;
}
.roulette-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--accent);
  z-index: 10;
  box-shadow: 0 0 10px var(--accent);
}
.roulette-track {
  display: flex;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  transition: left 5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.prize-item {
  width: 120px;
  height: 120px;
  margin: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,.06);
  flex-shrink: 0;
}
.prize-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.prize-item span {
  font-size: 12px;
  margin-top: 8px;
  color: var(--muted);
  text-align: center;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner.cols-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .nav {
    display: none;
  }
  .hero h1 {
    font-size: 32px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .countdown div {
    min-width: 70px;
  }
  .footer-inner.cols-5 {
    grid-template-columns: 1fr;
  }
}

/* Telegram Auth Styles */
#telegram-auth-modal .field {
  margin-bottom: 16px;
}

#telegram-auth-modal .field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

#telegram-auth-modal input[type="tel"],
#telegram-auth-modal input[type="text"],
#telegram-auth-modal input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}

#telegram-auth-modal input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155, 44, 255, 0.1);
}

#telegram-auth-success {
  padding: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

#telegram-auth-error {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 77, 77, 0.1);
  border-radius: 8px;
  border-left: 3px solid #ff4d4d;
}

#telegram-auth-error p {
  margin: 0;
  color: #d32f2f;
  font-size: 14px;
}