body.modal-open {
  overflow: hidden !important;
}
/* modal */
.modal {
  display: none;
  opacity: 0;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000000;
  background-color: rgba(17, 17, 17, 0.56);
  transition: opacity 0.2s linear;
}
.modal.show {
  opacity: 1;
}
.modal.show .modal-container {
  -webkit-animation: showModal 0.3s;
  animation: showModal 0.3s;
}
.modal.hide .modal-container {
  -webkit-animation: hideModal 0.3s;
  animation: hideModal 0.3s;
}
.modal .modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
}
.modal .modal-wrapper {
  z-index: 1041;
  position: relative;
  pointer-events: none;
  padding: 10px;
  width: 500px;
  max-width: 100%;
  margin: auto;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  min-height: calc(100% - 1rem);
}
.modal .modal-container {
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  pointer-events: auto;
  background-clip: padding-box;
  outline: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fefefe;
  border: 1px solid #888;
  border-radius: 6px;
  width: 100%;
  padding: 20px 20px 30px;
}
.modal .modal-container > div {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}
.modal .modal-header {
  position: relative;
  margin-bottom: 10px;
}
.modal .modal-header span:not(.close) {
  font-size: 24px;
  text-align: left;
  font-weight: 600;
  text-transform: none;
  margin: 0;
  padding: 0;
  display: block;
}
.modal .modal-footer {
  text-align: right;
  margin-top: 10px;
}
.modal .modal-footer .buttons {
  margin: 0 -5px;
}
.modal .modal-footer .buttons .btn {
  margin: 0 5px;
}
.modal .close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  margin-top: -10px;
  position: absolute;
  top: 0;
  right: 0;
}
.modal .close:hover,
.modal .close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}
@media (min-width: 730px) {
  .modal.sm .modal-wrapper {
    width: calc(730px / 2);
  }
}

.modal.loading-modal .modal-backdrop {
  pointer-events: none !important;
}
.modal.loading-modal .modal-content {
  background: none !important;
  border: none !important;
}
.modal.loading-modal .modal-body {
  text-align: center;
}
.modal.loading-modal .modal-body .lds-ripple {
  display: inline-block;
  position: relative;
  width: 120px;
  height: 120px;
}
.modal.loading-modal .modal-body .lds-ripple div {
  position: absolute;
  border: 6px solid var(--primary);
  opacity: 1;
  border-radius: 50%;
  animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.modal.loading-modal .modal-body .lds-ripple div:nth-child(2) {
  animation-delay: -0.5s;
}
@keyframes lds-ripple {
  0% {
    top: 54px;
    left: 54px;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0;
    left: 0;
    width: 108px;
    height: 108px;
    opacity: 0;
  }
}


/* Стили для модальных окон */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease ease;
}
.modal-overlay .modal-content {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  max-width: 560px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  padding: 36px 48px;
  animation: slideIn 0.3s ease ease;
}
.modal-overlay .modal-content .modal-header,
.modal-overlay .modal-content .modal-body {
  padding: 0;
}
.modal-overlay .modal-content .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: url("../images/modal/modal-close.svg") no-repeat center center;
  background-size: 100%;
  width: 33px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}
