/* Стили для карточки подписки с серым фоном и летающими частицами */
.subscription-card {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  color: var(--on-surface);
  padding: 24px;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
  border: 1px solid var(--primary-light);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

* {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
}

.subscription-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.updateSoon {
  margin-top: 40px;
}

.soonText {
  margin: 10px auto 0;
}

.asdad{
  display: flex;
  align-items: center;
}

/* Частицы */
.subscription-card .particle {
  position: absolute;
  width: 20px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 0;
  animation: floatParticle 10s linear infinite;
  filter: brightness(70%);
}

.particle img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

/* Стили для кнопки настроек в профильном хедере */
.settings-btn {
  background: none;
  border: none;
  color: var(--on-surface);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px;
  margin-left: auto; /* Выравнивание по правому краю */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.settings-btn:hover {
  color: var(--primary-color);
  background: rgba(37, 99, 235, 0.1);
}

.settings-btn:active {
  transform: scale(0.95);
}

/* Анимация иконки при нажатии */
.settings-btn.active {
  transform: rotate(90deg);
  color: var(--primary-color);
}

/* Модальное окно настроек для мобильных */


#mobile-settings-modal.show {
  display: block;
}

#mobile-settings-modal {
  align-items: flex-start;
}

.modal-content.settings-modal {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Стили для пунктов настроек */
.settings-item {
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-light);
  transition: background-color 0.2s ease;
  margin: 15px 0;
}

.marketplaces-list {
  margin-bottom: 15px;
}

.settings-item:last-child {
  border-bottom: none;
}

.form-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--on-surface);
}

/* Стили для выбора языка */
.language-options {
  display: flex;

  gap: 8px;
  margin: 16px 0 24px;
  margin-bottom: 0;
}

.language-option-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-light);
  border-radius: 12px;
  border: none;
  color: var(--on-surface);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-option-settings .fa-check {
  margin-left: 5px;
}

.language-option-settings:hover {
  background: rgba(59, 130, 246, 0.1);
}

.language-option-settings.selected {
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-color);
}

.flag-icon {
  width: 16px;
  height: 12px;
  margin-right: 12px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.check-icon {
  color: var(--primary-color);
  font-size: 18px;
}

/* Стиль для кнопки связи */

.contact-team-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Анимации */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Заголовок модального окна */
.modal-header {
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  z-index: 1;
  border-bottom: 1px solid var(--surface-light);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--on-surface);
}

.modal-close {
  background: none;
  border: none;
  color: var(--on-surface);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* Содержимое меню */
.modal-body {
}

.settings-item {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-light);
  transition: background-color 0.2s ease;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item i {
  margin-right: 12px;
  color: var(--primary-color);
  width: 24px;
  text-align: center;
}

/* Эффект затемнения фона */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

/* Анимация открытия */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

#mobile-settings-modal {
  display: none;
  position: fixed;
  bottom: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  padding-bottom: env(safe-area-inset-bottom); /* Добавляем отступ для безопасной зоны в iOS */

  /* left: 0; */
  /* right: 0; */
  /* transform: translateY(100%); */
  /* transition: transform 0.35s cubic-bezier(0.32, 0.72, 0.38, 1); */
  /* z-index: 2000; */
  /* max-height: 69vh; */
  /* overflow-y: auto; */
  /* will-change: transform; */
  /* margin: 0; */
  /* padding: 0; */
    height: fit-content;
    bottom: 0;
    transform: none;
    top: unset;
}

#mobile-settings-modal .settings-modal {
  width: 100%;
  max-width: 100%;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}
/* Для десктопов можно добавить другой стиль */
@media (min-width: 768px) {
  #mobile-settings-modal {
    max-width: 400px;
    margin: 0 auto;
    bottom: 20px;
    border-radius: 16px;
    animation: slideUp 0.3s ease;
  }
}
/* Индивидуальные стили для каждой частицы с разными изображениями */
.subscription-card .particle:nth-child(1) {
  background-image: url("../images/1.png");
  top: 10%;
  left: 10%;
  animation-duration: 12s;
}
.subscription-card .particle:nth-child(2) {
  background-image: url("../images/2.png");
  top: 20%;
  left: 80%;
  animation-duration: 15s;
}
.subscription-card .particle:nth-child(3) {
  background-image: url("../images/3.png");
  top: 30%;
  left: 30%;
  animation-duration: 10s;
}
.subscription-card .particle:nth-child(4) {
  background-image: url("../images/4.png");
  top: 40%;
  left: 60%;
  animation-duration: 13s;
}
.subscription-card .particle:nth-child(5) {
  background-image: url("../images/5.png");
  top: 50%;
  left: 20%;
  animation-duration: 11s;
}
.subscription-card .particle:nth-child(6) {
  background-image: url("../images/6.png");
  top: 60%;
  left: 70%;
  animation-duration: 14s;
}
.subscription-card .particle:nth-child(7) {
  background-image: url("../images/7.png");
  top: 70%;
  left: 40%;
  animation-duration: 9s;
}
.subscription-card .particle:nth-child(8) {
  background-image: url("../images/8.png");
  top: 80%;
  left: 90%;
  animation-duration: 16s;
}
.subscription-card .particle:nth-child(9) {
  background-image: url("../images/9.png");
  top: 90%;
  left: 50%;
  animation-duration: 12s;
}
.subscription-card .particle:nth-child(10) {
  background-image: url("../images/10.png");
  top: 15%;
  left: 25%;
  animation-duration: 10s;
}
.subscription-card .particle:nth-child(11) {
  background-image: url("../images/11.png");
  top: 25%;
  left: 75%;
  animation-duration: 14s;
}
.subscription-card .particle:nth-child(12) {
  background-image: url("../images/12.png");
  top: 35%;
  left: 15%;
  animation-duration: 11s;
}
.subscription-card .particle:nth-child(13) {
  background-image: url("../images/13.png");
  top: 45%;
  left: 85%;
  animation-duration: 13s;
}
.subscription-card .particle:nth-child(14) {
  background-image: url("../images/14.png");
  top: 55%;
  left: 35%;
  animation-duration: 9s;
}
.subscription-card .particle:nth-child(15) {
  background-image: url("../images/15.png");
  top: 65%;
  left: 65%;
  animation-duration: 15s;
}
.subscription-card .particle:nth-child(16) {
  background-image: url("../images/16.png");
  top: 75%;
  left: 25%;
  animation-duration: 12s;
}
.subscription-card .particle:nth-child(17) {
  background-image: url("../images/17.png");
  top: 85%;
  left: 55%;
  animation-duration: 10s;
}
.subscription-card .particle:nth-child(18) {
  background-image: url("../images/18.png");
  top: 5%;
  left: 45%;
  animation-duration: 16s;
}
.subscription-card .particle:nth-child(19) {
  background-image: url("../images/19.png");
  top: 95%;
  left: 5%;
  animation-duration: 8s;
}
.subscription-card .particle:nth-child(20) {
  background-image: url("../images/20.png");
  top: 5%;
  left: 95%;
  animation-duration: 17s;
}

/* Анимация для частиц */
@keyframes floatParticle {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translate(20px, -20px) rotate(180deg);
    opacity: 0.5;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.3;
  }
}

.subscription-card > * {
  position: relative;
  z-index: 1;
}

.subscription-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.subscription-text {
  text-align: center;
  width: 100%;
  margin-bottom: 16px;
  font-weight: 700;
}

