/* ====================== */
/* ПЕРЕМЕННЫЕ И ОСНОВА    */
/* ====================== */
:root {
  --bg: #0b0c10;
  --glass: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.16);
  --text: #fff;
  --muted: rgba(255,255,255,0.65);
  --red: #b81e2b;
  --purple: #8a2be2;
  --green: #2ecc71;
  --green-gradient: linear-gradient(90deg, #2ecc71, #27ae60, #2ecc71);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --snow-color: #88c0ff;
  --vk-color: #0077FF;
}

.light-theme {
  --bg: #f8f9fa;
  --glass: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.1);
  --text: #222;
  --muted: rgba(0, 0, 0, 0.65);
  --red: #b81e2b;
  --purple: #6c757d;
  --green: #27ae60;
  --green-gradient: linear-gradient(90deg, #27ae60, #219653, #27ae60);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --snow-color: #4a6fa5;
}

* { 
  box-sizing: border-box; 
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #1a1c22, #000);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

body.light-theme {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
}

/* ====================== */
/* ИГРА: СНЕГ И ГЕРОИ     */
/* ====================== */

.snow-container {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

@keyframes fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0.3; }
}

.snowflake {
  position: absolute;
  top: -10px;
  color: rgba(180, 220, 255, 0.8);
  animation: fall linear infinite;
}

@keyframes character-fall {
  0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120vh) rotate(360deg); opacity: 0; }
}

.new-year-character {
  position: fixed;
  top: -50px;
  font-size: 40px;
  cursor: pointer;
  z-index: 2000;
  animation: character-fall linear forwards !important;
  transition: transform 0.3s ease;
  pointer-events: auto !important;
}

.character-counter {
  position: fixed;
  top: 100px; right: 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 20px;
  z-index: 1001;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

/* ====================== */
/* ШАПКА И ТЕМА           */
/* ====================== */

.theme-toggle {
  position: fixed;
  top: 20px; right: 20px;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--border);
  cursor: pointer;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.theme-toggle span {
  position: absolute;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
}

.sun-icon { transform: translateY(40px); opacity: 0; }
.moon-icon { transform: translateY(0); opacity: 1; }

body.light-theme .sun-icon { transform: translateY(0); opacity: 1; }
body.light-theme .moon-icon { transform: translateY(-40px); opacity: 0; }

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  background: rgba(11, 12, 16, 0.7);
  backdrop-filter: blur(10px);
}

body.light-theme .header { background: rgba(248, 249, 250, 0.9); }

.logo { height: 50px; width: 50px; border-radius: 50%; border: 2px solid var(--border); }

.packages-button {
  position: absolute; left: 50%; transform: translateX(-50%);
  padding: 10px 24px;
  background: var(--purple);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
}

/* ====================== */
/* КОНТЕНТ И КАРТОЧКИ     */
/* ====================== */

.wrapper {
  max-width: 1100px;
  margin: auto;
  padding: 120px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 32px;
  margin-bottom: 28px;
  text-align: center;
  width: 100%;
  box-shadow: var(--shadow);
}

.hero-title { font-family: 'Great Vibes', cursive; font-size: clamp(3rem, 7vw, 4.5rem); }
.green-text { color: var(--green); }

.test-link, .motivation-link {
  display: inline-block;
  padding: 12px 24px;
  background: var(--purple);
  color: white !important;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  margin: 5px;
  min-width: 250px;
}

.packages {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
}

.card {
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-8px); }
.card.hit { border: 2px solid var(--green); }

.price { font-size: 2rem; font-weight: 900; color: var(--green); margin: 15px 0; }

.select {
  width: 100%; padding: 16px; border-radius: 14px;
  background: var(--purple); color: white;
  font-weight: 700; border: none; cursor: pointer;
}

/* ====================== */
/* ОПЛАТА (ИСПРАВЛЕНО)    */
/* ====================== */

.payment { max-width: 500px; margin: 0 auto; }

.pay-main {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2e7d32, #4caf50);
  color: white !important;
  padding: 20px; border-radius: 16px;
  text-decoration: none; font-weight: 800; font-size: 1.2rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.installment-btn {
  width: 100%; padding: 16px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: white; font-weight: 700; margin-bottom: 12px; cursor: pointer;
}

.card-pay-button {
  width: 100%; padding: 16px; border-radius: 14px;
  background: var(--glass); color: var(--text);
  border: 1px solid var(--border); font-weight: 700; cursor: pointer;
}

.qr-section { margin-top: 25px; padding-top: 20px; border-top: 1px dashed var(--border); }

.qr-image {
  width: 140px; height: 140px; border-radius: 12px;
  margin: 0 auto; display: block; padding: 8px;
  background: white; box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ====================== */
/* КОНТАКТЫ И АДАПТИВ     */
/* ====================== */

.contacts-section { margin-top: 20px; }

.address-highlight { font-weight: 700; color: var(--green); }

.vk-button {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--vk-color); color: white !important;
  padding: 16px 30px; border-radius: 14px; font-weight: 700;
  text-decoration: none; margin-top: 20px; width: 100%; max-width: 320px;
}

@media (max-width: 768px) {
  .packages { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.5rem; }
}

.footer { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.9rem; }
.green-link { color: var(--green); text-decoration: none; font-weight: 600; }
