/* Profile editor — modal refonte */
#editMainProfileModal.profile-editor-modal {
  padding: 12px;
  animation: peFadeIn 0.25s ease;
}

@keyframes peFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#editMainProfileModal.profile-editor-modal > .pe-shell {
  width: 100%;
  max-width: 920px;
  max-height: min(92vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0a0a0f;
  border: 1px solid rgba(247, 127, 0, 0.15);
  border-radius: 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85);
  animation: pePop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes pePop {
  from { transform: scale(0.96) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

#editMainProfileModal .pe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

#editMainProfileModal .pe-header h2 {
  font-family: var(--ff-head);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 900;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

#editMainProfileModal .pe-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

#editMainProfileModal .pe-save-btn {
  background: linear-gradient(135deg, #f77f00, #e8304a);
  color: #fff;
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 12px;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#editMainProfileModal .pe-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
}

#editMainProfileModal .pe-body {
  display: flex;
  gap: 24px;
  padding: 20px 24px 24px;
  overflow: auto;
  flex: 1;
  flex-wrap: wrap;
}

#editMainProfileModal .pe-left {
  width: 260px;
  flex-shrink: 0;
}

#editMainProfileModal .pe-right {
  flex: 1;
  min-width: min(100%, 320px);
}

#editMainProfileModal .pe-preview-card {
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 32px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#editMainProfileModal .pe-colors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 10px;
}

#editMainProfileModal .pe-color {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

#editMainProfileModal .pe-color.active {
  border-color: #f77f00;
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(247, 127, 0, 0.25);
}

#editMainProfileModal .pe-fonts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

#editMainProfileModal .pe-font {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

#editMainProfileModal .pe-font.active {
  border-color: rgba(247, 127, 0, 0.6);
  background: rgba(247, 127, 0, 0.12);
}

#editMainProfileModal .pe-section-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

#editMainProfileModal .pe-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 18px;
  overflow-x: auto;
}

#editMainProfileModal .pe-tab {
  flex: 1;
  min-width: max-content;
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

#editMainProfileModal .pe-tab.active {
  background: #fff;
  color: #000;
}

#editMainProfileModal .pe-content-box {
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 20px;
}

@media (max-width: 720px) {
  #editMainProfileModal.profile-editor-modal {
    padding: 0;
    align-items: flex-end;
  }

  #editMainProfileModal.profile-editor-modal > .pe-shell {
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
    max-width: 100%;
  }

  #editMainProfileModal .pe-body {
    flex-direction: column;
    padding: 16px;
  }

  #editMainProfileModal .pe-left,
  #editMainProfileModal .pe-right {
    width: 100%;
  }

  #editMainProfileModal .pe-tabs {
    flex-wrap: nowrap;
  }
}