.subscription-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface);
}

.subscription-plan-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.subscription-plan-btn i {
  color: #ffffff;
  font-size: 14px;
}

.subscription-plan-btn:hover {
  color: var(--primary-color);
  transform: translateY(-1px);
}

.subscription-timer {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 8px;
  width: 100%;
}

.timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
}

.timer-value {
  margin: 0 4px;
}

.timer-label {
  font-size: 12px;
  color: #a3a3a3;
  margin-top: 4px;
}

.filters1 {
  width: 100px;
  height: 100px;
  position: absolute;
  bottom: 60px;
  right: 20px;
  z-index: 1;
}

.filters2 {
  width: 125px;
  height: 125px;
  position: absolute;
  bottom: 40px;
  right: 20px;
  z-index: 1;
}

.filters3 {
  width: 175px;
  height: 175px;
  position: absolute;
  bottom: 40px;
  right: 20px;
  z-index: 1;
}

.filters-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.filters-limit-progress {
  flex-grow: 1;
  height: 8px;
  background-color: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.filters-limit-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  width: 10%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Остальные стили из предыдущей версии */
:root {
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary-color: #06b6d4;
  --background: #0a0a0a;
  --surface: #171717;
  --surface-light: #262626;
  --error: #ef4444;
  --success: #10b981;
  --on-primary: #ffffff;
  --on-secondary: #000000;
  --on-background: #f5f5f5;
  --on-surface: #e5e5e5;
  --on-error: #ffffff;
  --tg-star-color: #f59e0b;
  --border-radius: 16px;
  --border-radius-sm: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen,
    Ubuntu, Cantarell, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  background-color: var(--background);
}

body {
  background-color: var(--background);
  color: var(--on-background);
  max-width: 100%;
  overflow-x: hidden;
  padding-bottom: 80px;
  line-height: 1.5;
}

/* Language Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 10, 10, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background-color: var(--surface);
  border-radius: var(--border-radius);
  padding: 24px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid var(--surface-light);
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.3s ease;
}

.modal-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.modal-logo:before {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  background-color: var(--primary-color);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 17l4 4 4-4'%3E%3C/path%3E%3Cpath d='M12 12v9'%3E%3C/path%3E%3Cpath d='M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29'%3E%3C/path%3E%3C/svg%3E")
    no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 17l4 4 4-4'%3E%3C/path%3E%3Cpath d='M12 12v9'%3E%3C/path%3E%3Cpath d='M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29'%3E%3C/path%3E%3C/svg%3E")
    no-repeat center;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--on-surface);
}

.language-option {
  width: 100%;
  padding: 16px;
  margin-bottom: 12px;
  background-color: var(--surface-light);
  border: none;
  border-radius: var(--border-radius-sm);
  color: var(--on-surface);
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.language-option:hover {
  background-color: var(--primary-color);
  color: var(--on-primary);
  transform: translateY(-2px);
}

.language-option:active {
  transform: translateY(0);
}

.language-option i {
  font-size: 18px;
}

/* Improved Typography */
h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

h4 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

p {
  font-size: 16px;
  color: var(--on-surface);
  margin-bottom: 12px;
}

/* Header - Redesigned */
.header {
  background-color: var(--background);
  color: var(--on-surface);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: white;
  display: inline-flex;
  align-items: center;
}

.logo-icon {
  margin-right: 8px;
  font-size: 24px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.balance {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  border-radius: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(245, 158, 11, 0.2);
      border-color: #2d54ff;
  transition: var(--transition);
}
#strelochka {
  display: inline-block; /* чтобы трансформация работала корректно */
  animation: moveUpDown 1.5s infinite ease-in-out;
}

@keyframes moveUpDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
  75% {
    transform: translateY(1px);
  }
}



.balance-amount {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-right: 5px;
}

.balance-icon {
  color: var(--tg-star-color);
  font-size: 14px;
}

.add-star-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #3e3e30;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.add-star-btn:hover {
  background-color: rgba(245, 158, 11, 0.2);
  transform: scale(1.1);
}

/* Main content */
.page {
  display: none;
  padding: 16px;
  position: relative;
}

.page.active {
  display: block;
}

/* Cards - Redesigned */
.card.P {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a)!important;
  border-radius: 12px!important;
  padding: 10px!important;
  margin-bottom: 12px!important;
  border: 1px solid #3b82f6!important;
  
  position: relative!important;
  transition: all 0.3s ease!important;
  display: block;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: #3b82f6;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}

.card-settings-btn {
  background: none;
  border: none;
  color: #a3a3a3;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s ease;
}

.card-settings-btn:hover {
  color: #3b82f6;
  transform: rotate(45deg);
}

.card-collection {
  font-size: 13px;
  color: #a3a3a3;
  display: flex;
  align-items: center;
  gap: 8px;
      justify-content: space-between;
}


.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #a3a3a3;
}

.stat-img {
  width: 20px;
  height: 20px;
}

.stat-img1 {
  width: 20px;
  height: 20px;
}

.stat-item i {
  font-size: 10px;
  color: #fff;
}

.card-price {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #fff;
}

.ton-icon {
  width: 20px;
  height: 20px;
  margin-left: 4px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-date {
  font-size: 12px;
  color: #a3a3a3;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s ease;
}

.card-delete-btn:hover {
  transform: scale(1.1);
}
/* Buttons - Improved */
.btn {
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.contact-team-btn {
  width: 100%;
  padding: 16px;
  margin-top: 24px;
  font-size: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 16px;
  padding: 16px 0;
  margin-bottom: 10px;
}

.btn i {
  font-size: 16px;
}

.btn-primary {
  padding: 15px 0;
  background-color: var(--primary-color);
  color: var(--on-primary);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-outline {
  padding: 15px 0;
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.btn-subscribe {
  position: relative;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  color: var(--on-primary);
  font-weight: 700;
  width: 100%;
  border-radius: var(--border-radius);
  border: none;
  padding: 12px 24px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  animation: pulse 2.5s infinite;
  margin-bottom: 20px;
}

@keyframes pulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  }
  50% {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  }
}

.btn-text {
  position: relative;
  z-index: 1;
  animation: textPulse 2s infinite;
}

@keyframes textPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn-subscribe i {
  color: #fff;
  font-size: 1.1em;
  z-index: 1;
  position: relative;
  animation: crownFloat 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes crownFloat {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
  }
  25% {
    transform: scale(1.08) rotate(-2deg);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
  }
  50% {
    transform: scale(1.15) rotate(-5deg);
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
  }
  75% {
    transform: scale(1.08) rotate(-2deg);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
  }
}

.sparkle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
}

.sparkle:nth-child(1) {
  animation: sparkle 2s ease infinite;
  top: 20%;
  left: 20%;
  width: 4px;
  height: 4px;
}

.sparkle:nth-child(2) {
  animation: sparkle 2s ease 0.5s infinite;
  top: 60%;
  left: 40%;
  width: 3px;
  height: 3px;
}

.sparkle:nth-child(3) {
  animation: sparkle 2s ease 1s infinite;
  top: 30%;
  left: 70%;
  width: 5px;
  height: 5px;
}

.sparkle:nth-child(4) {
  animation: sparkle 2s ease 1.5s infinite;
  top: 80%;
  left: 80%;
  width: 2px;
  height: 2px;
}

@keyframes sparkle {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.btn-subscribe:active {
  animation: none;
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* Tab bar - Redesigned */
.tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  width: 100%; /* Устанавливаем ширину 70% */
  max-width: 500px; /* Ограничиваем максимальную ширину для больших экранов */
  left: 50%;
  transform: translateX(-50%); /* Центрируем по горизонтали */
  background: rgba(
    23,
    23,
    23,
    0.7
  ); /* Полупрозрачный фон (темный с прозрачностью 0.7) */
  backdrop-filter: blur(3px); /* Эффект блюра */
  -webkit-backdrop-filter: blur(10px); /* Для поддержки в Safari */
  border-radius: 16px; /* Закругленные углы */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  padding: 0 8px;
}

.star {
  width: 20px;
  height: 20px;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #a3a3a3;
  font-size: 11px;
  width: 25%;
  transition: var(--transition);
  border-radius: 12px;
  padding-top: 16px;
  padding-bottom: 20px;
}

.tab i {
  font-size: 22px;
  margin-bottom: 4px;
  transition: var(--transition);
}

.tab.active {
  color: #fff;
  transform: translateY(-2px);
}

.tab.active i {
  transform: scale(1.1);
}

.tab:not(.active):hover {
  color: var(--on-surface);
}

/* Form styles - Improved */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--on-surface);
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--surface-light);
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  background-color: var(--surface);
  color: var(--on-surface);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Profile section - Redesigned */
