:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --text-color: #e0e0e0;
  --background-dark: #1a1a2e;
  --card-background: #2b2b48;
  --tag-free: #28a745;
  --tag-paid: #dc3545;
  --tag-discount: #ffc107;
  --footer-background: #10101a;
}

body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(45deg, var(--background-dark) 0%, #0f0f1d 100%);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

body.home-animation::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, var(--primary-color) 0%, transparent 30%),
              radial-gradient(circle at bottom right, var(--secondary-color) 0%, transparent 30%);
  background-size: 200% 200%;
  animation: backgroundMove 20s infinite alternate ease-in-out;
  z-index: -1;
  opacity: 0.2;
}

@keyframes backgroundMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

body.home-animation::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  z-index: -1;
  box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 0 2px rgba(255, 255, 255, 0.04),
      10px 10px 10px rgba(255, 255, 255, 0.008),
      -10px -10px 10px rgba(255, 255, 255, 0.008),
      20px 20px 20px rgba(255, 255, 255, 0.004),
      -20px -20px 20px rgba(255, 255, 255, 0.004);
  animation: sparkle 25s infinite alternate ease-in-out;
}

@keyframes sparkle {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  25% { transform: translate(10vw, 5vh) scale(1.05); opacity: 0.8; }
  50% { transform: translate(0, 10vh) scale(1); opacity: 0.6; }
  75% { transform: translate(-10vw, 5vh) scale(1.05); opacity: 0.9; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
}

header {
  background: rgba(0, 0, 0, 0.6);
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
  margin: 0;
  color: #fff;
  text-align: center;
  font-size: 2.8em;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  letter-spacing: 2px;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

nav ul li {
  margin: 0 18px;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2em;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
}

nav ul li a i {
  margin-right: 8px;
  font-size: 1.1em;
}

nav ul li a:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

main {
  padding: 50px 0;
  min-height: 70vh;
}

footer {
  background: var(--footer-background);
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0b0b0;
  font-size: 0.9em;
}

.hero-section {
  text-align: center;
  padding: 60px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 15px;
  margin-bottom: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-section h2 {
  font-size: 3.2em;
  color: #fff;
  margin-bottom: 15px;
  text-shadow: 3px 3px 8px rgba(0,0,0,0.6);
}

.hero-section p {
  font-size: 1.4em;
  color: #e0e0e0;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.hero-section img {
  max-width: 80%;
  margin-top: 30px;
  border-radius: 15px;
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 25px rgba(106, 17, 203, 0.6);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 35px;
  margin-top: 40px;
}

.card {
  background: var(--card-background);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, #3b3b5e, #2f2f4c);
}

.card img {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.8em;
  margin-bottom: 12px;
}

.card p {
  font-size: 1.05em;
  color: #c0c0c0;
  margin-bottom: 25px;
  flex-grow: 1;
}

.card .download-btn,
.card .buy-btn {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.15em;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.card .download-btn:hover,
.card .buy-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ... Ваш предыдущий CSS код ... */

.tag {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    animation: tagPop 0.5s ease-out, tagPulseNew 2.5s infinite ease-in-out 0.5s; /* Изменили на tagPulseNew */
    transform-origin: top right;
    text-transform: uppercase;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Добавили transition для плавности наведения */
}

.tag.free {
    background-color: var(--tag-free);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.4); /* Начальный цвет тени */
}
.tag.paid {
    background-color: var(--tag-paid);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4); /* Начальный цвет тени */
}
.tag.discount {
    background-color: var(--tag-discount);
    box-shadow: 0 3px 8px rgba(255, 193, 7, 0.4); /* Начальный цвет тени */
}

@keyframes tagPop {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

/* Новая, более выразительная анимация пульсации */
@keyframes tagPulseNew {
    0% { transform: scale(1); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px rgba(255, 255, 255, 0.4); } /* Легкое свечение */
    100% { transform: scale(1); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); }
}

.tag:hover {
    transform: translateY(-5px) rotate(3deg) scale(1.1); /* Подскок, небольшой поворот и увеличение */
    /* Цвета теней при наведении, в зависимости от типа тега */
}

.tag.free:hover {
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.8); /* Более яркое свечение для Free */
}

.tag.paid:hover {
    box-shadow: 0 0 25px rgba(220, 53, 69, 0.8); /* Более яркое свечение для Paid */
}

.tag.discount:hover {
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.8); /* Более яркое свечение для Discount */
}

