/* ==== Общий контейнер ==== */
.app-store-section {
  text-align: center;
  padding: 60px 0;
  background: radial-gradient(circle at center top, #1a1c25 0%, #0e1014 80%);
  min-height: 100vh;
  color: #e5e7eb;
  position: relative;
  overflow: hidden;
}

/* Мягкое затемнение по краям */
.app-store-section::before,
.app-store-section::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  pointer-events: none;
  z-index: 5;
}

/* === Современная форма поиска (встроенная кнопка) === */
.app-search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 30px auto 50px;
  max-width: 700px;
  width: 100%;
}

.app-search-wrapper {
  position: relative;
  flex: 1;
}

.app-search-wrapper input[type="text"] {
  width: 100%;
  padding: 16px 60px 16px 20px;
  border: 2px solid #1e1e1e;
  border-radius: 14px;
  background-color: #121212;
  color: #fff;
  font-size: 18px;
  transition: all 0.3s ease;
}

.app-search-wrapper input[type="text"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
  outline: none;
}

.app-search-wrapper input[type="text"]::placeholder {
  color: #777;
}

/* Кнопка поиска внутри поля */
.app-search-wrapper button {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(145deg, #007bff, #005ecc);
  border: none;
  color: #fff;
  font-size: 20px;
  border-radius: 10px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.15s ease;
}

.app-search-wrapper button:hover {
  background: linear-gradient(145deg, #0a84ff, #006eff);
  transform: translateY(-50%) scale(1.05);
}

/* Кнопка "Сбросить" */
.app-search-form .reset-search {
  color: #aaa;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.app-search-form .reset-search:hover {
  color: #fff;
}


.app-store-section::before {
  left: 0;
  background: linear-gradient(to right, #0e1014 0%, transparent 100%);
}

.app-store-section::after {
  right: 0;
  background: linear-gradient(to left, #0e1014 0%, transparent 100%);
}

/* ==== Заголовок ==== */
.app-store-title {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
  position: relative;
  z-index: 10;
}

/* ==== Сетка карточек ==== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  align-items: stretch;
  width: 100%;
  margin: 0 auto;
  padding: 0 60px;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

/* ==== Карточка ==== */
.app-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: #181b22;
  border-radius: 20px;
  padding: 30px;
  color: #fff;
  box-shadow:
    0 0 12px rgba(0, 0, 0, 0.5),
    0 0 0px rgba(59, 130, 246, 0.1);
  transition: transform 0.25s ease, box-shadow 0.35s ease;
  animation: fadeInUp 0.35s forwards;
  position: relative;
  overflow: hidden;
  height: 100%;
  width: 100%;
}

/* ==== Неоновое свечение ==== */
.app-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 25px rgba(59, 130, 246, 0.35),
    0 0 45px rgba(59, 130, 246, 0.25),
    inset 0 0 12px rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.app-card:active {
  transform: scale(0.98);
  box-shadow:
    0 0 20px rgba(37, 99, 235, 0.4),
    inset 0 0 10px rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

/* ==== Плавное неоновое свечение ==== */
.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.12);
  transition: opacity 0.4s ease;
  opacity: 0;
}

.app-card:hover::before {
  opacity: 1;
  animation: neonPulse 2.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
  0% {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
  }
  100% {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.45);
  }
}

/* ==== Левая часть (иконка 25%) ==== */
.app-left {
  flex: 0 0 25%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-left img {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* ==== Правая часть (контент 75%) ==== */
.app-right {
  flex: 0 0 75%;
  text-align: left;
  padding-left: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==== Заголовок ==== */
.app-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 10px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* ==== Дата ==== */
.app-date {
  color: #a5b4fc;
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-date::before {
  content: "📅";
  display: inline-block;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ==== Описание ==== */
.app-desc {
  font-size: 1.25rem;
  line-height: 1.55;
  color: #d1d5db;
  margin-bottom: 22px;
  flex-grow: 1;
}

/* ==== Кнопка ==== */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  padding: 16px 0;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  width: 100%;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-download:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

/* ==== Loader ==== */
.btn-loader {
  display: none;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
}

.btn-download.loading .btn-text {
  opacity: 0.6;
}

.btn-download.loading .btn-loader {
  display: inline-block;
}

/* ==== Анимации ==== */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* ==== Адаптив ==== */
@media (max-width: 1400px) {
  .app-grid {
    padding: 0 40px;
    gap: 35px;
  }

  .app-store-section::before,
  .app-store-section::after {
    width: 80px;
  }
}

@media (max-width: 1024px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 30px;
  }

  .app-store-section::before,
  .app-store-section::after {
    display: none; /* убираем fade на планшетах */
  }
}

@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: repeat(1, 1fr);
    padding: 0 20px;
  }

  .app-store-section::before,
  .app-store-section::after {
    display: none;
  }

  .app-card {
    flex-direction: column;
    text-align: center;
    margin: 0 auto;
  }

  .app-left,
  .app-right {
    flex: 1 1 100%;
  }

  .app-right {
    padding-left: 0;
    margin-top: 15px;
  }

  .btn-download {
    margin-top: 10px;
  }
}

.btn-download.downloading-pulse {
  animation: pulseEffect 1s ease-in-out;
}

@keyframes pulseEffect {
  0% {
    box-shadow: 0 0 0 rgba(50, 132, 255, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 18px rgba(50, 132, 255, 0.6);
    transform: scale(1.04);
  }
  100% {
    box-shadow: 0 0 0 rgba(50, 132, 255, 0);
    transform: scale(1);
  }
}