.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 600;
  margin-right: 16px;
  box-shadow: var(--shadow-md);
}

.profile-name {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 4px;
}

.profile-id {
  color: #a3a3a3;
  font-size: 13px;
}

/* Balance card - Redesigned */
.balance-card {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  color: white;
  padding: 20px;
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 16px;
  border: 1px solid var(--surface-light);
  box-shadow: var(--shadow-sm);
}

.balance-label {
  font-size: 15px;
  color: #a3a3a3;
  margin-bottom: 0;
}

.balance-amount-large {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-amount-large .fa-star {
  margin-left: 10px;
}

.balance-actions {
  display: flex;
  gap: 8px;
}

/* Referral section - Improved */
.referral-code {
  background-color: var(--surface-light);
  padding: 14px;
  border-radius: var(--border-radius-sm);
  margin: 12px 0;
  color: white;
  font-size: 16px;
  font-weight: 400;
  border: 1px solid var(--primary-color);
  position: relative;
  overflow: hidden;
}

.referral-code::after {
  content: ""; /* Обязательное свойство для псевдоэлементов */
  display: inline-block;
  width: 20px; /* Ширина иконки */
  height: 20px; /* Высота иконки */
  background-image: url("../images/share.png"); /* Укажите правильный путь к изображению */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: 8px; /* Отступ от текста */
  vertical-align: middle; /* Выравнивание по вертикали */
  filter: brightness(0) invert(1);
  position: absolute;
  top: 50%;
  transform: translate(-10px, -50%);
  right: 0px;
}

.referral-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  color: #a3a3a3;
  font-size: 13px;
}

.referral-stat {
  text-align: center;
  flex: 1;
}

.referral-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.referral-stat-value i {
  color: var(--tg-star-color);
  font-size: 14px;
}

.referrals-list {
  margin-top: 16px;
}

.referral-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-light);
}

.referral-item:last-child {
  border-bottom: none;
}

.referral-name {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 15px;
}

.referral-date {
  color: #a3a3a3;
  font-size: 12px;
}

.referral-amount {
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
}

/* Settings - Improved */
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  border-bottom: none;
  transition: var(--transition);
}


.settings-item:last-child {
  border-bottom: none;
}

.settings-item-value {
  color: #a3a3a3;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.settings-item.danger {
  color: var(--error);
}

/* Payment page */
.payment-methods {
  margin: 20px 0;
}

.payment-method {
  display: flex;
  align-items: center;
  padding: 14px;
  border-radius: var(--border-radius-sm);
  background-color: var(--surface);
  margin-bottom: 10px;
  border: 1px solid var(--surface-light);
  transition: var(--transition);
}

.payment-method:active {
  background-color: var(--surface-light);
}

.payment-method-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 18px;
  color: var(--tg-star-color);
}

.payment-method-info {
  flex: 1;
}

.payment-method-name {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 15px;
}

.payment-method-fee {
  color: #a3a3a3;
  font-size: 13px;
}

/* Subscription plans */
.subscription-plans {
  margin: 20px 0;
}

.subscription-plan {
  padding: 16px;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  margin-bottom: 12px;
  border: 1px solid var(--surface-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.subscription-plan.popular {
  border: 1px solid var(--primary-color);
}

.subscription-plan.popular::before {
  content: "ПОПУЛЯРНЫЙ";
  position: absolute;
  top: 8px;
  right: -28px;
  background-color: var(--primary-color);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 28px;
  transform: rotate(45deg);
}

.subscription-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.subscription-plan-name {
  font-weight: 700;
  font-size: 16px;
}

.subscription-plan-price {
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.subscription-plan-price i {
  font-size: 16px;
}

.subscription-plan-period {
  color: #a3a3a3;
  font-size: 13px;
  margin-bottom: 12px;
}

.subscription-plan-features {
  margin-bottom: 16px;
}

.subscription-plan-feature {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 14px;
}

.subscription-plan-feature i {
  color: var(--success);
  margin-right: 6px;
  font-size: 14px;
}

/* Filter creation form */
.filter-name {
  margin-bottom: 24px;
}

.filter-name-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--surface-light);
  border-radius: var(--border-radius-sm);
  background: #12141a;
  color: var(--on-surface);
  font-size: 16px;
}

.filter-option {
  margin-bottom: 20px;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--on-surface);
}

.filter-label span {
  font-size: 14px;
  color: #878282;
}

.filter-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--surface-light);
  border-radius: var(--border-radius-sm);
  color: var(--on-surface);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;

  background: #12141a;
}

.filter-input-text {
  flex: 1;
}

.filter-input-arrow {
  color: #a3a3a3;
  font-size: 18px;
}

.price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.price-input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--surface-light);
  border-radius: var(--border-radius-sm);
  background: #12141a;
  color: var(--on-surface);
  font-size: 16px;
  box-sizing: border-box;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  padding: 20px;
}

.modal-content {
  position: relative;
  background-color: var(--surface);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--surface-light);
  padding: 0;
}

.modal-header {
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-weight: 600;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  color: #a3a3a3;
  font-size: 24px;
  cursor: pointer;
}


.text-center {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 56%;
  left: 50%;
}

/* Subscription confirmation modal */
.subscription-confirm-text {
  text-align: center;
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

#subscription-confirm-modal .modal-actions {
  padding: 0 16px 16px;
}

#subscription-confirm-modal .modal-actions .btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: var(--border-radius-sm);
}

#subscription-confirm-modal .modal-actions .btn-primary {
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #000;
  font-weight: 700;
}

#subscription-confirm-modal .modal-actions .btn-primary:hover {
  background: linear-gradient(90deg, #fbbf24, #f97316);
  transform: translateY(-1px);
}

#subscription-confirm-modal .modal-actions .btn-outline {
  background-color: var(--surface-light);
  border: 1px solid var(--surface-light);
  color: var(--on-surface);
}

#subscription-confirm-modal .modal-actions .btn-outline:hover {
  background-color: var(--surface);
  transform: translateY(-1px);
}

