@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  min-height: 100vh;
}

.item-card {
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.legendary::before { background: linear-gradient(90deg, #F59E0B, #EF4444); }
.common::before { background: linear-gradient(90deg, #6EE7B7, #3B82F6); }
.rare::before { background: linear-gradient(90deg, #60A5FA, #8B5CF6); }
.epic::before { background: linear-gradient(90deg, #C084FC, #DB2777); }

/* Улучшенные анимации для модалок */
.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal .bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  transition: all 0.6s ease;
  opacity: 0;
}

.modal.active .bg-overlay {
  opacity: 1;
}

.modal-content {
  position: relative;
  z-index: 10;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) 0.2s;
  width: 90%;
  max-width: 28rem;
}

.modal.active .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-content-inner {
  background: #1E293B;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Стили для панели пополнения */
.topup-panel {
  position: absolute;
  top: calc(100% + 15px);
  right: 50px;
  width: 300px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  z-index: 60;
}

.topup-panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.topup-content {
  background: rgba(14, 26, 48, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.topup-input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.5);
  width: 100%;
}

.topup-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}

.coin-btn {
  transition: all 0.2s ease;
}

.coin-btn:hover {
  transform: scale(1.05);
  background: rgba(124, 58, 237, 0.2);
}

.coin-btn.active {
  background: rgba(124, 58, 237, 0.4);
  border-color: rgba(167, 139, 250, 0.8);
}

/* Стрелочка */
.arrow-up {
  position: absolute;
  top: -10px;
  right: 40px;
  width: 20px;
  height: 20px;
  background: rgba(14, 26, 48, 0.95);
  border-top: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 1px solid rgba(56, 189, 248, 0.3);
  transform: rotate(45deg);
}

/* Контейнер для ввода суммы */
.input-container {
  display: flex;
  width: 100%;
}

/* Кнопка пополнения */
.topup-btn {
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

/* Плавное появление элементов внутри модалки */
.modal-item {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.modal.active .modal-item {
  opacity: 1;
  transform: translateY(0);
}

/* Задержки для анимации элементов внутри модалки */
.modal.active .modal-item:nth-child(1) { transition-delay: 0.2s; }
.modal.active .modal-item:nth-child(2) { transition-delay: 0.25s; }
.modal.active .modal-item:nth-child(3) { transition-delay: 0.3s; }
.modal.active .modal-item:nth-child(4) { transition-delay: 0.35s; }
.modal.active .modal-item:nth-child(5) { transition-delay: 0.4s; }
.modal.active .modal-item:nth-child(6) { transition-delay: 0.45s; }

.steam-btn {
  background: linear-gradient(to right, #1B2838, #2A475E);
  border-radius: 0.5rem;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.steam-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(to right, #2A475E, #3C6E9F);
}

.steam-btn:active {
  transform: translateY(1px);
}

.steam-icon {
  margin-right: 0.75rem;
  font-size: 1.25rem;
  color: #C6C6C6;
}

.filter-btn.active {
  background-color: #38BDF8 !important;
}

/* Стили для уведомлений */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification {
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.notification.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.notification-icon {
  font-size: 24px;
  margin-right: 15px;
  flex-shrink: 0;
}

.notification.success .notification-icon {
  color: #34D399;
}

.notification.error .notification-icon {
  color: #F87171;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.notification.success .notification-title {
  color: #34D399;
}

.notification.error .notification-title {
  color: #F87171;
}

.notification-message {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.notification-close {
  margin-left: 15px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  color: white;
  transform: scale(1.1);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
}

.notification-progress-bar {
  height: 100%;
  transition: width 0.1s linear;
}

.notification.success .notification-progress-bar {
  background: #34D399;
}

.notification.error .notification-progress-bar {
  background: #F87171;
}

.logout-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.4);
}

/* Анимации */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes ping-slow {
  0% { transform: scale(0.8); opacity: 0.8; }
  75%, 100% { transform: scale(1.4); opacity: 0; }
}

@keyframes progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-ping-slow {
  animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-progress {
  animation: progress 30s linear forwards;
}


/* Иконки */
.fa-spinner {
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 640px) {
  .btn-lg {
    min-width: 100%;
    justify-content: center;
  }
}