/* Уважаемое поведение при prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.stripe-loading-indicator {
  height: 3px !important;
  overflow: hidden;
  border-radius: 3px;
}
.stripe-loading-indicator .stripe,
.stripe-loading-indicator .stripe-loaded {
  background: #10ab7c !important;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.stripe-loading-indicator .stripe::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: loading-shine 1.8s ease-in-out infinite;
}

@keyframes loading-shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* ===== Категории ===== */
.category {
  background-color: #10ab7c40;
  color: #10ab7c;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: background-color, color, transform;
}
.category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent 40%, rgba(16, 171, 124, 0.2) 60%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 1;
}
.category:hover::before {
  transform: translateX(100%);
}
.category:not(.active):hover {
  background-color: #10ab7caa;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 171, 124, 0.25);
}
.category.active {
  background: linear-gradient(0deg, #10ab7c, #10ab7ccd);
  color: white;
  transform: translateY(0);
}
.category > svg > path {
  stroke: #10ab7c;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}
.category.active > svg > path,
.category:hover > svg > path {
  stroke: white;
  stroke-width: 1.8;
}
.category.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: white;
  border-radius: 3px;
  transform: translateX(-50%);
  animation: active-indicator 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes active-indicator {
  to { width: 60%; }
}

/* ===== Заголовок с анимированным подчёркиванием ===== */
.title {
  color: black;
  font-weight: 600;
  font-size: 32px;
  line-height: 39px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.title::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 5px;
  background: #10ab7c;
  border-radius: 6px;
  box-shadow: 0 -2px 16px rgba(16, 171, 124, 0.6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s ease;
}
.title:hover::after,
.title.appear::after {
  transform: scaleX(1);
  width: 150px;
}
/* Добавьте класс .appear при монтировании, например через JS:
   document.querySelector('.title').classList.add('appear');
*/

/* ===== Карточки (gradient + hover glow) ===== */
.card-gradient {
  background: radial-gradient(51.71% 75.34% at 100% 100%, #10ab7c1a 0%, transparent 70%),
              radial-gradient(47.86% 69.72% at 0% 0%, #10ab7c1a 0%, transparent 70%);
  position: relative;
  overflow: hidden;
}
.card-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.card-gradient:hover::before {
  opacity: 1;
}

/* ===== Сервер-карточки и бейджи ===== */
.select-server-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: border-color, transform;
}
.select-server-card.active {
  border: 2px solid #10ab7c;
  box-shadow: 0 0 0 4px rgba(16, 171, 124, 0.2);
  transform: scale(1.02);
  z-index: 2;
}
.select-server-item {
  transition: transform 0.25s ease;
}
.select-server-item:hover > .select-server-item-wrapper {
  background: #10ab7caa;
  transform: translateX(8px);
}
.select-server-item:hover > div > .badge-icon {
  background: #10ab7c !important;
  transform: scale(1.1);
}

.badge-icon, .badge-opacity {
  background: #10ab7c90;
  color: #10ab7c;
  transition: all 0.25s ease;
  position: relative;
}
.badge-icon:hover {
  background: #10ab7c !important;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 171, 124, 0.4);
}
.server-badge, .server-address, .lastpayments-date {
  background: #10ab7c26;
  color: #10ab7c;
  transition: background 0.3s ease;
}
.server-badge:hover,
.server-address:hover,
.lastpayments-date:hover {
  background: #10ab7c40;
}

/* ===== Корзина (press-down анимация + glow) ===== */
.cart-card {
  background-color: #10ab7c50;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  will-change: transform, background-color;
  position: relative;
  overflow: hidden;
}
.cart-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.cart-card:hover {
  background-color: #10ab7c;
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 20px rgba(16, 171, 124, 0.3);
}
.cart-card:hover::after {
  opacity: 1;
}
.cart-card:hover > .card-body > .badge-icon {
  background: white !important;
  transform: scale(1.15);
}
.cart-card:hover > .card-body > .badge-icon > svg > path {
  stroke: #10ab7c;
  stroke-width: 2;
}
.cart-card:active {
  background-color: #10ab7cc1;
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 2px 6px rgba(16, 171, 124, 0.2);
  transition: transform 0.1s ease, background-color 0.15s ease;
}

/* ===== Кнопки +/- ===== */
.btn-plus, .btn-minus {
  background: #10ab7c26;
  border-radius: 13px;
  padding: 14px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.btn-plus::before, .btn-minus::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(16,171,124,0.2) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.btn-plus:hover::before, .btn-minus:hover::before {
  opacity: 1;
}
.btn-plus:hover, .btn-minus:hover {
  background: #10ab7c;
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(16, 171, 124, 0.4);
}
.btn-minus {
  border-radius: 8px;
}

/* ===== Инпуты (focus glow + subtle shake on error) ===== */
input:not(.search) {
  transition: border 0.3s ease, box-shadow 0.3s ease;
}
input:focus:not(.search) {
  outline: none;
  border: 2px solid #10ab7c;
  box-shadow: 0 0 0 4px rgba(16, 171, 124, 0.2);
}
input.error {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: #ff5555 !important;
}
@keyframes shake {
  10%, 90% { transform: translateX(-3px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* ===== SVG анимации (плавные stroke-переходы) ===== */
svg, path {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}