.subscription-success-message {
  display: none;
  text-align: center;
  padding: 16px;
  font-size: 16px;
  color: var(--success);
  background-color: rgba(16, 185, 129, 0.1);
  border-radius: var(--border-radius-sm);
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.subscription-success-message i {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

/* Collection modal */
.collection-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.collection-item {
  display: flex;
  align-items: center;
  background: #12141a;
  justify-content: space-between;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border-bottom-right-radius: 0px;
  border-bottom-left-radius: 0px;
  border-bottom: 1px solid var(--surface-light);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
}

/* коллекции в модалке — как карточки из main */
.collection-item{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:var(--card); border:1px solid var(--border); border-radius:12px;
  padding:10px 12px; margin-bottom:8px;
}
.collection-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.collection-image{ width:42px; height:42px; border-radius:10px; object-fit:contain;}
.collection-title{ display:flex; align-items:center; gap:8px; min-width:0; }
.collection-name{ font-weight:700; color:var(--title); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.badge-new{
  display:inline-flex; align-items:center; justify-content:center;
  height:22px; padding:0 8px; border-radius:999px;
  background:linear-gradient(0deg,#2a5cff,#3163ff); color:#fff;
  font-size:11px; font-weight:800; letter-spacing:.3px;
}

.collection-right{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.min-price{
  display:inline-flex; align-items:center; gap:6px;
   border:1px solid var(--border); border-radius:999px;
  padding:6px 10px; font-weight:800; color:var(--title);
  background: linear-gradient(135deg, #2a5cff, #2a5cff)!important
}

.min-price.asda {
background: transparent!important
}
.ton-ic{ width:14px; height:14px; object-fit:contain; opacity:.9; }
.min-price-val{ font-size:13px; letter-spacing:.2px; }


/* ===== Models modal — main-v1 style ===== */

/* поиск и "все модели" */
#model-modal .model-body { padding:12px; }

#model-modal .model-search::placeholder{ color:#8b90a0; }
#model-modal .model-select-all{
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .06s ease, border-color .2s ease, box-shadow .2s ease;
}
#model-modal .model-select-all.selected{
  border-color:#2a5cff; box-shadow:0 0 0 1px rgba(42,92,255,.25) inset;
}
#model-modal .model-select-all .model-select-all-check { opacity:.9; }

/* сетка карточек */


/* карточка модели */
#model-modal .model-card{
  position:relative;
  background:var(--card); border:1px solid var(--border); border-radius:12px;
  overflow:hidden; transition:transform .06s ease, border-color .2s ease, box-shadow .2s ease;
}
#model-modal .model-card:hover{
  transform:translateY(-1px); border-color:#2a2e3a; box-shadow:0 8px 24px rgba(0,0,0,.25);
}

/* обёртка и контент (оставляем как у тебя) */
#model-modal .model-checkbox-wrapper{
  display:block; cursor:pointer; user-select:none;
}
#model-modal .model-card-content{
  display:flex; gap:10px; padding:10px; align-items:center;
}

#model-modal .model-image{
  width:84px; height:64px; object-fit:contain;
}

#model-modal .model-info{ display:flex; flex-direction:column; gap:6px; min-width:0; }
#model-modal .model-name{
  font-weight:700; color:var(--title); font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* метрики */
#model-modal .model-meta{ display:flex; flex-wrap:wrap; gap:6px; }
#model-modal .model-meta > span{
  display:inline-flex; align-items:center; gap:6px;
  background:#12141a; border:1px solid var(--border); border-radius:999px;
  padding:6px 8px; font-size:12px; color:#cfd3dc;
}
#model-modal .model-price img{ width:14px; height:14px; object-fit:contain;  }

.model-meta span:last-child {
  background: linear-gradient(135deg, #2a5cff, #2a5cff)!important;
}

/* чекбокс — скрываем нативный, рисуем маркер */
#model-modal .model-checkbox{ position:absolute; inset:auto; width:0; height:0; opacity:0; pointer-events:none; }

/* кастомный маркер выбранности */

#model-modal .model-card.selected{ border-color:#2d54ff; box-shadow:0 0 0 1px rgba(45,84,255,.35) inset; }
#model-modal .model-card.selected::after{
  background:linear-gradient(0deg,var(--btn),var(--btn2));
  border-color:#2a5cff;
}

/* состояние ошибки */
#model-modal .error-message{
  grid-column:1 / -1; padding:10px 12px; border:1px dashed var(--dash);
  border-radius:12px; background:#12141a; color:#ffb3b3;
}


.collection-left {
  display: flex;
  align-items: center;
}

.collection-new {
  border: 1px solid;
  padding: 5px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}

.collection-item:first-child {
  justify-content: center;
  border: 1px solid var(--surface-light);
  border-radius: var(--border-radius-sm);
}

.collection-item:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.collection-image {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
}


.collection-name {
  font-weight: 500;
}

/* Model modal */
.model-search {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--surface-light);
  border-radius: var(--border-radius-sm);
  background-color: var(--surface);
  color: var(--on-surface);
  font-size: 16px;
  margin-bottom: 16px;
  margin-top: 15px;
}

.model-select-all {
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--surface-light);
  margin-bottom: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-select-all:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.model-select-all-check {
  color: var(--success);
  font-size: 18px;
  margin-left: 10px;
  display: none;
}

.model-select-all.selected .model-select-all-check {
  display: block;
}

.model-grid {
  display: grid;
  gap: 12px;
}

.model-card {
  display: flex;
  align-items: center;

  border-radius: var(--border-radius-sm);
  border-bottom: 1px solid var(--surface-light);
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
  overflow: hidden;
  transition: var(--transition);
  padding: 5px;
}

.model-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.model-image {
  width: 33%;
  height: 50px;
  object-fit: contain;
}

.model-info {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 77%;
}

.model-name {
  font-weight: 500;
}

.model-add {
  width: 33%;
  padding: 8px;
  color: var(--primary-light);
  border: none;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--surface-light);
}

.model-add:hover {
  background-color: var(--primary-dark);
}

.model-add.selected {
  background-color: var(--success);
}

/* Background/Pattern modal */
.bg-pattern-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bg-pattern-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border-bottom: 1px solid var(--surface-light);
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
  transition: var(--transition);
}

.bg-pattern-item:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.bg-pattern-item:first-child {
  border: 1px solid var(--surface-light);
  border-radius: var(--border-radius-sm);
}

.bg-pattern-image {
  filter: brightness(0) invert(1);
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
}

.bg-pattern-info {
  display: flex;
  align-items: center;
}

.bg-pattern-image-container {
  margin-right: 12px;
}

.bg-pattern-image-container div {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.bg-pattern-name {
  font-weight: 500;
  margin-right: 4px;
}

.bg-pattern-item:first-child {
  justify-content: center;
}

.bg-pattern-percent {
  font-size: 13px;
  color: #a3a3a3;
}

/* Language selection modal */
.language-selection-modal .modal-body {
  padding: 0;
}

.language-option-settings {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--surface-light);
  cursor: pointer;
}

.language-option-settings:last-child {
  border-bottom: none;
}

.language-option-settings:hover {
  background-color: var(--surface-light);
}

.language-option-settings.selected {
  color: var(--primary-color);
}

.language-option-settings.selected .check-icon {
  display: block;
}

