/* --- Profile Page Redesign --- */
.profile-page {
  --profile-bg-1: #0a0f1f;
  --profile-bg-2: #111831;
  --profile-surface: rgba(16, 22, 43, 0.72);
  --profile-surface-strong: #151f3b;
  --profile-border: rgba(124, 154, 255, 0.2);
  --profile-text: #f2f6ff;
  --profile-subtext: #9eaed1;
  --profile-accent: #5f87ff;
  --profile-accent-2: #26d3c6;
  --profile-danger: #ea495a;
  background:
    radial-gradient(900px 500px at 15% -20%, rgba(95, 135, 255, 0.24), transparent 70%),
    radial-gradient(600px 400px at 90% 5%, rgba(38, 211, 198, 0.15), transparent 62%),
    linear-gradient(165deg, var(--profile-bg-1), var(--profile-bg-2));
  min-height: 100vh;
  color: var(--profile-text);
}

.profile-page .profile-header-top {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(100px);
  background: rgba(11, 15, 30, 0.7);
  border-bottom: 1px solid #ffffff14;
}

.profile-page .profile-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-page .profile-logout-btn {
  background: linear-gradient(130deg, #d84057, #f2666f);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 14px;
  cursor: pointer;
}

.profile-main {
  max-width: 1120px;
  margin: 28px auto 0;
  padding: 0 18px 42px;
}

.profile-hero {
  position: relative;
  border: 1px solid var(--profile-border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(18, 26, 52, 0.82), rgba(15, 21, 39, 0.72));
  overflow: hidden;
}

.profile-hero-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  right: -80px;
  top: -90px;
  background: radial-gradient(circle at center, rgba(95, 135, 255, 0.38), rgba(95, 135, 255, 0));
  pointer-events: none;
}

.profile-hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 26px;
  align-items: center;
  padding: 28px;
}

.profile-avatar-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.profile-page .profile-img-wrapper {
  width: 176px;
  height: 176px;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 24px;
  border: 2px solid rgba(170, 194, 255, 0.55);
  background: rgba(18, 26, 52, 0.92);
  box-shadow: 0 18px 34px rgba(2, 6, 18, 0.62);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.profile-page .profile-img-wrapper:hover {
  transform: translateY(-2px);
  border-color: rgba(206, 219, 255, 0.9);
}

.profile-page .profile-img-wrapper.dragging {
  border-color: var(--profile-accent-2);
  box-shadow: 0 0 0 4px rgba(38, 211, 198, 0.15), 0 18px 34px rgba(2, 6, 18, 0.62);
}

.profile-page .profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.profile-page .profile-overlay {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(5, 8, 20, 0.15), rgba(5, 8, 20, 0.75));
}

.profile-page #profile-upload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-upload-btn {
  border: 1px solid rgba(166, 188, 250, 0.4);
  color: #f2f6ff;
  background: rgba(35, 49, 96, 0.75);
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-upload-btn:hover {
  background: rgba(48, 66, 122, 0.9);
}

.profile-photo-hint {
  margin: 0;
  color: var(--profile-subtext);
  font-size: 0.8rem;
  text-align: center;
  max-width: 250px;
}

.profile-identity-panel {
  display: grid;
  gap: 10px;
}

.profile-kicker {
  margin: 0;
  color: var(--profile-accent-2);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-page .profile-name-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-page #profile-name {
  margin: 0;
  line-height: 1.1;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.profile-page #profile-email {
  margin: 0;
  color: var(--profile-subtext);
  font-size: 0.98rem;
}

.profile-page .edit-btn {
  border: 1px solid rgba(173, 192, 245, 0.4);
  color: #d8e4ff;
  background: rgba(31, 47, 87, 0.68);
  border-radius: 10px;
  height: 34px;
  width: 34px;
}

.profile-page .edit-btn:hover {
  color: #fff;
  background: rgba(44, 64, 115, 0.92);
}

.profile-actions-row {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-reset-btn,
.profile-secondary-btn {
  min-height: 42px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}

.profile-reset-btn {
  background: #14532d;
  border: 1px solid #1f7a45;
  color: #f0fff4;
}

.profile-reset-btn:hover {
  background: #166534;
}

.profile-secondary-btn {
  border: 1px solid rgba(173, 192, 245, 0.36);
  color: #e2ecff;
  background: rgba(24, 35, 68, 0.7);
}

.profile-secondary-btn:hover {
  background: rgba(36, 52, 95, 0.84);
}

.profile-options {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-card {
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 26px rgba(2, 6, 18, 0.35);
}

.profile-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(95, 135, 255, 0.3), rgba(38, 211, 198, 0.28));
  margin-bottom: 10px;
}

.profile-card h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
}

.profile-card p {
  margin: 0;
  color: var(--profile-subtext);
  line-height: 1.5;
}

.profile-card-btn {
  margin-top: 12px;
  border: 1px solid rgba(173, 192, 245, 0.38);
  background: var(--profile-surface-strong);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.profile-card-btn:hover {
  background: #25335f;
}

.profile-switch-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d4e1ff;
  font-size: 0.9rem;
}

.profile-switch {
  position: relative;
  width: 52px;
  height: 30px;
}

.profile-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.profile-slider {
  position: absolute;
  inset: 0;
  background: #253155;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.profile-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.profile-switch input:checked + .profile-slider {
  background: linear-gradient(130deg, #4f80ff, #2ac9bd);
}

.profile-switch input:checked + .profile-slider::before {
  transform: translateX(22px);
}

.profile-activity-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #d8e3ff;
  line-height: 1.7;
}

.profile-card-links {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-card-links a {
  border: 1px solid rgba(173, 192, 245, 0.36);
  color: #d9e4ff;
  text-decoration: none;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.84rem;
}

.profile-card-links a:hover {
  background: rgba(33, 47, 88, 0.92);
}

.profile-page .profile-footer {
  background: rgba(10, 14, 29, 0.84);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 860px) {
  .profile-page .profile-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-page .profile-name-group {
    justify-content: center;
  }

  .profile-actions-row {
    justify-content: center;
  }

  .profile-options {
    grid-template-columns: 1fr;
  }
}

.profile-preview-image-box.profile-preview-circle {
  width: 220px !important;
  height: 220px !important;
  min-height: 220px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  background: #d8d8d8 !important;
}

.profile-preview-circle .profile-preview-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transform-origin: center center;
  transition: transform 0.18s ease;
}

.preview-zoom-controls {
  margin: 10px 0 6px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.preview-zoom-controls label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a4a4a;
}

.preview-zoom-controls input[type="range"] {
  width: 100%;
}

.profile-page {
  overflow-x: hidden;
}

