/* === PROFILE === */
.profile-hero {
  position: relative;
  text-align: center;
  padding: var(--space-8) var(--space-6) var(--space-6);
  background: rgba(6, 11, 19, 0.6);
  border-radius: var(--card-radius);
  margin-bottom: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  z-index: 1;
}

[data-theme="light"] .profile-hero {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

.profile-hero::before,
.profile-hero::after {
  display: none !important;
}

/* ---- Avatar ---- */
.profile-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  margin-bottom: var(--space-4);
  z-index: 2;
}

.profile-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, 
    #ff007f, 
    #7928ca, 
    #00d4ff, 
    #ff007f
  );
  animation: aura-spin-once 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  z-index: -2;
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.5), 0 0 45px rgba(0, 212, 255, 0.3);
}

/* Inner cut-out to create the gap */
.profile-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  z-index: -1;
}

[data-theme="light"] .profile-avatar-wrap::after {
  background: #ffffff;
}

.profile-avatar {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  border: none;
  object-fit: cover;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-text-primary);
  font-weight: var(--fw-bold);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
  animation: avatar-spin-in 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-avatar:hover { transform: scale(1.05); }

[data-theme="light"] .profile-avatar {
  border: none;
  box-shadow: none;
}

@keyframes aura-spin-once {
  0% { transform: rotate(-360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes avatar-spin-in {
  0% { transform: rotate(-360deg) scale(0.5); opacity: 0; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

.avatar-edit-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  color: #fff;
  border: 2px solid var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.profile-name {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
}

.profile-email {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.settings-group {
  background: var(--color-glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.settings-group-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: var(--space-4) var(--space-5) var(--space-2);
  font-weight: var(--fw-semibold);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border-muted);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.settings-item:first-of-type {
  border-top: none;
}

.settings-item:hover {
  background: var(--color-glass-hover);
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.settings-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  background: var(--color-bg-tertiary);
}

.settings-item-label {
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
}

.settings-item-value {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.settings-item-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
}

/* Language Toggle Pill */
.lang-toggle-pill {
  display: flex;
  background: var(--color-surface-nested);
  border: 1px solid var(--color-glass-hover);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-toggle-pill button {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-toggle-pill button.active {
  background: var(--color-accent-gold);
  color: #000;
  box-shadow: 0 2px 8px rgba(240, 196, 86, 0.3);
}

/* === APP VERSION / RELEASE NOTES MODAL === */
.ver-chip {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent-teal, #14b8a6);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

.ver-modal { padding: 0; overflow: hidden; max-width: 460px; }

.ver-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(20, 184, 166, 0.12));
  border-bottom: 1px solid var(--color-divider-strong);
}
[data-theme="light"] .ver-hero {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(20, 184, 166, 0.08));
}
.ver-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #14b8a6);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
  color: #fff;
}
.ver-title-block { flex: 1; min-width: 0; }
.ver-app-name { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; }
.ver-tagline { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; }
.ver-hero .modal-close { position: absolute; top: var(--space-4); right: var(--space-4); }

.ver-body { padding: var(--space-5) var(--space-6) var(--space-6); }

.ver-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.ver-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 184, 166, 0.12);
  color: var(--color-accent-teal, #14b8a6);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
}
.ver-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-green, #34d399);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}
.ver-pill-code { color: var(--color-text-muted); font-weight: var(--fw-medium); }
.ver-channel {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  background: var(--color-bg-tertiary);
  padding: 4px 10px;
  border-radius: 999px;
}

.ver-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: var(--space-5);
}
.ver-meta {
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.ver-meta span { display: block; font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: 2px; }
.ver-meta b { font-size: var(--text-sm); font-weight: var(--fw-semibold); }

.ver-section-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: var(--fw-semibold);
  margin: var(--space-5) 0 var(--space-3);
}

.ver-changelog {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-height: 230px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}
.ver-log-item { position: relative; padding-left: 18px; }
.ver-log-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent-purple, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.ver-log-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: -14px;
  width: 1px;
  background: var(--color-border-muted);
}
.ver-log-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ver-log-ver { font-weight: var(--fw-bold); font-size: var(--text-sm); }
.ver-log-code { font-size: var(--text-xs); color: var(--color-text-muted); }
.ver-log-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #0a0a0f;
  background: var(--color-accent-gold, #f0c456);
  padding: 2px 8px;
  border-radius: 999px;
}
.ver-log-date { font-size: var(--text-xs); color: var(--color-text-muted); margin-left: auto; }
.ver-log-notes { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.ver-log-notes li {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}
.ver-log-notes li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--color-accent-teal, #14b8a6);
  font-weight: 700;
}

.ver-device { display: flex; flex-direction: column; gap: 8px; }
.ver-device-row { display: flex; align-items: center; justify-content: space-between; font-size: var(--text-sm); }
.ver-device-row span { color: var(--color-text-muted); }
.ver-device-row b { font-weight: var(--fw-medium); }

.ver-footer { margin-top: var(--space-5); }

