*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  margin: 0;
  line-height: 1.6;
  background: #F3F3F6;
  padding: 30px 20px;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 30px;
  border: 1px solid #DADBE1;
}

h1 {
  margin: 0 0 1.5rem;
  text-align: center;
  background-image: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 25%, #7c3aed 50%, #6366f1 75%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.card {
  margin-bottom: 20px;
  border: 1px solid #DADBE1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  border-radius: 12px;
}

.card-header {
  background-color: #ffffff;
  font-weight: 600;
  padding: 12px 20px;
  border-bottom: 1px solid #DADBE1;
  color: #1A1A1A;
  border-radius: 12px 12px 0 0;
}

.card-body {
  padding: 20px;
}

.field {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #1A1A1A;
}

.form-control {
  display: block;
  width: 100%;
  border-radius: 6px;
  padding: 10px;
  border: 1px solid #DADBE1;
  background-color: #ffffff;
  color: #1A1A1A;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:hover {
  border-color: #A78BFA;
}

.form-control:focus {
  border-color: #A78BFA;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
  outline: none;
}

.custom-select-wrap {
  position: relative;
}

.custom-select-wrap.is-open {
  z-index: 50;
}

.native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #DADBE1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1A1A1A;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select__trigger:hover {
  border-color: #A78BFA;
}

.custom-select-wrap.is-open .custom-select__trigger,
.custom-select__trigger:focus-visible {
  border-color: #A78BFA;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
  outline: none;
}

.custom-select__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%238b5cf6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.2s ease;
}

.custom-select-wrap.is-open .custom-select__arrow {
  transform: rotate(180deg);
}

.custom-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 51;
  margin: 0;
  padding: 6px;
  list-style: none;
  background-color: #ffffff;
  border: 1px solid #DADBE1;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
}

.custom-select__menu[hidden] {
  display: none;
}

.custom-select__option {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #1A1A1A;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-select__option:hover {
  background-color: rgba(167, 139, 250, 0.12);
  color: #7c3aed;
}

.custom-select__option.is-selected {
  background-color: rgba(167, 139, 250, 0.18);
  color: #7c3aed;
  font-weight: 600;
}

.custom-select__option.is-focused:not(.is-selected) {
  background-color: rgba(167, 139, 250, 0.1);
}

.btn {
  display: inline-block;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 25%, #7c3aed 50%, #6366f1 75%, #8b5cf6 100%);
  background-size: 200% 200%;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  animation: gradientShift 3s ease infinite;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
  border-radius: 6px;
}

.btn-outline-secondary {
  border: 1px solid #DADBE1;
  color: #1A1A1A;
  background: #ffffff;
}

.btn-outline-secondary:hover {
  background: #F3F3F6;
  border-color: #A78BFA;
  color: #1A1A1A;
}

.actions {
  margin-top: 1rem;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

pre {
  background-color: #F3F3F6;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #DADBE1;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 14px;
  max-height: 500px;
  overflow: auto;
  color: #1A1A1A;
  margin: 0;
}

.loading {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.loading-spinner {
  border: 4px solid rgba(167, 139, 250, 0.2);
  border-left: 4px solid #a78bfa;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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

.error-message {
  color: #dc2626;
}

.success-message {
  color: #16a34a;
}

.info-item {
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  background-color: #F3F3F6;
  border-left: 3px solid #A78BFA;
}

.info-label {
  font-weight: 600;
  color: #1A1A1A;
  margin-right: 10px;
  min-width: 120px;
  display: inline-block;
}


@media (max-width: 576px) {
  .container {
    padding: 20px;
  }
}