/* ... Остальной ваш CSS код ... */

.yert-balance {
  text-align: center;
  margin-bottom: 45px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.yert-balance img {
  width: 65px;
  height: 65px;
  margin-right: 25px;
  animation: rotateCoin 4s infinite linear;
}

@keyframes rotateCoin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.yert-balance p {
  margin: 0;
  font-size: 2.5em;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.4);
}

.yert-balance span {
  color: white;
  margin-left: 10px;
}

.code-section {
  background: linear-gradient(90deg, #3b3b5e, #2b2b48);
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-top: 50px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.code-section h3 {
  color: white;
  font-size: 2em;
  margin-bottom: 28px;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
}

.code-section input[type="text"] {
  padding: 15px 25px;
  width: 65%;
  max-width: 400px;
  border: 2px solid var(--secondary-color);
  border-radius: 10px;
  background-color: #4b4b70;
  color: white;
  font-size: 1.3em;
  margin-right: 18px;
  outline: none;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.code-section input[type="text"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 12px var(--primary-color);
}

.code-section button {
  background: var(--primary-color);
  color: white;
  padding: 15px 30px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.3em;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  letter-spacing: 0.8px;
}

.code-section button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.code-message {
  margin-top: 25px;
  font-weight: bold;
  font-size: 1.3em;
  padding: 12px;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
}

.section-intro {
  text-align: center;
  margin-bottom: 50px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.8s ease-out;
}

.section-intro h2 {
  font-size: 2.5em;
  color: white;
  margin-bottom: 15px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.section-intro h2 i {
  margin-right: 15px;
  color: var(--primary-color);
}

.section-intro p {
  font-size: 1.1em;
  color: #c0c0c0;
  max-width: 800px;
  margin: 0 auto;
}

.section-intro p strong {
  color: var(--secondary-color);
}

.shop-item .item-price {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #e0e0e0;
}

.shop-item .item-price span {
  color: var(--primary-color);
  font-size: 1.3em;
}

@media (max-width: 768px) {
  header h1 {
      font-size: 2em;
  }

  nav ul {
      flex-direction: column;
      align-items: center;
  }

  nav ul li {
      margin: 10px 0;
  }

  .hero-section h2 {
      font-size: 2.2em;
  }

  .hero-section p {
      font-size: 1.1em;
  }

  .card-grid {
      grid-template-columns: 1fr;
  }

  .yert-balance p {
      font-size: 1.8em;
  }

  .yert-balance img {
      width: 50px;
      height: 50px;
  }

  .code-section input[type="text"] {
      width: 90%;
      margin-right: 0;
      margin-bottom: 20px;
  }

  .code-section button {
      width: 90%;
      padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  header h1 {
      font-size: 1.8em;
  }

  nav ul li a {
      font-size: 1em;
      padding: 8px 15px;
  }

  .hero-section h2 {
      font-size: 1.8em;
  }

  .hero-section p {
      font-size: 0.95em;
  }

  .card h3 {
      font-size: 1.4em;
  }

  .card p {
      font-size: 0.9em;
  }

  .card .download-btn,
  .card .buy-btn {
      font-size: 1em;
      padding: 10px 20px;
  }

  .yert-balance p {
      font-size: 1.5em;
  }

  .code-section h3 {
      font-size: 1.5em;
  }

  .code-section input[type="text"] {
      font-size: 1em;
  }

  .code-section button {
      font-size: 1.1em;
  }
}

