/* Profile Wrapper: 2 Kolom */
.profile-wrapper {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: stretch;

  z-index: 3;

  position: relative;
  overflow: visible;

  --rt-max-w: 600vh;
  --rt-win-h: 400px;
  --rt-glass: rgba(255, 255, 255, 0.06);
  --rt-border: rgba(255, 255, 255, 0.1);
  margin: 4px auto;
  width: min(100%, var(--rt-max-w));
  background: var(--rt-glass);
  border: 1px solid var(--rt-border);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  padding: 24px;
  margin-top: 5px;

  align-items: flex-start;
  justify-content: center;
  max-width: 800px;
}

/* Kolom kiri: Avatar + Achievements */
.profile-left-col {
  display: flex;
  flex-direction: column;

  min-width: 320px;
  max-width: 100%;
  height: 100%;
}

/* Kolom kanan: Profile Form */
.profile-edit-panel {
  flex: 2 1 0;
  min-width: 340px;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

/* Avatar Container */
.profile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;

  min-width: 320px;
  max-width: 370px;
  flex: 1 1 0;
}

.avatar-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 0px;
  object-fit: cover;
  box-shadow: 0 0 24px #8b5cf6;
  transition: width 0.2s, height 0.2s;
  cursor: pointer;
}

.avatar-info {
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 1.1em;
  color: #fff;
  text-align: center;
  font-family: "Poppins", sans-serif;
}

#avatarName {
  font-weight: 700;
  font-size: 1.1em;
}
#avatarUsername {
  color: #a3a3a3;
  font-size: 0.95em;
}

.avatar-size-label {
  margin-top: 8px;
  color: #c4b5fd;
  font-size: 1em;
  font-family: "Poppins", sans-serif;
}
.avatar-size-slider {
  width: 120px;
  margin-top: 4px;
  accent-color: #8b5cf6;
}

/* Form Container */
.profile-form {
  flex: 1;
  height: var(--rt-win-h);
  overflow-y: auto;
  padding: 25px 25px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rt-border);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  flex-direction: column;
  gap: 18px;
}

.profile-form label {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 1.1em;
  color: #fff;
  display: block;
  margin-top: 25px;
}

.profile-form input {
  width: 100%;
  border: 2px solid #312e81;
  color: #fff;
  font-family: "Poppins", sans-serif;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rt-border);
  color: #fff;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.badge {
  background: #18122b;
  border-radius: 12px;
  padding: 8px;
  display: inline-block;
  box-shadow: 0 0 8px #a855f7;
}
.badge img {
  width: 32px;
  height: 32px;
}

.form-actions {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}
.btn-save,
.btn-reset {
  padding: 12px 32px;
  border-radius: 16px;
  border: none;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.05em;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-save {
  background: #8b5cf6;
  color: #fff;
}
.btn-reset {
  background: #18122b;
  color: #fff;
}
.btn-delete {
  background: #e11d48;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 12px 32px;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.05em;
  cursor: pointer;
  transition: background 0.2s;
}

/* Avatar Crop Modal */
.avatar-crop-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(20, 16, 40, 0.85);
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.avatar-crop-modal.active {
  display: flex;
}
.avatar-crop-content {
  background: #18122b;
  border-radius: 24px;
  padding: 32px 40px;
  box-shadow: 0 0 32px #ffffff;
  position: relative;
  min-width: 320px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow-y: auto;
}
.avatar-crop-close {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 2em;
  color: #8b5cf6;
  cursor: pointer;
}
.avatar-crop-preview {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  background: #312e81;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-crop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  transition: transform 0.2s;
}
.avatar-crop-slider {
  width: 80%;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.avatar-crop-actions {
  display: flex;
  gap: 18px;
  margin-top: 12px;
}

.profile-title {
  width: 100%;
  margin-top: 90px;
  text-align: center;
  font-size: 100px;
  font-family: "Baloo 2", cursive !important;

  z-index: 2;
}
.my {
  color: #ffffff;
  background-clip: text;
  font-weight: bold;
  letter-spacing: 2px;

  text-shadow: 0 0 10px #ffffff;
}
.profile {
  color: #ff38d6;
  background-clip: text;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 0 10px #ff38d6;
}

.avatar-edit-hover {
  position: relative;
  display: inline-block;
}

.avatar-img {
  display: block;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 24px #8b5cf6;
  transition: width 0.2s, height 0.2s;
  cursor: pointer;
}

.avatar-edit-icon {
  position: absolute;
  top: 35%;
  left: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 18, 43, 0.85);
  color: #fff;
  border-radius: 50%;
  font-size: 1.7em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
  cursor: pointer;
}

.avatar-edit-hover:hover .avatar-edit-icon,
.avatar-edit-icon:focus {
  opacity: 1;
  pointer-events: auto;
}

.password-field {
  position: relative;
  width: 100%;
}
.password-field input[type="password"],
.password-field input[type="text"] {
  width: 100%;
  padding-right: 44px;
}
.toggle-password {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #8b5cf6;
  font-size: 1.2em;
  user-select: none;
}
.toggle-password:active {
  color: #a855f7;
}

.profile-left-col > #editProfileFormContainer {
  width: 100%;
  max-width: 370px;
  margin: 0 auto;
}

.achievements-container {
  margin-top: 4px;
}
