.member-profile {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.member-profile__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
  border-bottom: 2px solid rgba(0, 123, 255, 0.2);
}

.member-profile__title {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #333;
  margin: 0;
}

.member-profile__edit-button,
.member-profile__back-button {
  display: inline-block;
  padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(1rem, 2.5vw, 1.5rem);
  background: white;
  border: 2px solid rgba(0, 123, 255, 0.8);
  border-radius: 6px;
  color: #007bff;
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 600;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.member-profile__edit-button:hover,
.member-profile__back-button:hover {
  background: rgba(0, 123, 255, 0.1);
  border-color: #007bff;
  transform: scale(1.05);
}

.member-profile__content {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.member-profile__section {
  background: white;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 2px solid rgba(0, 123, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.member-profile__section-title {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #007bff;
  margin: 0 0 clamp(1rem, 2.5vw, 1.25rem) 0;
  padding-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
  border-bottom: 1px solid rgba(0, 123, 255, 0.2);
}

.member-profile__field {
  display: flex;
  padding: clamp(0.75rem, 2vw, 1rem) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.member-profile__field:last-child {
  border-bottom: none;
}

.member-profile__label {
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 600;
  color: #666;
  min-width: 120px;
  flex-shrink: 0;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
}

.member-profile__value {
  color: #333;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  flex: 1;
}

.member-profile__link {
  display: inline-block;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  transition: color 0.2s ease;
}

.member-profile__link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.member-profile__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.member-profile__list-item {
  padding: clamp(0.5rem, 1.5vw, 0.75rem) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.member-profile__list-item:last-child {
  border-bottom: none;
}

.member-profile__list-date {
  color: #666;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  margin-left: clamp(0.5rem, 1.5vw, 0.75rem);
}

.member-profile__form {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.member-profile__form-field {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
}

.member-profile__form-label {
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 600;
  color: #333;
  font-size: clamp(0.95rem, 2.3vw, 1.05rem);
}

.member-profile__form-input,
.member-profile__form-select {
  padding: clamp(0.75rem, 2vw, 1rem);
  border: 2px solid rgba(0, 123, 255, 0.3);
  border-radius: 6px;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.member-profile__form-input:focus,
.member-profile__form-select:focus {
  outline: none;
  border-color: #007bff;
}

.member-profile__form-static {
  padding: clamp(0.75rem, 2vw, 1rem);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  color: #666;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
}

.member-profile__form-note {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: #666;
  margin: 0;
  font-style: italic;
}

.member-profile__form-actions {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
}

.member-profile__form-submit {
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 3.5vw, 2rem);
  background: #007bff;
  border: 2px solid #007bff;
  border-radius: 6px;
  color: white;
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 600;
  font-size: clamp(0.95rem, 2.3vw, 1.05rem);
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-profile__form-submit:hover {
  background: #0056b3;
  border-color: #0056b3;
  transform: scale(1.02);
}

.member-profile__form-cancel {
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 3.5vw, 2rem);
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  color: #666;
  font-family: 'Cinzel', 'Georgia', serif;
  font-weight: 600;
  font-size: clamp(0.95rem, 2.3vw, 1.05rem);
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.member-profile__form-cancel:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.3);
}

.member-profile__errors {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: rgba(220, 53, 69, 0.1);
  border: 2px solid rgba(220, 53, 69, 0.5);
  border-radius: 8px;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.member-profile__errors h2 {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  color: #dc3545;
  margin: 0 0 clamp(0.75rem, 2vw, 1rem) 0;
}

.member-profile__errors ul {
  margin: 0;
  padding-left: clamp(1.25rem, 3vw, 1.5rem);
}

.member-profile__errors li {
  color: #dc3545;
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
}

@media (max-width: 640px) {
  .member-profile {
    padding: 1rem;
  }

  .member-profile__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .member-profile__title {
    padding-left: 2.5rem;
  }

  .member-profile__field {
    flex-direction: column;
    gap: 0.5rem;
  }

  .member-profile__label {
    min-width: auto;
  }

  .member-profile__form-actions {
    flex-direction: column;
  }

  .member-profile__form-submit,
  .member-profile__form-cancel {
    width: 100%;
    text-align: center;
  }
}

/* Invite Code Display */
.member-profile__section--highlight {
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(108, 92, 231, 0.05) 100%);
  border: 2px solid rgba(0, 123, 255, 0.2);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.invite-code-display {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.invite-code-display__code {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #007bff;
  text-align: center;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: white;
  border-radius: 8px;
  border: 2px dashed rgba(0, 123, 255, 0.3);
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.invite-code-display__url {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.invite-code-display__url-field {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  border: 2px solid rgba(0, 123, 255, 0.3);
  border-radius: 6px;
  background: white;
}

.invite-code-display__url button {
  white-space: nowrap;
  padding: 0.75rem 1.5rem;
}

.invite-code-display__help {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
  text-align: center;
  font-style: italic;
}

@media (max-width: 640px) {
  .invite-code-display__url {
    flex-direction: column;
  }

  .invite-code-display__url button {
    width: 100%;
  }
}
