/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #000000;
  color: #ffffff;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  min-height: 100vh;
}

/* Container - ШИРЕ */
.mix-container {
  width: 100%;
  max-width: 800px;
  background: #1a1b1f;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
}

/* Header */
.mix-header {
  text-align: center;
  margin-bottom: 40px;
}

.mix-logo {
  width: 80px;
  height: 80px;
  display: block;
  margin: 0 auto 20px;
}

.mix-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.4;
  color: #ffffff;
}

/* Form */
.mix-form {
  width: 100%;
}

/* Exchange Panel */
.exchange-panel {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 32px;
  position: relative;
}

/* Panel */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1a1b1f;
  border: 1px solid #333333;
  border-radius: 12px;
  overflow: visible;
}

/* Panel Label */
.panel-label {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #333333;
}

/* Panel Header */
.panel-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1b1f;
}

/* Amount Input */
.from-panel .panel-header input {
  width: 100%;
  max-width: 280px;
  padding: 12px 16px;
  font-size: 32px;
  font-weight: 700;
  text-align: right;
  border: none;
  background: transparent;
  color: #ffffff;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.from-panel .panel-header input::placeholder {
  color: #555555;
}

/* Receive Amount */
.to-panel .panel-header .receive-big {
  width: 100%;
  max-width: 280px;
  padding: 12px 16px;
  font-size: 32px;
  font-weight: 700;
  text-align: right;
  color: #ffffff;
  background: transparent;
  font-family: 'Inter', sans-serif;
}

/* Select Area */
.panel-select {
  padding: 12px 16px 16px;
}

/* Custom Select - FIX */
.custom-select {
  position: relative;
  width: 100%;
  z-index: 100;
}

.select-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #333333;
  border-radius: 8px;
  background: #2a2b2f;
  cursor: pointer;
  color: #ffffff;
  transition: border-color 0.2s;
}

.select-trigger:hover {
  border-color: #555555;
}

.select-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.select-value {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arrow {
  font-size: 12px;
  color: #888888;
  transition: transform 0.2s;
}

.custom-select.active .arrow {
  transform: rotate(180deg);
}

/* Options Dropdown - FIX */
.options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1a1b1f;
  border: 1px solid #333333;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 1000 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

/* Scrollbar для списка */
.options::-webkit-scrollbar {
  width: 8px;
}

.options::-webkit-scrollbar-track {
  background: #1a1b1f;
  border-radius: 4px;
}

.options::-webkit-scrollbar-thumb {
  background: #444444;
  border-radius: 4px;
}

.options::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

/* Search Input */
.search-input {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #333333;
  background: #2a2b2f;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  border-radius: 8px 8px 0 0;
  z-index: 2;
}

.search-input::placeholder {
  color: #666666;
}

/* Option Group */
.opt-group {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #1a1b1f;
  position: sticky;
  top: 52px;
  z-index: 1;
}

/* Option Item */
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: #ffffff;
  transition: background 0.15s;
  border-bottom: 1px solid #2a2b2f;
}

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

.option:hover {
  background: #2a2b2f;
}

.option.selected {
  background: #2a2b2f;
  border-left: 3px solid #ff8c00;
}

.option img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.option span {
  white-space: nowrap;
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Swap Button */
.mix-swap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2a2b2f;
  border: 2px solid #333333;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}

.mix-swap:hover {
  background: #ff8c00;
  border-color: #ff8c00;
  transform: translate(-50%, -50%) rotate(90deg);
}

/* Wallet Input */
.mix-form label {
  display: block;
  margin: 24px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mix-form input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #333333;
  border-radius: 8px;
  background: #2a2b2f;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.mix-form input[type="text"]:focus {
  border-color: #ff8c00;
}

.mix-form input[type="text"]::placeholder {
  color: #666666;
}

/* Submit Button */
.mix-submit {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #ff8c00, #e67e00);
  color: #ffffff;
  border: none;
  padding: 16px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 32px;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.3);
}

.mix-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 140, 0, 0.4);
}

.mix-submit:active {
  transform: translateY(0);
}

/* SEO Section */
.seo-section {
  max-width: 800px;
  margin: 48px auto 0;
  padding: 32px;
  background: #1a1b1f;
  border: 1px solid #333333;
  border-radius: 12px;
  color: #cccccc;
}

.seo-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 24px 0 16px;
  color: #ffffff;
}

.seo-section h2:first-child {
  margin-top: 0;
}

.seo-section p {
  margin-bottom: 16px;
  line-height: 1.7;
  font-size: 14px;
}

.seo-section ul {
  margin: 16px 0 16px 24px;
}

.seo-section li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

/* Info Block */
.info-block {
  max-width: 800px;
  margin: 24px auto 0;
  padding: 24px 32px;
  background: #1a1b1f;
  border: 1px solid #333333;
  border-radius: 12px;
  color: #ffffff;
}

.info-block .label {
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 13px;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-block .value p {
  margin: 0;
  font-size: 14px;
}

.info-block .value a {
  color: #ff8c00;
  text-decoration: none;
  transition: opacity 0.2s;
}

.info-block .value a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* Loader */
.loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #444444;
  border-top-color: #ff8c00;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  visibility: hidden;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .mix-container {
    padding: 28px 20px;
    max-width: 100%;
  }
  
  .mix-title {
    font-size: 24px;
  }
  
  .exchange-panel {
    flex-direction: column;
    gap: 12px;
  }
  
  .panel {
    border-radius: 12px;
  }
  
  .from-panel .panel-header input,
  .to-panel .panel-header .receive-big {
    font-size: 28px;
    max-width: 100%;
    text-align: center;
  }
  
  .mix-swap {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: -22px auto;
  }
  
  .mix-submit {
    padding: 14px 20px;
    font-size: 15px;
    margin-top: 28px;
  }
  
  .seo-section,
  .info-block {
    padding: 24px 20px;
    margin-top: 40px;
  }
  
  .seo-section h2 {
    font-size: 18px;
  }
  
  .seo-section p,
  .seo-section li {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 20px 12px;
  }
  
  .mix-container {
    padding: 24px 16px;
    border-radius: 12px;
  }
  
  .mix-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
  }
  
  .mix-title {
    font-size: 20px;
  }
  
  .panel-label {
    padding: 10px 14px;
    font-size: 12px;
  }
  
  .panel-header {
    padding: 16px 14px;
  }
  
  .from-panel .panel-header input,
  .to-panel .panel-header .receive-big {
    font-size: 24px;
  }
  
  .panel-select {
    padding: 10px 14px 14px;
  }
  
  .select-trigger {
    padding: 10px 12px;
  }
  
  .mix-swap {
    width: 40px;
    height: 40px;
    margin: -20px auto;
  }
  
  .mix-form input[type="text"] {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .mix-submit {
    padding: 14px 18px;
    margin-top: 24px;
  }

}

  .wallet-error {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
  }
  .wallet-input.error {
    border-color: #ff4444 !important;
  }
  .wallet-validation-status {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
  }
  .wallet-validation-status.valid {
    color: #00c853;
  }
  .wallet-validation-status.invalid {
    color: #ff4444;
  }