.modal-overlay .modal-content .modal-top {
  text-align: left;
}
.modal-overlay .modal-content .modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-modal {
  /* Вкладки авторизации */
}
.auth-modal .auth-top .auth-logo {
  font-weight: 800;
  font-size: 22px;
  color: #000000;
  margin-bottom: 12px;
}
.auth-modal .auth-top .auth-title {
  margin: 0 0 3px 0;
  font-size: 32px;
  color: #000000;
  font-weight: 500;
}
.auth-modal .auth-top .auth-subtitle {
  color: #000000;
  margin-bottom: 18px;
}
.auth-modal .auth-top .auth-subtitle a {
  color: #248952;
  text-decoration: none;
}
.auth-modal .auth-tabs {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 1px solid #e5e7eb;
}
.auth-modal .tab-button {
  flex: 1;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
.auth-modal .tab-button.active {
  color: #248952;
  border-bottom-color: #248952;
}
.auth-modal .tab-button:hover {
  color: #248952;
}
.auth-modal .auth-form {
  width: 100%;
}
.auth-modal .password-wrapper {
  display: flex;
  align-items: center;
}
.auth-modal .password-wrapper input {
  flex: 1;
}
.auth-modal .password-wrapper .password-toggle {
  background: none;
  border: none;
  margin-left: 8px;
  cursor: pointer;
  font-size: 16px;
  color: #6b7280;
}
.auth-modal .password-wrapper .password-toggle.visible {
  color: #ef4444;
}
.auth-modal .forgot-row {
  text-align: right;
  margin-bottom: 8px;
}
.auth-modal .forgot-link {
  color: #248952;
  text-decoration: none;
  font-size: 14px;
}
.auth-modal .social-section .social-list {
  display: flex;
  gap: 10px;
}
.auth-modal .social-section .social-list .social-btn {
  display: block;
  position: relative;
  border: 2px solid rgba(17, 17, 17, 0.16);
  background-color: rgba(17, 17, 17, 0);
  height: 48px;
  width: 100%;
  color: #111;
  font-weight: 700;
  font-size: 16px;
  line-height: 44px;
  text-align: center;
  border-radius: 100px;
  margin: 0;
  cursor: pointer;
}
.auth-modal .social-section .social-list .social-btn.vk {
  background: #07f;
  color: #fff;
  font-weight: 600;
  border: none;
}
.auth-modal .auth-footer {
  margin-top: 14px;
  color: #6b7280;
  font-size: 13px;
}
.auth-modal .separator {
  margin: 20px 0 30px;
  font-size: 14px;
  color: #b8b8b8;
  text-align: center;
}
.auth-modal .separator > div {
  display: inline-block;
  width: 30%;
  border-bottom: 1px solid #e8ecee;
  margin-bottom: 4px;
}
.auth-modal .separator > div:first-child {
  margin-right: 15px;
}
.auth-modal .separator > div:last-child {
  margin-left: 15px;
}
/* Формы */
.auth-form {
  animation: fadeIn 0.3s ease ease;
  padding: 0;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #000000;
  font-weight: 500;
  font-size: 14px;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}
.form-group input:focus {
  outline: none;
  border-color: #248952;
}
.submit-button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #248952 0%, #33ac69 100%);
  color: white;
  border: none;
  border-radius: 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
/* Сообщения */
.message.success {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  animation: slideDown 0.3s ease ease;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.message.error {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  animation: slideDown 0.3s ease ease;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.message.info {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  animation: slideDown 0.3s ease ease;
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
/* Меню пользователя */
.user-menu {
  position: absolute;
  top: 70px;
  right: 1rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  min-width: 250px;
  animation: slideDown 0.3s ease ease;
}
.user-menu-content {
  padding: 20px;
  max-width: 300px;
}
.user-menu-content p {
  margin: 0 0 10px 0;
  color: #000000;
  font-size: 14px;
}
.user-menu-content button {
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  color: #000000;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}
.user-menu-content button:hover {
  background: #ffffff;
  border-color: #248952;
}
/* Уведомления */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  max-width: 400px;
}
.notification {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.notification.show {
  transform: translateX(0);
}
.notification-success {
  border-left: 4px solid #3AA56D;
}
.notification-error {
  border-left: 4px solid #ef4444;
}
.notification-warning {
  border-left: 4px solid #f59e0b;
}
.notification-info {
  border-left: 4px solid #06b6d4;
}
.notification-message {
  flex: 1;
  font-size: 14px;
  color: #000000;
}
.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  padding: 0;
  margin-left: 10px;
}
.notification-close:hover {
  color: #000000;
}
/* Стили для платежных модальных окон */
.balance-amount {
  color: #3AA56D;
  font-weight: 600;
  font-size: 18px;
}
.quick-amounts {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}
.quick-amount-btn {
  flex: 1;
  padding: 10px;
  background: #ffffff;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  min-width: 80px;
}
.quick-amount-btn:hover {
  background: #248952;
  color: white;
  border-color: #248952;
}
.payment-info {
  background: #e3f2fd;
  padding: 15px;
  border-radius: 12px;
  margin: 15px 0;
  border-left: 4px solid #2196f3;
}
.payment-info p {
  margin: 5px 0;
  color: #1976d2;
  line-height: 1.2;
}
/* Стили для списка транзакций */
.transactions-modal .modal-content {
  max-width: 600px;
}
.transactions-list {
  max-height: 400px;
  overflow-y: auto;
  margin: 20px 0;
}
.transaction-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  transition: box-shadow 0.2s ease;
}
.transaction-item:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.transaction-item.completed {
  border-left: 4px solid #3AA56D;
}
.transaction-item.completed .transaction-status {
  background: #d4edda;
  color: #155724;
}
.transaction-item.pending {
  border-left: 4px solid #f59e0b;
}
.transaction-item.pending .transaction-status {
  background: #fff3cd;
  color: #856404;
}
.transaction-item.failed,
.transaction-item.cancelled {
  border-left: 4px solid #ef4444;
}
.transaction-item.failed .transaction-status,
.transaction-item.cancelled .transaction-status {
  background: #f8d7da;
  color: #721c24;
}
.transaction-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.transaction-amount {
  font-weight: 600;
  font-size: 16px;
}
.transaction-amount.positive {
  color: #3AA56D;
}
.transaction-amount.negative {
  color: #ef4444;
}
.transaction-type {
  background: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #6b7280;
}
.transaction-status {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.transaction-details {
  display: flex;
  justify-content: space-between;
  color: #6b7280;
  font-size: 12px;
}
.no-transactions {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 40px 20px;
}
.modal-actions {
  border-top: 1px solid #dee2e6;
  padding-top: 20px;
  margin-top: 20px;
}
/* Утилиты */
.hidden {
  display: none !important;
}
/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* Адаптивность */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  .modal-body {
    padding: 20px;
  }
  .user-menu {
    right: 10px;
    left: 10px;
    min-width: auto;
  }
  .user-menu .user-menu-content {
    max-width: none;
  }
  .notification-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}