.check-icon {
  display: none;
  color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Utility classes */
.mb-4 {
  margin-bottom: 16px;
}
.mb-6 {
  margin-bottom: 24px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-6 {
  margin-top: 24px;
}
.text-muted {
  color: #a3a3a3;
  margin-top: 10px;
}

.text-center-page {
  position: absolute;
  top: 40vh;
  left: 50%;
  transform: translate(-50%, -50%);
}

.text-center {
  text-align: center;
  color: #fff;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  body {
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid var(--surface-light);
    border-right: 1px solid var(--surface-light);
  }

  .header {
    padding: 14px 20px;
  }

  .page {
    padding: 20px;
  }
}

/* Referral code container */
.referral-code-container {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 0;
  flex-direction: column;
}

.referral-code {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #fff;
  width: 100%;
}

.copy-link-btn {
  padding: 8px 12px;
  font-size: 14px;
  width: 100%;
}

/* Lock Overlay for Pages without Subscription */
.lock-overlay {
  position: absolute;
  top: 250%;
  left: 50%;
  height: 100vh;
  width: 100%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  flex-direction: column;
  text-align: center;
  padding: 20px;
  filter: none;
  backdrop-filter: blur(5px);
}

#create-page .lock-overlay {
  position: fixed;
  top: 50%;
}

.lock-content {
  max-width: 300px;
}

.lock-content p {
  color: var(--on-surface);
  font-size: 16px;
  margin-bottom: 20px;
}

.lock-content .btn-subscribe {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  color: #fff;
}

.page-content {
  position: relative;
  z-index: 10;
}

/* Контейнер для инпута с иконкой */
.input-with-icon {
  position: relative;
  display: flex;
  padding: 6px 6px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--surface-light);
  background: #12141a;
  border-radius: var(--border-radius-sm);
}

/* Стили для инпута */
.input-with-icon input {
  width: 100%;
  padding-right: 30px; /* Добавляем отступ справа для иконки */
  box-sizing: border-box;
}

/* Стили для иконки */
.input-with-icon .input-icon {
  height: 20px;
  width: 20px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(
    --tg-star-color,
    #ffd700
  ); /* Цвет звезды, можно заменить на ваш --tg-star-color */
  font-size: 16px;
  pointer-events: none; /* Иконка не должна реагировать на клики */
}

.input-with-icon .input-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.price-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-input-group input {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text-color);
}

.input-with-icon input {
  width: 100%;
  padding-right: 30px; /* Убедитесь, что этот стиль применяется */
  box-sizing: border-box;
}

.subscription-plan-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background-color: var(--background-color);
}

.plan-select-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.subscriptionActive {
  color: #fff;
  border: 1px solid #fff;
}

.subscriptionActive:hover {
  transform: translateY(0);
  background-color: transparent;
}

.subscription-plan.lower-rank-plan {
  opacity: 0.6;
  position: relative;
}

.subscription-plan.lower-rank-plan::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.subscription-plan.lower-rank-plan .btn-outline {
  width: 100%;
  color: #fff;
  cursor: not-allowed;
}

.subscriptionActive {
  width: 100%;
  color: white !important;
}

.subscription-plan .btn-outline {
  width: 100%;
}

#channel-subscription-modal .modal-content {
  min-width: 100%;
    margin: 0;
  text-align: center;
  padding-bottom: 100px;
}

#channel-subscription-modal img {
  width: 100%;

  margin-bottom: 20px;
}

#channel-subscription-modal h2 {
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: 800;
  padding: 0 10px;
}

#channel-subscription-modal p {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 20px;
  padding: 0 10px;
}

#channel-subscription-modal .btn-subscribe {
  width: 100%;
  max-width: 250px;
  font-size: 17px;
}

#channel-subscription-modal {
  position: fixed;          /* фиксируем к экрану */
  bottom: 0;                /* снизу */
  left: 0;
  width: 100%;              /* на всю ширину */
  height: 55%;              /* половина экрана */
  display: none;
  justify-content: center;
  align-items: flex-start;   /* содержимое сверху внутри окна */
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 1001;
  padding: 20px 10px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  overflow-y: auto;          /* скролл если контента много */
      overflow: hidden;
    padding: 0;
    margin: 0;
}

#channel-subscription-modal .close-modal {
  position: absolute;
  right: 5%;
  font-size: 30px;
  top: 2.5%;
  cursor: pointer;
  transform: translate(-2.5%, -5%);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}


/* Конфетти для успешной подписки */
.image-confetti {
  position: absolute;
  width: 40px;
  height: 40px;
  object-fit: contain;
  animation: fly linear forwards;
  pointer-events: none;
  z-index: 1000; /* Устанавливаем высокий z-index, чтобы конфетти были поверх модалок */
}

@keyframes fly {
  to {
    transform: translateX(var(--tx)) translateY(var(--ty)) rotate(var(--rotate));
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .image-confetti {
    width: 30px;
    height: 30px;
  }
}

#delete-filter-modal .modal-title {
  margin-bottom: 0;
}

#delete-filter-text {
  margin-bottom: 0;
}

#delete-filter-modal .modal-actions {
  flex-direction: row;
}

#delete-filter-modal .btn {
  width: 50%;
}

/* Home Page Styles */
#home-page {
  padding: 16px;
  padding-bottom: 80px;
  background-color: var(--background);
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  padding: 24px 16px;
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  border: 1px solid var(--surface-light);
  box-shadow: var(--shadow-md);
}

.hero-content {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
  line-height: 1.3;
}

.hero-content p {
  font-size: 16px;
  color: #a3a3a3;
  margin-bottom: 24px;
  line-height: 1.5;
}

.hero-image {
  width: 100%;
  max-width: 300px;
  position: relative;
  z-index: 2;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.features-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.feature-card {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  border-radius: var(--border-radius);
  padding: 20px;
  border: 1px solid var(--surface-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.feature-card p {
  font-size: 14px;
  color: #a3a3a3;
  text-align: center;
  line-height: 1.5;
}

.stats-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 32px;
}

.stats-card {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  text-align: center;
  border: 1px solid var(--surface-light);
  box-shadow: var(--shadow-sm);
}

.stats-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.stats-label {
  font-size: 12px;
  color: #a3a3a3;
}

.subscription-cta {
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  border-radius: var(--border-radius);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--surface-light);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.subscription-cta h2 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #fff;
  font-weight: 700;
}

.subscription-cta p {
  font-size: 14px;
  color: #a3a3a3;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Particles for home page */
.home-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.home-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0.3;
  z-index: 1;
  animation: floatParticle 10s linear infinite;
  filter: brightness(70%);
}

.home-particle img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .hero-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
  }

  .hero-content {
    text-align: left;
    flex: 1;
    padding-right: 32px;
    margin-bottom: 0;
  }

  .hero-image {
    flex: 1;
  }

  .features-section {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-card {
    padding: 16px;
  }

  .stats-value {
    font-size: 22px;
  }

  .stats-label {
    font-size: 14px;
  }
}

/* Animations */
@keyframes floatParticle {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translate(20px, -20px) rotate(180deg);
    opacity: 0.5;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.3;
  }
}

