.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(10px);
  z-index: 40;
  display: none;
}

.modal-backdrop.is-visible {
  display: block;
}

.modal {
  border: none;
  padding: 0;
  background: transparent;
  isolation: auto;
  z-index: 50;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.modal::backdrop {
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(10px);
}

.modal__card {
  width: min(520px, 92vw);
  background: rgba(11, 15, 24, 0.95);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  color: var(--text);
  position: relative;
  overflow: visible;
  isolation: auto;
}

.modal__header {
  padding: 1.6rem 1.8rem 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__header .ghost-btn {
  margin-left: 1rem;
  padding: 0.4rem 0.6rem;
}

.modal__tabs {
  display: flex;
  gap: 0.6rem;
  padding: 0 1.8rem;
}

.tab-btn {
  flex: 1;
  padding: 0.55rem 0;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.tab-btn.is-active {
  background: rgba(1, 183, 227, 0.2);
  color: var(--text);
}

.modal__body {
  padding: 0 1.8rem;
  display: grid;
  gap: 1rem;
  overflow: visible;
}

.modal__body label {
  display: grid;
  gap: 0.4rem;
  color: var(--text);
}

.modal__body label.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal__body [data-auth-field="recaptcha"] {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
  position: relative;
  z-index: 10000;
}

.modal__body [data-auth-field="recaptcha"] > div,
.modal__body [data-auth-field="recaptcha"] iframe {
  position: relative;
  z-index: 10000;
}

.modal__body label span {
  color: var(--text);
}

.modal__body input,
.modal__body textarea,
.modal__body select {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: #c5cdd8;
  box-shadow: 0 6px 20px -18px rgba(0, 0, 0, 0.9);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  color-scheme: dark;
}

.modal__body select option {
  background: rgb(12, 18, 30);
  color: #c5cdd8;
}

.modal__body input:focus,
.modal__body textarea:focus,
.modal__body select:focus {
  outline: none;
  border-color: var(--input-border-strong);
  box-shadow: 0 0 0 2px rgba(1, 183, 227, 0.18);
  background: rgba(1, 183, 227, 0.08);
}

.modal__body input:hover,
.modal__body textarea:hover,
.modal__body select:hover {
  border-color: var(--input-border-strong);
}

.modal__body input::placeholder,
.modal__body textarea::placeholder,
.modal__body select::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.modal--review .modal__card {
  width: min(620px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}

.modal--review .modal__body textarea {
  min-height: 180px;
}

.modal__hint,
.form-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.3rem 0 0;
}

.modal__footer {
  padding: 0.2rem 1.8rem 1.6rem;
  display: flex;
  justify-content: flex-end;
}

.modal__error,
.modal__success {
  margin: -1.2rem 1.8rem 1.4rem;
  font-size: 0.9rem;
  text-align: center;
}

.modal__error {
  color: var(--danger);
}

.modal__success {
  color: var(--success);
}

.modal__success .submit-success__link {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

.modal__success .submit-success__link:hover {
  color: var(--success);
}

.modal__error.is-hidden,
.modal__success.is-hidden {
  display: none;
}

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 0.9rem 1.3rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 13, 22, 0.95);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.85);
  z-index: 20;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-hidden {
  pointer-events: none;
}

/* Edit Modal Styles */
.modal--wide .modal__card {
  width: min(720px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}

.edit-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.edit-section__label {
  color: var(--text);
  font-size: 0.95rem;
}

.edit-section--readonly {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.edit-section--readonly .edit-section__label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.readonly-info {
  display: grid;
  gap: 0.3rem;
}

.readonly-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.social-link-item__platform {
  font-weight: 500;
  min-width: 80px;
  color: var(--accent);
}

.social-link-item__url {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-link-add {
  display: flex;
  gap: 0.5rem;
}

.social-link-add input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.platform-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.platform-tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: rgba(1, 183, 227, 0.15);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
}

.tag-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
}

.tag-remove-btn:hover {
  color: var(--danger);
}

.platform-tag-add {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.platform-tag-add input {
  flex: 1;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

/* Select2 Dark Theme Override */
.select2-container--default .select2-selection--multiple {
  background: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  min-height: 42px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: rgba(1, 183, 227, 0.2) !important;
  border: 1px solid rgba(1, 183, 227, 0.3) !important;
  border-radius: 6px !important;
  color: var(--text) !important;
  padding: 4px 8px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--text-muted) !important;
  margin-right: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 2px 5px !important;
  border-radius: 6px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
  padding-left: 10px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: var(--danger) !important;
}

.select2-dropdown {
  background: rgb(12, 18, 30) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  z-index: 2000 !important;
}

.select2-container--default .select2-results__option {
  color: var(--text) !important;
  padding: 8px 12px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: rgba(1, 183, 227, 0.2) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
  background: rgba(255, 255, 255, 0.06) !important;
}

.select2-container--default .select2-results__option--selected {
  background: rgba(255, 255, 255, 0.06) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  background: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  padding: 8px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  padding: 4px 8px !important;
}

.select2-container--open {
  z-index: 2000;
}

.select2-results__options {
  max-height: 240px;
  overflow-y: auto;
}

.modal[data-modal="creator-edit"] textarea[name="bio"] {
  min-height: 200px;
}

.ghost-btn--sm {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}
