:root {
  --primary-color: #6c5ce7;
  --primary-dark-color: #4834d4;
  --primary-light-color: #a29bfe;
  --secondary-color: #00cec9;
  --secondary-dark-color: #00a8a3;
  --accent-color: #fd79a8;
  --success-color: #00b894;
  --warning-color: #fdcb6e;
  --danger-color: #e17055;
  --text-dark: #2d3436;
  --text-light: #636e72;
  --white: #ffffff;
  --light-bg: #f8f9fa;
  --gray-light: #dfe6e9;
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light-color));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark-color));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light-bg);
  color: var(--text-dark);
}

.balance-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

.balance-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.balance-header h1 {
  color: var(--primary-color);
  font-size: 2.2rem;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.balance-header h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
}

/* Карточки баланса */
.balance-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.balance-card {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.balance-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-primary);
}

.balance-card:nth-child(2)::before {
  background: var(--gradient-secondary);
}

.balance-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.12);
}

.balance-card i {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.balance-card:nth-child(2) i {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.balance-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.token-count {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.balance-card:nth-child(2) .token-count {
  color: var(--secondary-color);
}

.balance-card:hover .token-count {
  transform: scale(1.1);
}

.balance-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Секция обмена */
.exchange-section {
  background: var(--white);
  border-radius: 16px;
  padding: 35px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.exchange-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: 0;
}

.exchange-section h2 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
  font-size: 1.8rem;
  position: relative;
  z-index: 1;
}

.exchange-form {
  max-width: 550px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.form-group select {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  font-size: 1.05rem;
  background-color: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%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%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 1em;
  transition: all 0.3s ease;
}

.form-group select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.exchange-button {
  width: 100%;
  padding: 16px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
  position: relative;
  overflow: hidden;
}

.exchange-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 0.5s ease;
  transform: skewX(-15deg);
}

.exchange-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(108, 92, 231, 0.4);
}

.exchange-button:hover::before {
  transform: translateX(200%) skewX(-15deg);
}

/* Информационный блок */
.info-section {
  background: var(--white);
  border-radius: 16px;
  padding: 35px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
}

.info-section h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.4rem;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.info-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.info-list {
  list-style: none;
}

.info-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: flex-start;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list i {
  color: var(--primary-color);
  margin-right: 15px;
  margin-top: 5px;
  font-size: 1.1rem;
}

.info-list strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* Адаптивность */
@media (max-width: 768px) {
  .balance-cards {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .exchange-section, .info-section {
    padding: 25px;
  }
  
  .exchange-button {
    padding: 14px;
    font-size: 1rem;
  }
  
  .balance-header h1 {
    font-size: 1.9rem;
  }
}

@media (max-width: 480px) {
  .balance-page {
    padding: 20px 15px;
  }
  
  .balance-header h1 {
    font-size: 1.7rem;
  }
  
  .balance-card {
    padding: 25px;
  }
  
  .token-count {
    font-size: 2rem;
  }
  
  .form-group select {
    padding: 12px 15px;
  }
  
  .info-list li {
    flex-direction: column;
  }
  
  .info-list i {
    margin-bottom: 10px;
  }
}