/* Position particles for home page */
.home-particle:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-duration: 12s;
}
.home-particle:nth-child(2) {
  top: 20%;
  left: 80%;
  animation-duration: 15s;
}
.home-particle:nth-child(3) {
  top: 30%;
  left: 30%;
  animation-duration: 10s;
}
.home-particle:nth-child(4) {
  top: 40%;
  left: 60%;
  animation-duration: 13s;
}
.home-particle:nth-child(5) {
  top: 50%;
  left: 20%;
  animation-duration: 11s;
}
.home-particle:nth-child(6) {
  top: 60%;
  left: 70%;
  animation-duration: 14s;
}
.home-particle:nth-child(7) {
  top: 70%;
  left: 40%;
  animation-duration: 9s;
}
.home-particle:nth-child(8) {
  top: 80%;
  left: 90%;
  animation-duration: 16s;
}
.home-particle:nth-child(9) {
  top: 90%;
  left: 50%;
  animation-duration: 12s;
}
.home-particle:nth-child(10) {
  top: 15%;
  left: 25%;
  animation-duration: 10s;
}
.model-card {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1f1f1f, #292929);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.model-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.model-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  width: 100%;
}

.model-card-content {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}


.model-image {
  width: 52px;
    height: 52px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.2s ease;
}



.model-image:hover {
  transform: scale(1.04);
}

.model-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  align-items: flex-start;
}

.model-name {
  font-weight: 600;
  font-size: .8em;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.model-meta {
  font-size: .5em;
  color: #cccccc;
  display: flex;
  gap: 10px;
}

.model-rarity,
.model-price,
.model-total {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.model-rarity:hover,
.model-price:hover,
.model-total:hover {
  background: rgba(255, 255, 255, 0.1);
}

.error-message {
  color: #ff4d4d;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 16px;
  background: rgba(255, 77, 77, 0.1);
  border-radius: 8px;
}

/* Grid layout improvements */
#model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 20px 0;
}

.modal-content.models {
      bottom: 0px;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    min-width: 100%;
    padding: 0 10px;
}

.modal-overlay {
  z-index: 1001;
}

.modal-overlay {
  background-color: rgba(0, 0, 0, 0.1);
}

.model-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid #666;
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.model-checkbox:hover {
  border-color: #ffffff;
}

.model-checkbox:checked {
  background-color: #ffffff;
  border-color: #ffffff;
}

.model-checkbox:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #000000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.model-price img {
  width: 15px;
  height: 15px;
}

body.modal-lock {
  pointer-events: none; /* блокирует всё */
}

body.modal-lock #channel-subscription-modal {
  pointer-events: auto; /* разрешает только внутри модалки */
}

.create-no-filter {
  text-decoration: underline;
  color: #ffffff95;
  font-size: 14px;
}


/* Базовые стили */
:root {
  --bg-dark: #1a1a1a;
  --card-dark: #222;
  --text-main: #f0f0f0;
  --text-dim: #aaa;
  --accent: #6e8efb;
  --border: #333;
}

.referral-code-container {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  border-radius: var(--border-radius);
    border: 1px solid var(--primary-light);
  color: var(--text-main);
  padding: 12px;
  border-radius: 10px;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 14px;
}

/* Компактный заголовок */
.referral-code-container h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.referral-code-container h3 {
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
}


/* Суперкомпактная карточка баланса */
.balance-card {
  background: var(--card-dark);
      border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-content: center;
    align-items: center;
    justify-content: space-between;
}

.balance-label {
  font-size: 13px;
  color: var(--text-dim);
}

.balance-amount-large {
  font-size: 18px;
  font-weight: 600;
  text-align: right;
}

.balance-amount-large .star {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}



.balance-actions button {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  background: #333;
  border: none;
  color: var(--text-main);
  border-radius: 6px;
}

/* Мини-статистика в одну строку */
.referral-stats {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  font-size: 13px;
}

.referral-stat {
  text-align: center;
  flex: 1;
}

.referral-stat div:first-child {
  color: var(--text-dim);
  margin-bottom: 4px;
}

.referral-stat-value {
  font-weight: 500;
}

.referral-stat-value .star {
  width: 12px;
  height: 12px;
  vertical-align: middle;
}

/* Компактная реферальная ссылка */
#referral-code {
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
  text-align: center;
  margin: 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
}

/* Кнопки в одну строку */
.link-actions {
  display: flex;
  gap: 6px;
  margin: 8px 0 12px 0;
}

.btn-copy, .btn-share, .referrals-toggle {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  border-radius: 6px;
  border: none;
  color: var(--text-main);
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-copy {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent; /* убирает синий фон на мобилах */

  transition: transform 5s ease, background 5s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-copy:active {
  transform: scale(0.96) !important;
  background: #3163ff !important;
}

/* Список рефералов */
#your_referrals {
  margin: 12px 0 6px 0;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.referrals-list {
  max-height: 200px;
  overflow-y: auto;
  font-size: 13px;
}

.referral-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}

/* Минималистичный скроллбар */
.referrals-list::-webkit-scrollbar {
  width: 3px;
}

.referrals-list::-webkit-scrollbar-thumb {
  background: #555;
}

/* Описание мелким текстом */
.referral-description {
  font-size: 12px;
  color: var(--text-dim);
  margin: 6px 0;
  line-height: 1.3;
}

.stats-container {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0;
  padding: 0 4px;
}

.stat-item {
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: auto;
}

.stat-icon {
  font-size: 18px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
  overflow: hidden;
  display: flex;
    align-items: center;
}

.stat-label {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  font-size: 16px;
}

.stat-amount {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.star {
  width: 14px;
  height: 14px;
}

/* Цветовые акценты для каждого типа */
.stat-item.invited {
  border-left: 3px solid #6e8efb;
}

.stat-item.earned {
  border-left: 3px solid #4caf50;
}

.stat-item.available {
  border-left: 3px solid #ff9800;
}

@media (max-width: 360px) {
  .stat-item {
    padding: 8px 6px;
  }
  .stat-icon {
    font-size: 16px;
    width: 26px;
    height: 26px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-value {
    font-size: 14px;
  }
}

.referrals-toggle {
  cursor: pointer;
}

.referrals-list {
  margin-top: 10px;
  background: #2c2c2e;
  border-radius: 12px;
  padding: 12px;
}

.referral-item {
  display: flex;
  padding: 6px 0;
  border-bottom: 1px solid #3a3a3a;
  text-align: left;
}

.referral-item:last-child {
  border-bottom: none;
}

.referral-name {
  font-weight: 600;
  font-size: 14px;
}

.referral-date {
  font-size: 12px;
  color: #a3a3a3;
}

.referral-amount {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffa500;
}


.referral-table {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #fff;
}

.referral-table-header,
.referral-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #333;
  align-items: center;
}

.referral-col {
  flex: 1;
  padding: 0 8px;
}

.referral-col.index {
  flex: 0 0 30px;
  text-align: center;
  opacity: 0.6;
}

.referral-col.user {
  flex: 2;
}

.referral-col.volume,
.referral-col.earned {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.ref-user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ref-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}

.ref-name {
  font-weight: bold;
  line-height: 1.2;
}

.ref-date {
  font-size: 12px;
  color: #aaa;
  line-height: 1;
}

.star {
  width: 14px;
  height: 14px;
}

.ref-con {
  text-align: left;
}

:root {
  --bg-dark: #1E1E1E;
  --card-dark: #252525;
  --text-main: #F5F5F5;
  --text-dim: #AAAAAA;
  --accent: #3b82f6;
  --accent-hover: #3b82f6;
  --border: #383838;
  --border-radius: 12px;
}



.referral-code-container {
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0a0a0a, #1f1f1f, #0a0a0a);
  border-radius: var(--border-radius);
  padding: 18px;
  color: var(--text-main);
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.referral-code-container:not(:last-child) {
  border: 1px solid var(--border);
}

.referral-code-container h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}

.stats-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.stat-card {
    border-radius: 10px;
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;

}

.stat-label {
  font-size: 18px;
  color: #F5F5F5;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  background: var(--card-dark);
    border-radius: 10px;
    padding: 7px;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;justify-content: center;
  font-size: 18px;
}

.star-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.btn-withdraw,
.btn-referrals {
  flex: 1;
  padding: 11px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-withdraw {
  background: #3163ff;
  color: white;
}

.btn-withdraw:hover {
  background: #2a5cff;
  transform: translateY(-1px);
}

.btn-referrals {
  background: var(--card-dark);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-referrals:hover {
  background: #2E2E2E;
}

.share-controls {
  display: flex;
  gap: 10px;
}

.stats-div {
  display: flex;
  justify-content: space-between;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: var(--card-dark);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #2E2E2E;
  transform: translateY(-1px);
}

.btn-share {
  background: #3163ff;
}

.fas {
  font-size: 16px;
}

@media (max-width: 400px) {
  .referral-code-container {
    padding: 14px;
  }

}

.header-content {
  display: flex;
  align-items: center;
}

.header-content .modal-title {
  margin-bottom: 0;
  margin-left: 5px;
}
#referral-modal .modal-close {
  padding: 0;
}

.referral-table-header {
  color: #858585;
}

.stat-card .fas {
  font-size: 15px;
  margin-right: 5px;
  margin-top: 0;
}

.stat-card .stat-value {
  display: flex;
  align-items: center;
}

.referral-table .fas {
  font-size: 10px;
  margin-right: 5px;
}

.referral-col.user {
  display: flex;
  align-items: center;
}

.search-container {
  position: relative;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  padding-top: 0;
}

.search-icon {
      position: absolute;
    left: 10px;
    top: 39%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

#referral-modal .modal-header {
  border-bottom: none;
  padding-bottom: 0;
  margin: 10px;
}

.pagination-container {
  display: flex;
  justify-content: center;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.pagination {
  display: flex;
  gap: 8px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-dark);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.page-btn:hover:not(.active) {
  background: var(--border);
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stats-summary {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  padding: 12px;
  background: var(--card-dark);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.stats-summary .stat-item1 {
  flex: 1;
  text-align: center;
  padding: 8px;
}

.stats-summary .stat-value1 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-main);
}

.stats-summary .stat-label1 {
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.8;
}

.stats-summary .star-icon1 {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}


.marketplaces-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
  font-size: 12px;
}

.marketplace-wrapper {
  width: calc(50% - 5px); /* 2 в строке */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 0, 0, 0.05); /* фоновый оттенок */
  padding: 6px 10px;
  border-radius: 12px;
}

.marketplace {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  color: #4d4d4d;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.marketplace-icon {
  width: 16px;
  height: 16px;
}

.marketplace.active {
  background-color: currentColor;
  color: #fff;
  font-weight: bold;
}

.marketplace {
  font-size: 14px;
  border: 1px solid transparent;
}


.marketplaces-title {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  justify-content: space-between;
}

.warning-icon {
  color: #ff5e5e;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  margin-left: 5px;
}

.marketplaces-title .form-label {
  margin-bottom: 0;
}

.tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  padding: 8px 12px;
  background: #fff;
  color: #333;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: none;
  z-index: 10;
}

.tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 10px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
}


