/* ═══════════════════════════════════════════════════════════════
   ELITE+ SETTINGS REVAMP — Premium Settings Experience
   ═══════════════════════════════════════════════════════════════ */

/* ── Settings Container ─────────────────────────────────────── */
.settings-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Settings Header ────────────────────────────────────────── */
.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}
.settings-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary, #fafafa);
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-subtitle {
  font-size: 14px;
  color: var(--text-muted, #71717a);
  margin: 0;
}

/* ── Settings Search ────────────────────────────────────────── */
.settings-search-wrap {
  position: relative;
  width: 260px;
  flex-shrink: 0;
}
.settings-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #71717a);
  pointer-events: none;
}
.settings-search {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-primary, #fafafa);
  transition: all 0.2s ease;
}
.settings-search:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.settings-search::placeholder {
  color: var(--text-muted, #52525b);
}

/* ── Profile Summary Bar ────────────────────────────────────── */
.settings-profile-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.settings-profile-bar::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.settings-profile-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(99, 102, 241, 0.06) 45%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(99, 102, 241, 0.06) 55%,
    transparent 70%
  );
  animation: profileBarShimmer 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes profileBarShimmer {
  0%, 100% { left: -100%; }
  50% { left: 120%; }
}
.profile-bar-avatar {
  position: relative;
  flex-shrink: 0;
}
.profile-bar-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  overflow: hidden;
}
.profile-bar-avatar-img.has-avatar {
  background-size: cover;
  background-position: center;
  color: transparent;
}
.profile-bar-info {
  flex: 1;
  min-width: 0;
}
.profile-bar-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #fafafa);
  margin-bottom: 2px;
}
.profile-bar-meta {
  font-size: 12px;
  color: var(--text-muted, #71717a);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-bar-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.profile-completeness {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.completeness-ring {
  position: relative;
  width: 44px;
  height: 44px;
}
.completeness-ring svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: visible;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 4px rgba(160, 32, 240, 0.65));
}
.completeness-ring-bg {
  fill: none;
  stroke: var(--border, #27272a);
  stroke-width: 3;
}
.completeness-ring-fill {
  fill: none;
  stroke: var(--accent, #6366f1);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
  animation: completenessRingDraw 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes completenessRingDraw {
  from { stroke-dashoffset: var(--ring-circumference, 113); opacity: 0.4; }
  to { stroke-dashoffset: var(--ring-offset, 0); opacity: 1; }
}
.completeness-pct {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary, #fafafa);
}
.completeness-label {
  font-size: 11px;
  color: var(--text-muted, #71717a);
  line-height: 1.3;
}
.completeness-label strong {
  display: block;
  color: var(--text-secondary, #a1a1aa);
  font-size: 12px;
}

/* ── Settings Tabs ──────────────────────────────────────────── */
.settings-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 16px;
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }

.settings-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-muted, #71717a);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease, background 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
  white-space: nowrap;
  flex: 1;
  justify-content: center;
  min-width: 0;
  position: relative;
}
.settings-tab:hover {
  color: var(--text-secondary, #a1a1aa);
  background: rgba(255, 255, 255, 0.04);
}
.settings-tab.active {
  color: var(--text-primary, #fafafa);
  background: var(--bg-elevated, #1f1f23);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.settings-tab .elite-icon {
  font-size: 15px;
  flex-shrink: 0;
}

/* Tab panels */
.settings-tab-panel {
  display: none;
  animation: stpFadeIn 0.3s ease;
}
.settings-tab-panel.active {
  display: block;
}
@keyframes stpFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Section & Cards ────────────────────────────────────────── */
.settings-section {
  margin-bottom: 24px;
}
.settings-section[data-hidden="true"] {
  display: none;
}
.settings-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary, #a1a1aa);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.settings-section-title svg,
.settings-section-title .elite-icon {
  color: var(--accent, #6366f1);
  opacity: 0.8;
  width: 18px;
  height: 18px;
}

.settings-card {
  background: var(--bg-secondary, #0f0f12);
  border: 1px solid var(--border, #27272a);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.settings-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  background: linear-gradient(135deg, rgba(15, 15, 18, 0.95), rgba(24, 24, 27, 0.5));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.settings-card.no-hover:hover {
  border-color: var(--border, #27272a);
  box-shadow: none;
}

/* ── Settings Items ─────────────────────────────────────────── */
.settings-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(39, 39, 42, 0.5);
  transition: background 0.15s ease;
}
.settings-item:last-child {
  border-bottom: none;
}
.settings-item:hover {
  background: rgba(255, 255, 255, 0.015);
}

.settings-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.settings-toggle-info {
  flex: 1;
  min-width: 0;
}
.settings-toggle-info .settings-label {
  margin-bottom: 2px;
}

.settings-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #fafafa);
  margin-bottom: 4px;
}
.settings-desc {
  font-size: 12px;
  color: var(--text-muted, #71717a);
  line-height: 1.5;
}

/* ── Toggle Switch (Premium) ────────────────────────────────── */
.settings-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
  flex-shrink: 0;
}
.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.settings-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated, #1f1f23);
  border: 1px solid var(--border, #3f3f46);
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--text-muted, #71717a);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.settings-toggle input:checked + .settings-toggle-slider {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
}
.settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(22px);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* ── Select / Input ─────────────────────────────────────────── */
.settings-select,
.settings-input-field {
  width: 100%;
  max-width: 280px;
  padding: 10px 14px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-primary, #fafafa);
  transition: all 0.2s ease;
}
.settings-select:focus,
.settings-input-field:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* ── Checkbox Group ─────────────────────────────────────────── */
.settings-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.settings-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary, #a1a1aa);
  padding: 10px 14px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 10px;
  transition: all 0.2s;
}
.settings-checkbox:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.04);
}
.settings-checkbox:has(input:checked) {
  border-color: var(--accent, #6366f1);
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary, #fafafa);
}
.settings-checkbox input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent, #6366f1);
  flex-shrink: 0;
}

/* ── Appearance: Theme Cards ────────────────────────────────── */
.theme-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}
.theme-card {
  position: relative;
  padding: 16px;
  background: var(--bg-tertiary, #18181b);
  border: 2px solid var(--border, #27272a);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.theme-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1), 0 0 0 1px rgba(99, 102, 241, 0.08);
  background: rgba(99, 102, 241, 0.03);
}
.theme-card.active {
  border-color: var(--accent, #6366f1);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.theme-card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.2s ease;
}
.theme-card.active .theme-card-check {
  opacity: 1;
  transform: scale(1);
}
.theme-card-check svg {
  width: 13px;
  height: 13px;
  color: white;
}
.theme-card-preview {
  width: 100%;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  gap: 2px;
}
.theme-card-preview-sidebar {
  width: 20%;
  height: 100%;
}
.theme-card-preview-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
}
.theme-card-preview-bar {
  height: 6px;
  border-radius: 3px;
  width: 70%;
}
.theme-card-preview-block {
  flex: 1;
  border-radius: 4px;
}
.theme-card.dark-theme .theme-card-preview-sidebar { background: #141416; }
.theme-card.dark-theme .theme-card-preview-content { background: #09090b; }
.theme-card.dark-theme .theme-card-preview-bar { background: #27272a; }
.theme-card.dark-theme .theme-card-preview-block { background: #18181b; }
.theme-card.light-theme .theme-card-preview-sidebar { background: #e5e7eb; }
.theme-card.light-theme .theme-card-preview-content { background: #f9fafb; }
.theme-card.light-theme .theme-card-preview-bar { background: #d1d5db; }
.theme-card.light-theme .theme-card-preview-block { background: #e5e7eb; }
.theme-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #fafafa);
}

/* ── Accent Color Picker ────────────────────────────────────── */
.accent-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.accent-color-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  padding: 0;
}
.accent-color-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px 2px currentColor, 0 0 4px 0 currentColor;
  filter: brightness(1.15);
}
.accent-color-btn.active {
  border-color: var(--text-primary, #fafafa);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
.accent-color-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
  transition: opacity 0.2s;
}
.accent-color-btn.active::after {
  opacity: 1;
}

/* ── Font Size Slider ───────────────────────────────────────── */
.font-size-control {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}
.font-size-control .size-label {
  font-size: 12px;
  color: var(--text-muted, #71717a);
  min-width: 24px;
  text-align: center;
}
.font-size-control .size-label:first-child {
  font-size: 11px;
}
.font-size-control .size-label:last-child {
  font-size: 15px;
}
.font-size-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border, #27272a);
  border-radius: 4px;
  outline: none;
}
.font-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  transition: transform 0.15s ease;
}
.font-size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.font-size-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}
.font-size-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #fafafa);
  min-width: 36px;
  text-align: center;
}

/* ── Profile Card Enhanced ──────────────────────────────────── */
.profile-card-enhanced {
  padding: 24px;
}
.profile-header-enhanced {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border, #27272a);
  margin-bottom: 24px;
}
.profile-avatar-section {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-large {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 20px;
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  overflow: hidden;
}
.profile-avatar-large.has-avatar {
  background-size: cover;
  background-position: center;
  color: transparent;
}
.profile-avatar-edit {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary, #0f0f12);
  border: 2px solid var(--bg-primary, #09090b);
  border-radius: 50%;
  color: var(--text-secondary, #a1a1aa);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.profile-avatar-edit:hover {
  background: var(--accent, #6366f1);
  color: white;
}
.profile-info-section {
  flex: 1;
  min-width: 0;
}
.profile-name-input {
  display: block;
  width: 100%;
  max-width: 300px;
  padding: 6px 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #fafafa);
  transition: border-color 0.2s ease;
}
.profile-name-input:focus {
  outline: none;
  border-bottom-color: var(--accent, #6366f1);
}
.profile-member-since {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted, #71717a);
}

/* ── Profile Grid ───────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.profile-attributes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-field.full-width {
  grid-column: 1 / -1;
}
.profile-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #a1a1aa);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.profile-input,
.profile-select,
.profile-textarea {
  padding: 10px 14px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-primary, #fafafa);
  transition: all 0.2s ease;
}
.profile-input:focus,
.profile-select:focus,
.profile-textarea:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.profile-textarea {
  resize: vertical;
  min-height: 72px;
}

/* ── Profile Section Divider ────────────────────────────────── */
.profile-section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.profile-section-divider::before,
.profile-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, #27272a);
}
.profile-section-divider span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── Playstyle Tags ─────────────────────────────────────────── */
.profile-playstyle {
  margin-bottom: 24px;
}
.playstyle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.playstyle-tag {
  padding: 8px 16px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #a1a1aa);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.playstyle-tag:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--text-primary, #fafafa);
  background: rgba(99, 102, 241, 0.05);
}
.playstyle-tag.selected,
.playstyle-tag.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent, #6366f1);
  color: var(--accent-light, #818cf8);
}

/* ── Attribute Selectors ────────────────────────────────────── */
.attribute-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.attr-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary, #a1a1aa);
  cursor: pointer;
  transition: all 0.2s ease;
}
.attr-checkbox:hover {
  border-color: rgba(99, 102, 241, 0.3);
}
.attr-checkbox:has(input:checked) {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent, #6366f1);
  color: var(--accent-light, #818cf8);
}
.attr-checkbox input {
  accent-color: var(--accent, #6366f1);
  width: 14px;
  height: 14px;
}

/* ── Data & Privacy Buttons ─────────────────────────────────── */
.settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #fafafa);
  cursor: pointer;
  transition: all 0.2s ease;
}
.settings-btn:hover {
  background: var(--bg-hover, #27272a);
  border-color: rgba(99, 102, 241, 0.2);
}
.settings-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.settings-btn-danger {
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}
.settings-btn-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
}
.settings-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #71717a);
  margin-top: 6px;
}

/* ── Storage Indicator ──────────────────────────────────────── */
.storage-usage {
  padding: 16px 20px;
}
.storage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.storage-header .settings-label {
  margin-bottom: 0;
}
.storage-amount {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #a1a1aa);
}
.storage-bar {
  height: 6px;
  background: var(--bg-tertiary, #18181b);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.storage-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.storage-bar-fill.warning {
  background: linear-gradient(90deg, #eab308, #f97316);
}
.storage-bar-fill.danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}
.storage-breakdown {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.storage-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted, #71717a);
}
.storage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ── Connected Accounts ─────────────────────────────────────── */
.settings-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-account-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-account-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.settings-account-icon.google {
  background: linear-gradient(135deg, #4285f4, #ea4335, #fbbc05, #34a853);
  background-size: 200% 200%;
  color: #fff;
}
.settings-account-icon.discord {
  background: #5865F2;
  color: #fff;
}
.settings-account-status {
  display: block;
  font-size: 11px;
  color: var(--text-muted, #71717a);
}
.settings-btn-outline {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--border, #27272a);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #a1a1aa);
  cursor: pointer;
  transition: all 0.2s;
}
.settings-btn-outline:hover {
  border-color: var(--accent, #6366f1);
  color: var(--accent-light, #818cf8);
  background: rgba(99, 102, 241, 0.05);
}

/* ── Account Actions ────────────────────────────────────────── */
.settings-account-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.settings-action-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-link-action {
  text-decoration: none;
  padding: 4px 0;
  transition: opacity 0.2s;
}
.settings-link-action:hover {
  opacity: 0.8;
}
.settings-link-action svg {
  color: var(--text-muted, #71717a);
  width: 18px;
  height: 18px;
}
.settings-btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--border, #27272a);
  border-radius: 8px;
  color: var(--text-secondary, #a1a1aa);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.settings-btn-logout:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}
.settings-btn-logout svg {
  width: 16px;
  height: 16px;
}

/* ── Danger Zone ────────────────────────────────────────────── */
.danger-zone-card {
  border-color: rgba(239, 68, 68, 0.15) !important;
  position: relative;
}
.danger-zone-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.05) 40%, rgba(239, 68, 68, 0.05) 60%, rgba(239, 68, 68, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.danger-zone-card:hover::before {
  opacity: 1;
}
.danger-zone-card:hover {
  border-color: transparent !important;
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.08), 0 0 0 0 transparent !important;
}
.danger-zone-title {
  color: #ef4444 !important;
}
.danger-zone-title svg {
  color: #ef4444 !important;
}

/* ── Billing / Subscription (in settings) ───────────────────── */
.billing-status-card {
  padding: 20px;
  background: var(--bg-secondary, #0f0f12);
  border: 1px solid var(--border, #27272a);
  border-radius: 16px;
}
.billing-plan-display {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #27272a);
  margin-bottom: 16px;
}
.plan-icon-large {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.plan-icon-large.free {
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
}
.plan-icon-large.pro {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}
.plan-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.plan-name-large {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #fafafa);
}
.plan-status {
  font-size: 12px;
  color: var(--text-muted, #71717a);
}
.plan-upgrade-prompt p {
  font-size: 13px;
  color: var(--text-secondary, #a1a1aa);
  margin: 0 0 14px;
  line-height: 1.5;
}
.btn-upgrade-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}
.btn-upgrade-cta {
  animation: upgradeCTAGlow 3s ease-in-out infinite;
}
.btn-upgrade-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.4), 0 0 0 2px rgba(245, 158, 11, 0.15);
  animation: none;
}
@keyframes upgradeCTAGlow {
  0%, 100% { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 4px 24px rgba(245, 158, 11, 0.4), 0 0 0 3px rgba(245, 158, 11, 0.08); }
}
.upgrade-cta-price {
  opacity: 0.7;
  font-weight: 600;
}
.active-subscription-card {
  padding: 20px;
  background: var(--bg-secondary, #0f0f12);
  border: 1px solid var(--border, #27272a);
  border-radius: 16px;
}
.subscription-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.subscription-badge {
  padding: 3px 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: white;
}
.subscription-status {
  font-size: 13px;
  color: #22c55e;
  font-weight: 600;
}
.subscription-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.subscription-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.subscription-label {
  font-size: 11px;
  color: var(--text-muted, #71717a);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.subscription-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #fafafa);
}
.subscription-actions {
  display: flex;
  gap: 10px;
}

/* ── Keyboard Shortcuts ─────────────────────────────────────── */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary, #18181b);
  border-radius: 8px;
}
.shortcut-action {
  font-size: 12px;
  color: var(--text-secondary, #a1a1aa);
}
.shortcut-keys {
  display: flex;
  gap: 4px;
}
.shortcut-key {
  padding: 2px 8px;
  background: var(--bg-elevated, #1f1f23);
  border: 1px solid var(--border, #3f3f46);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #71717a);
  font-family: var(--font-mono, monospace);
}

/* ── Settings Footer ────────────────────────────────────────── */
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border, #27272a);
  position: sticky;
  bottom: 0;
  background: var(--bg-primary, #09090b);
  z-index: 5;
}
.settings-footer .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
  transition: all 0.2s ease;
}
.settings-footer .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.settings-saved-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #22c55e;
  opacity: 0;
  transition: opacity 0.3s;
}
.settings-saved-msg.show {
  opacity: 1;
}

/* ── Auto-save indicator ────────────────────────────────────── */
.settings-autosave-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted, #52525b);
  transition: background 0.3s;
  flex-shrink: 0;
}
.settings-autosave-dot.saving {
  background: #eab308;
  animation: autosavePulse 0.8s ease infinite;
}
.settings-autosave-dot.saved {
  background: #22c55e;
}
@keyframes autosavePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.settings-autosave-text {
  font-size: 12px;
  color: var(--text-muted, #71717a);
}

/* ── Quick Actions Bar ──────────────────────────────────────── */
.settings-quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-tertiary, #18181b);
  border: 1px solid var(--border, #27272a);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #a1a1aa);
  cursor: pointer;
  transition: all 0.2s;
}
.quick-action-btn:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
  color: var(--text-primary, #fafafa);
}
.quick-action-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .settings-header { flex-direction: column; gap: 12px; }
  .settings-search-wrap { width: 100%; }
  .settings-profile-bar { flex-direction: column; text-align: center; gap: 12px; }
  .profile-bar-meta { justify-content: center; }
  .profile-completeness { flex-direction: row; justify-content: center; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-attributes-grid { grid-template-columns: 1fr; }
  .theme-cards { grid-template-columns: 1fr; }
  .shortcuts-grid { grid-template-columns: 1fr; }
  .subscription-details { grid-template-columns: 1fr; }
  .settings-tab span.tab-label { display: none; }
}

@media (max-width: 480px) {
  .settings-container { padding: 16px 12px 64px; }
  .settings-tab { padding: 8px 12px; font-size: 12px; }
  .profile-grid { grid-template-columns: 1fr; }
  .settings-checkbox-group { grid-template-columns: 1fr 1fr; }
  .accent-colors { gap: 8px; }
}
