.trading-settings-panel {
  max-width: 900px;
  margin: 0 auto;
}

.settings-header {
  margin-bottom: 30px;
}

.settings-header h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: white;
}

.settings-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section {
  background: rgba(0, 212, 255, 0.05);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.form-section h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #00D4FF;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.form-input {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: #00D4FF;
  background: rgba(0, 212, 255, 0.1);
}

.form-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.radio-label:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.4);
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 212, 255, 0.5);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  margin-top: 2px;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #00D4FF;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #00D4FF;
  border-radius: 50%;
}

.radio-content {
  flex: 1;
}

.radio-content strong {
  display: block;
  margin-bottom: 5px;
  color: white;
}

.radio-content small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.template-card {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.template-card:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}

.template-card.selected {
  background: rgba(0, 212, 255, 0.15);
  border-color: #00D4FF;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

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

.template-header h5 {
  font-size: 1rem;
  color: white;
  margin: 0;
}

.template-distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.distribution-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.distribution-item .label {
  color: rgba(255, 255, 255, 0.7);
}

.distribution-item .value {
  color: #00D4FF;
  font-weight: 600;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-top: 20px;
}

.btn-primary, .btn-secondary {
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #00D4FF, #0099CC);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-icon {
  background: rgba(255, 107, 107, 0.2);
  border: none;
  color: #FF6B6B;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-icon:hover {
  background: rgba(255, 107, 107, 0.3);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .templates-grid {
    grid-template-columns: 1fr;
  }
}