/* ===== main screen 1:1 ===== */
.main-v1{
  --bg:#0b0c10;
  --card:#12141a;
  --border:#1e2129;
  --txt:#e7e9ee;
  --title:#ffffff;
  --muted:#8b90a0;
  --green:#21c277;
  --btn:#2a5cff;
  --btn2:#3163ff;
  --dash:#232734;
  --r:16px;
  background:var(--bg);
  color:var(--txt);
  min-height:100%;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.main-wrap{max-width:720px;margin:0 auto;}
.main-h1{margin:0 0 18px;font-size:34px;line-height:1.2;font-weight:800;letter-spacing:.2px;color:var(--title);}

.main-section{margin-top:18px;}
.section-h{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:20px;font-weight:700;color:var(--title);}
.section-h svg{opacity:.9}

.card{
  display:flex;justify-content:space-between;align-items:center;
  background:var(--card);border:1px solid var(--border);border-radius:var(--r);
  padding:16px;margin-bottom:12px;box-shadow:0 0 0 1px rgba(255,255,255,.02) inset;
}
.card-left{display:flex;align-items:center;gap:10px;min-width:0;}
.ic{width:28px;height:28px;border-radius:8px;background:#0f1629;display:inline-flex;align-items:center;justify-content:center;}
.card-title{font-weight:600;font-size:16px;white-space:nowrap;}
.delta{margin-left:6px;font-weight:700;font-size:14px;color:var(--muted);}
.delta.up{color:var(--green);}

.card-right{display:flex;align-items:center;gap:8px;    background: #12141a;}
.value{font-size:18px;font-weight:800;letter-spacing:.2px;}
.gem{opacity:.85;display:inline-flex;}

.btn-row{display:flex;gap:12px;margin-top:10px;    justify-content: center;}
.pill{
  border-radius:999px;padding:12px 18px;font-weight:700;font-size:15px;
  border:1px solid transparent;transition:transform .06s ease,opacity .2s;
  width: 50%;
}
.pill:active{transform:translateY(1px);}
.pill.muted{background:#1a1d24;color:#556070;border-color:#262a33;}
.pill.primary{background:linear-gradient(0deg,var(--btn),var(--btn2));color:#fff;}
.pill.outline{background:transparent;border-color:#2d54ff;color:#c9d2ff;}

.update{
  margin-top:18px;padding:28px 16px;text-align:center;
  border:1px dashed var(--dash);border-radius:var(--r);background:#12141a;
  font-weight:800;font-size:20px;color:#d8dae0;
}

/* мобильные отступы как на макете */
@media (min-width:480px){
  .main-wrap{padding-left:20px;padding-right:20px;}
}

.how-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 15px 0;
}

.how-intro {
  color: #cfd3dc;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
}

.btn-how {
      padding: 16px 24px;
}

.how-step {
  display: flex;
  gap: 14px;
  padding: 10px 10px;
  border-radius: 14px;
  background: linear-gradient(145deg, #171a22, #101218);
  border: 1px solid rgba(255,255,255,0.06);
  width: 100%;
  align-items: center;
}

.how-icon {
  width: 125px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-icon i {
  font-size: 18px;
  color: #fff;
}

.how-title {
  text-align: left;
  font-weight: 700;
  color: #ffffff;
  font-size: 15px;
}

.how-desc {
  text-align: left;
  color: #a9aebd;
  font-size: 14px;
  line-height: 1.45;
}

.how-text {
}

.how-footer {
  display: flex;
  justify-content: center;
}

.how-footer button {
  border-radius: 8px;
  background: linear-gradient(135deg, #2a5cff
, #2a5cff);
  color: white;
      padding: 16px 24px;
  font-weight: 600;
  border: none;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}

.header-how {
  padding: 3px 0;
}

.how-footer button:active {
  transform: scale(0.98);
}


.marketplaces-reset {
  text-align: center;
  display: flex;
}

.reset-marketplaces-btn {
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem .5rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}


.fd {
  color: #fff!important;
}

/* универсальный блюр для всего основного UI под модалкой */
.blurred-under-modal {
  filter: blur(8px) brightness(0.95);
  pointer-events: none;
}

/* блюрим всё под модалкой */
#app-content.blurred {
  filter: blur(6px);
  transition: filter .2s ease;
  pointer-events: none; /* чтобы клики не проходили под модалку */
}
body.no-scroll { overflow: hidden; }

body.modal-open {
  overflow: hidden;
}

.reset-marketplaces-btn i {
  margin-right: -9px;
  font-size: 10px;
}



.modal-footer {
        display: flex
;
    justify-content: center;
    gap: 10px;
    padding: 15px 15px 20px;
    position: sticky;
    bottom: 0;
    left: 0;
    align-items: center;
    background: #171717;
    border-radius: 0;
    /* border-top-left-radius: 12px; */
    /* border-top-right-radius: 12px; */
    /* border-bottom-right-radius: 0; */
    /* border-bottom-right-radius: 0;
    /* border-top: 1px solid var(--border); */
    /* border-left: 1px solid var(--border); */
    /* border-right: 1px solid var(--border); */
    margin: 0 -10px;
}

.btn-reset {
  padding: 15px 0;
      position: relative;
    background: #383838;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    color: #fff;
    width: 50%;
    transition: transform .06s ease, border-color .2s ease, box-shadow .2s ease;

}

.btn-reset-save {
  width: 50%;
  background: linear-gradient(135deg, #2a5cff
, #2a5cff);
}

#delete-filter-modal .models {
  height: auto;
}

#delete-filter-modal .modal-body {
  padding: 20px;
}

.text-center1 {
  color: #fff;
}


#result-modal .models {
  height: auto;
}

#result-modal .modal-body {
  padding: 20px;
}

.how-icon img{
  width: 100%;
    height: 100%;
    object-fit: contain;
}

#how-modal .modal-content{
  height: auto!important;
}

.filter-marketplaces {
  display: flex;
  margin-bottom: 5px;
}

.asdd {
  display: flex;
}

.card-settings-btn {
  margin-right: 5px;
}



.section-h {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  gap: 8px;
  margin-bottom: 12px;
}


.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
      width: 100%;
      margin-bottom: 0;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-size: 15px;
}

.card-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.value {
  font-weight: bold;
  font-size: 15px;
}

.stat-img1 {
  width: 16px;
  height: 16px;
}

.card-content {
  display: none;
  padding-top: 12px;
}

.card-content.active {
  display: block;
}

#collapsible.active {
  display: block;
}

#collapsible {
  display: flex;
  justify-content: space-between;
      padding: 9px;
}
#collapsible .card-header{
  margin-bottom: 0;
}

.main-section .card {
  padding: 9px;
}


.market-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.market-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
      align-items: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.vol {
  margin-left: auto;
  margin-right: 10px;
  color: #aaa;
}

.price {
  color: #ccc;
  min-width: 55px;
}

.total {
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  font-size: 14px;
  border-top: 1px solid #222;
}

.update-time {
  font-size: 12px;
  color: #777;
  margin-top: 6px;
}


.card-settings-btn .fas {
  font-size: 18px;
}

.card-delete-btn .fas {
  font-size: 18px;
  margin-left: 5px;
}

.cardFooterFilter {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filterColor {
      width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
}

.bg-pattern-image.filter {
      width: 30px;
    height: 30px;
  border: none;
  margin: 0;
}

.bg-pattern-item.filter {
  border: none;
  padding: 0;
  margin: 0;
}

.filterFlex {
  display: flex;
  align-items: center;
}

.filterFlex {
  font-size: 14px;
}

.stat-img {
  width: 30px;
  height: 30px;
  margin-left: 5px;
}

.stat-img.asd {
  width: 20px;
  height: 20px;
  margin: 0;
}

.aaa {
  display: flex;
  align-items: center;
}

.stat-item {
}

.card-collection {
  margin: 5px 0;
  justify-content: flex-start;
}

.card-title {
  display: flex;
  align-items: center;
}

.aaa {
  margin-left: 20px;
}

#create-filter-button{
  padding: 20px 0;
}

.header-icon {
  margin-right: 10px;
}



.toast-notification {
  position: fixed;
  top: 120px;
  right: -300px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: white;
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast-notification.show {
  right: 20px;
  opacity: 1;
}

.toast-notification.success {
  background: linear-gradient(135deg, #4caf50, #388e3c);
}

.toast-notification.error {
  background: linear-gradient(135deg, #f44336, #d32f2f);
}

.toast-icon i {
  font-size: 20px;
}


.ggg {
  color: red;
  text-align: center;
  margin-top: 5px;
}


.main-container {
  height: 100vh; /* или calc(var(--vh, 1vh) * 100); */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
}


/* Withdraw Page Styles */
#withdraw-page .header-with-back {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

#withdraw-page .back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--txt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

#withdraw-page .back-btn:hover {
  background: var(--border);
}

#withdraw-page .form-group {
  width: 100%;
}

#withdraw-page .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

#withdraw-page .main-h1 {
  margin-bottom: 0;
  font-size: 22px;
}

#withdraw-page .ton-icon {
  margin-left: 0;
}

#withdraw-page .input-with-icon {
  position: relative;
  border: none;
}

#withdraw-page .form-control {
  width: 100%;
  padding: 14px 16px 14px 42px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--txt);
  font-size: 15px;
  font-weight: 600;
}

#withdraw-page .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

#withdraw-page .payment-methods {
  margin-top: 12px;
}

#withdraw-page .payment-method {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

#withdraw-page .payment-method:hover {
  background: var(--card);
}

#withdraw-page .payment-method.active {
  border-color: var(--btn);
  background: rgba(42, 92, 255, 0.1);
}

#withdraw-page .method-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(42, 92, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: var(--btn);
}

#withdraw-page .method-info {
  flex: 1;
}

#withdraw-page .method-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--txt);
  margin-bottom: 2px;
}

#withdraw-page .method-details {
  font-size: 12px;
  color: var(--muted);
}

#withdraw-page .fa-chevron-right,
#withdraw-page .fa-check-circle {
  color: var(--muted);
  font-size: 14px;
}

#withdraw-page .payment-method.active .fa-check-circle {
  color: var(--btn);
}

#withdraw-page .status-message {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  padding: 8px;
}

#withdraw-page .star-icon {
  width: 16px;
  height: 16px;
}

#withdraw-page .card {
  flex-direction: column;
}

.payment-methods {
  width: 100%;
}

#withdraw-page .section-h {
  margin-top: 10px;
  
}

#withdraw-page {
  background: transparent;
}

.loadTop {
  margin-top: 100px;
}

.uuu {
  margin-right: 5px;
}

.method-details.with {
  padding-left: 10px;
  color: #ffffff!important;
  display: flex;
  align-items: center;
  font-size: 14px;
}

#withdraw-page .form-group {
  margin-bottom: 0;
}

.withImg {
  width: 15px;
  height: 15px;
  margin-left: 5px;
}

.withImg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#withdraw-page .input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

#withdraw-page .input-with-icon input {
}

#withdraw-page .input-with-icon .input-icon {
  position: absolute;
  left: 20px;
  display: flex;
  align-items: center;
}

#withdraw-page .all-btn {
  font-weight: bold;
  border: none;
  color: #fff;
  font-weight: 300;
  text-decoration: underline;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  border: 0;
  margin-left: 10px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}