/**
 * FORGE Profile Customization - Premium UI
 * Completely rebuilt with modern layout techniques
 * Dark theme: #0b0b0f background, #111 cards, soft glow accents
 */

/* ════════════════════════════════════════════════════════════
   ROOT VARIABLES - Premium Dark Theme
   ════════════════════════════════════════════════════════════ */

.profile-editor-root {
  --pe-bg: #0b0b0f;
  --pe-bg-elevated: #111116;
  --pe-bg-card: #16161c;
  --pe-bg-hover: #1e1e26;
  --pe-border: #252530;
  --pe-border-light: #2d2d3a;
  --pe-accent: #E8FF47;
  --pe-accent-glow: rgba(232, 255, 71, 0.3);
  --pe-text: #f0f0f5;
  --pe-text-muted: #8a8a9a;
  --pe-text-subtle: #5a5a6a;
  --pe-success: #22c55e;
  --pe-warning: #f59e0b;
  --pe-danger: #ef4444;
  --pe-gold: #FFD700;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition-fast: 150ms;
  --transition-base: 200ms;
  --transition-slow: 250ms;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--pe-accent-glow);
}

/* ════════════════════════════════════════════════════════════
   OVERLAY & MODAL
   ════════════════════════════════════════════════════════════ */

.pe-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition-base) ease;
}

.pe-modal {
  width: 100%;
  max-width: 1440px;
  height: calc(100vh - 2rem);
  max-height: 900px;
  background: var(--pe-bg);
  border: 1px solid var(--pe-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.pe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--pe-bg-elevated);
  border-bottom: 1px solid var(--pe-border);
  flex-shrink: 0;
}

.pe-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--pe-text);
  margin: 0;
  background: linear-gradient(135deg, var(--pe-accent), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pe-header-actions {
  display: flex;
  gap: 0.5rem;
}

.pe-randomize-btn,
.pe-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--pe-border);
  background: var(--pe-bg-card);
  color: var(--pe-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast) ease;
}

.pe-randomize-btn:hover {
  background: var(--pe-accent);
  border-color: var(--pe-accent);
  color: var(--pe-bg);
  box-shadow: var(--shadow-glow);
}

.pe-close-btn:hover {
  background: var(--pe-danger);
  border-color: var(--pe-danger);
  color: white;
}

/* ════════════════════════════════════════════════════════════
   MAIN 3-PANEL LAYOUT
   ════════════════════════════════════════════════════════════ */

.profile-editor {
  display: grid;
  grid-template-columns: 240px 1fr 400px;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .profile-editor {
    grid-template-columns: 220px 1fr 340px;
  }
}

@media (max-width: 960px) {
  .profile-editor {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  
  .pe-nav-panel {
    display: none;
  }
  
  .pe-preview-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60vh;
    z-index: 100;
    transform: translateY(100%);
    transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .pe-preview-panel.open {
    transform: translateY(0);
  }

  .pe-display-name-input {
    min-height: 44px;
  }
}

/* ════════════════════════════════════════════════════════════
   LEFT PANEL - CATEGORY NAVIGATION
   ════════════════════════════════════════════════════════════ */

.pe-nav-panel {
  background: var(--pe-bg-elevated);
  border-right: 1px solid var(--pe-border);
  padding: 1.25rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  overflow-y: auto;
}

.pe-nav-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  color: var(--pe-text-subtle);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 0 0.375rem;
}

.pe-nav-category {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  font-size: 0.875rem;
  color: var(--pe-text-muted);
  border: 1px solid transparent;
  position: relative;
}

.pe-nav-category:hover {
  background: var(--pe-bg-card);
  color: var(--pe-text);
}

.pe-nav-category.active {
  background: var(--pe-bg-card);
  border-color: var(--pe-accent);
  color: var(--pe-accent);
  box-shadow: 0 0 12px rgba(232, 255, 71, 0.15);
}

.pe-nav-category.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--pe-accent);
  border-radius: 0 2px 2px 0;
}

.pe-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

.pe-nav-category.active .pe-nav-icon {
  opacity: 1;
}

.pe-nav-label {
  font-weight: 500;
  flex: 1;
}

.pe-nav-count {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: var(--pe-bg);
  border-radius: 20px;
  color: var(--pe-text-subtle);
  min-width: 24px;
  text-align: center;
}

.pe-nav-category.active .pe-nav-count {
  background: var(--pe-accent);
  color: var(--pe-bg);
}

/* ════════════════════════════════════════════════════════════
   CENTER PANEL - CONTENT AREA
   ════════════════════════════════════════════════════════════ */

.pe-content-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--pe-bg);
}

/* Toolbar - Search & Filters */
.pe-toolbar {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--pe-bg-elevated);
  border-bottom: 1px solid var(--pe-border);
  flex-shrink: 0;
}

.pe-search {
  flex: 1;
  max-width: 320px;
  position: relative;
}

.pe-search input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.25rem;
  background: var(--pe-bg-card);
  border: 1px solid var(--pe-border);
  border-radius: var(--radius-md);
  color: var(--pe-text);
  font-size: 0.875rem;
  transition: all var(--transition-fast) ease;
}

.pe-search input:focus {
  outline: none;
  border-color: var(--pe-accent);
  box-shadow: 0 0 0 3px rgba(232, 255, 71, 0.1);
}

.pe-search input::placeholder {
  color: var(--pe-text-subtle);
}

.pe-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pe-text-subtle);
  font-size: 0.9rem;
  pointer-events: none;
}

.pe-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pe-filter-chip {
  padding: 0.5rem 0.875rem;
  background: var(--pe-bg-card);
  border: 1px solid var(--pe-border);
  border-radius: 20px;
  color: var(--pe-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.pe-filter-chip:hover {
  background: var(--pe-bg-hover);
  border-color: var(--pe-border-light);
  color: var(--pe-text);
}

.pe-filter-chip.active {
  background: var(--pe-accent);
  border-color: var(--pe-accent);
  color: var(--pe-bg);
  box-shadow: 0 0 12px rgba(232, 255, 71, 0.25);
}

.pe-filter-chip .indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Category Header */
.pe-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--pe-bg);
  border-bottom: 1px solid var(--pe-border);
  flex-shrink: 0;
}

.pe-category-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--pe-text);
}

.pe-category-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--pe-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Items Grid */
.pe-items-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.pe-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

@media (max-width: 1200px) {
  .pe-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* ════════════════════════════════════════════════════════════
   ITEM CARDS - PREMIUM DESIGN
   ════════════════════════════════════════════════════════════ */

.pe-item-card {
  position: relative;
  background: var(--pe-bg-card);
  border: 1px solid var(--pe-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.pe-item-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
    rgba(232, 255, 71, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.pe-item-card:hover::before {
  opacity: 1;
}

.pe-item-card:hover {
  border-color: var(--pe-border-light);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md), 0 0 16px rgba(232, 255, 71, 0.12);
}

.pe-item-card.selected {
  border-color: var(--pe-accent);
  background: rgba(232, 255, 71, 0.05);
  box-shadow: 
    0 0 0 1px var(--pe-accent),
    0 8px 24px rgba(232, 255, 71, 0.15);
  animation: pe-selected-pulse 1.8s ease-in-out infinite;
}

@keyframes pe-selected-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px var(--pe-accent),
      0 8px 24px rgba(232, 255, 71, 0.15);
  }
  50% {
    box-shadow:
      0 0 0 1px var(--pe-accent),
      0 10px 30px rgba(232, 255, 71, 0.22),
      0 0 16px rgba(232, 255, 71, 0.18);
  }
}

.pe-item-card.equipped {
  border-color: var(--pe-success);
}

.pe-item-card.equipped::after {
  content: 'ACTIVE';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--pe-success);
  color: var(--pe-bg);
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

/* Card Preview Area */
.pe-card-preview {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--pe-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--pe-border);
}

.pe-thumb {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pe-text-muted);
  background: linear-gradient(140deg, #101017, #191924);
}

/* Frame grid thumbnails: styles are .pe-thumb-ring--* at end of this file (editor-scoped rings). */
.pe-thumb.pe-thumb-ring {
  width: 62px;
  height: 62px;
  max-width: 62px;
  max-height: 62px;
  flex-shrink: 0;
  border-radius: 50%;
  box-sizing: border-box;
}

.pe-thumb-banner {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  box-sizing: border-box;
  border: 1px solid var(--pe-border);
}

.pe-thumb-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

/* Inner span: required for background-clip:text + reliable glyph bounds in flex thumbs */
.profile-editor-root .pe-thumb-name-text {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  line-height: 1.05;
  text-align: center;
}

.profile-editor-root .pe-thumb-name-text.name-anim-neon {
  color: #e8ff47;
}

.profile-editor-root .pe-thumb-name-text.name-anim-shimmer {
  color: rgba(210, 210, 220, 0.72);
}

.profile-editor-root .pe-thumb-name-text.name-anim-electric {
  color: #e0f2fe;
}

.profile-editor-root .pe-thumb-name-text.name-anim-matrix {
  color: #4ade80;
}

.pe-thumb-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--pe-border-light);
  background: radial-gradient(circle at 30% 25%, #2a2a36, #14141d);
}

.pe-thumb-theme {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  background: transparent;
}

.pe-thumb-theme.pe-thumb-theme--quad {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.2rem;
  box-sizing: border-box;
}

.pe-thumb-theme span {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ── Grid previews: profile effects (live CSS), card layout mocks, avatar FX ── */
.profile-editor-root .pe-card-preview--avatar-fx {
  overflow: visible;
  padding: 8px;
  box-sizing: border-box;
}

.profile-editor-root .pe-card-preview--effect-fx {
  overflow: hidden;
}

.profile-editor-root .pe-thumb.pe-thumb-effect-off {
  background: linear-gradient(145deg, #101018, #181822);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--pe-text-muted);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.profile-editor-root .pe-thumb-effect-off-label {
  opacity: 0.75;
}

.profile-editor-root .pe-thumb.pe-thumb-effect-live {
  padding: 5px;
  box-sizing: border-box;
  background: #08080e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-editor-root .pe-thumb-effect-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 52px;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 42%, rgba(232, 255, 71, 0.07), transparent 58%),
    linear-gradient(160deg, #12121a, #0a0a10);
}

.profile-editor-root .pe-thumb-effect-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Card style miniatures */
.profile-editor-root .pe-thumb.pe-thumb-card-mock {
  flex-direction: column;
  width: 86%;
  height: 86%;
  max-width: 76px;
  max-height: 76px;
  padding: 0;
  background: transparent;
  border-radius: 7px;
  overflow: visible;
  font-size: 0;
  line-height: 0;
}

.profile-editor-root .pe-thumb-card-mock {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.profile-editor-root .pe-card-mock-banner {
  flex: 0 0 28%;
  min-height: 0;
  background: linear-gradient(100deg, #3f3f52, #282830 55%, #1e1e28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-editor-root .pe-card-mock-mid {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px;
  min-height: 0;
  background: #12121a;
}

.profile-editor-root .pe-card-mock-avatar {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 22%, #6a6a82, #2e2e3c);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-editor-root .pe-card-mock-lines {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-editor-root .pe-card-mock-lines::before,
.profile-editor-root .pe-card-mock-lines::after {
  content: '';
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
}

.profile-editor-root .pe-card-mock-lines::after {
  width: 58%;
  opacity: 0.85;
}

.profile-editor-root .pe-card-mock-foot {
  flex: 0 0 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='compact'] .pe-card-mock-banner {
  flex-basis: 20%;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='compact'] .pe-card-mock-mid {
  padding: 2px 4px;
  gap: 4px;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='compact'] .pe-card-mock-avatar {
  width: 11px;
  height: 11px;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='banner-focus'] .pe-card-mock-banner {
  flex-basis: 62%;
  background: linear-gradient(120deg, rgba(232, 255, 71, 0.35), #2a2840 45%, #1a1830);
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='banner-focus'] .pe-card-mock-mid {
  padding: 3px 5px;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='stats-heavy'] .pe-card-mock-banner {
  flex-basis: 24%;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='stats-heavy'] .pe-card-mock-foot {
  flex: 0 0 24%;
  background: linear-gradient(
    90deg,
    rgba(232, 255, 71, 0.22),
    rgba(255, 107, 53, 0.12) 40%,
    transparent 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='minimal-dark'] {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='minimal-dark'] .pe-card-mock-banner {
  background: linear-gradient(90deg, #1a1a22, #12121a);
  opacity: 0.85;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='minimal-dark'] .pe-card-mock-mid {
  background: #0b0b10;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='glass'] {
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(18, 18, 28, 0.45);
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='glass'] .pe-card-mock-banner {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='glass'] .pe-card-mock-mid {
  background: rgba(12, 12, 20, 0.35);
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='cinema'] .pe-card-mock-banner {
  flex-basis: 48%;
  background: linear-gradient(
    95deg,
    #0f0f18 0%,
    #2a2038 35%,
    #1a2840 70%,
    #0a0a12 100%
  );
  box-shadow: inset 0 -6px 16px rgba(0, 0, 0, 0.45);
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='cinema'] .pe-card-mock-mid {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 5px;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='cinema'] .pe-card-mock-avatar {
  width: 100%;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='cinema'] .pe-card-mock-lines::before {
  height: 2px;
}

.profile-editor-root .pe-thumb-card-mock[data-pe-card-style='cinema'] .pe-card-mock-lines::after {
  height: 2px;
  width: 72%;
}

/* Name effect grid: full “FORGE” for typewriter (no width loop) */
.profile-editor-root .pe-thumb-name-text.pe-thumb-name--static-typewriter.name-typewriter {
  animation: none !important;
  width: auto !important;
  max-width: 100%;
  overflow: visible;
  border-right: none;
  white-space: nowrap;
}

/* Avatar enhancement thumbnails: face + registry animation layer */
.profile-editor-root .pe-thumb.pe-thumb-avatar-mini {
  position: relative;
  width: 54px;
  height: 54px;
  max-width: 54px;
  max-height: 54px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.profile-editor-root .pe-thumb-avatar-face {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--pe-border-light);
  background: radial-gradient(circle at 30% 25%, #2a2a36, #14141d);
  box-sizing: border-box;
}

.profile-editor-root .pe-thumb-avatar-fx {
  position: absolute;
  inset: -14px;
  z-index: 2;
  pointer-events: none;
}

.profile-editor-root .pe-thumb-avatar-mini .avatar-orbital-dots {
  transform: scale(0.52);
  transform-origin: center center;
}

.profile-editor-root .pe-thumb-avatar-mini .avatar-hex-orbit {
  transform: scale(0.55);
  transform-origin: center center;
}

.profile-editor-root .pe-thumb-avatar-mini .avatar-crown-mini {
  top: -3px;
  transform: translateX(-50%) scale(0.72);
}

.profile-editor-root .pe-thumb-avatar-mini .avatar-bloom-halo {
  inset: -12px;
}

.profile-editor-root .pe-thumb.pe-thumb-name {
  color: var(--pe-text);
  background: linear-gradient(145deg, #12121c, #1a1a24);
}

@media (prefers-reduced-motion: reduce) {
  .profile-editor-root .pe-thumb-effect-layer,
  .profile-editor-root .pe-thumb-avatar-fx,
  .profile-editor-root .pe-thumb-name-text {
    animation: none !important;
  }

  .profile-editor-root .pe-thumb-effect-layer::before,
  .profile-editor-root .pe-thumb-effect-layer::after,
  .profile-editor-root .pe-thumb-avatar-fx::before,
  .profile-editor-root .pe-thumb-avatar-fx::after {
    animation: none !important;
  }
}

.pe-card-preview-inner {
  width: 64px;
  height: 64px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animation indicator */
.pe-anim-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--pe-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--pe-accent);
  animation: pe-pulse 2s ease-in-out infinite;
}

@keyframes pe-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* Card Info */
.pe-card-info {
  text-align: center;
  width: 100%;
}

.pe-card-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pe-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.375rem;
}

.pe-card-tags {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pe-card-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pe-card-tag.animated {
  background: rgba(232, 255, 71, 0.15);
  color: var(--pe-accent);
}

.pe-card-tag.glow {
  background: rgba(255, 107, 53, 0.15);
  color: #ff6b35;
}

.pe-card-tag.rare {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

/* Favorite Button */
.pe-fav-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pe-bg);
  border: 1px solid var(--pe-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition-fast) ease;
  font-size: 0.75rem;
  color: var(--pe-text-muted);
  z-index: 10;
}

.pe-item-card:hover .pe-fav-btn {
  opacity: 1;
}

.pe-fav-btn:hover {
  background: var(--pe-bg-card);
  color: var(--pe-gold);
  border-color: var(--pe-gold);
}

.pe-fav-btn.active {
  opacity: 1;
  color: var(--pe-gold);
  border-color: var(--pe-gold);
  background: rgba(255, 215, 0, 0.1);
}

/* ════════════════════════════════════════════════════════════
   RIGHT PANEL - LIVE PREVIEW
   ════════════════════════════════════════════════════════════ */

.pe-preview-panel {
  background: var(--pe-bg-elevated);
  border-left: 1px solid var(--pe-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pe-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--pe-bg-elevated);
  border-bottom: 1px solid var(--pe-border);
  flex-shrink: 0;
}

.pe-preview-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--pe-text);
}

.pe-view-toggles {
  display: flex;
  gap: 0.375rem;
  background: var(--pe-bg-card);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--pe-border);
}

.pe-view-toggle {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--pe-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  border: none;
  background: transparent;
}

.pe-view-toggle:hover {
  color: var(--pe-text);
}

.pe-view-toggle.active {
  background: var(--pe-accent);
  color: var(--pe-bg);
  font-weight: 500;
}

/* Preview Container */
.pe-preview-container {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(232, 255, 71, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255, 107, 53, 0.03) 0%, transparent 50%),
    var(--pe-bg);
  position: relative;
  overflow: hidden;
}

/* Profile Card Preview */
.pe-profile-card {
  width: 100%;
  max-width: 320px;
  background: var(--pe-bg-card);
  border: 1px solid var(--pe-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base) ease;
}

.pe-profile-card.preview-pop {
  animation: pe-preview-pop var(--transition-slow) cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pe-preview-pop {
  0% { transform: scale(0.98); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

.pe-profile-card.mobile {
  max-width: 260px;
  transform: scale(0.9);
}

.pe-effect-layer,
.pe-avatar-enhance-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Above .pe-banner-fill (z-index 0) so particles/glow render on top of banner art */
.pe-profile-banner .pe-effect-layer {
  z-index: 2;
}

.pe-avatar-enhance-layer {
  inset: -12px;
  z-index: 1;
}

.pe-profile-card.style-compact .pe-profile-banner {
  height: 72px;
}

.pe-profile-card.style-compact .pe-profile-body {
  padding: 0.8rem;
}

.pe-profile-card.style-banner-focus .pe-profile-banner {
  height: 120px;
}

.pe-profile-card.style-stats-heavy .pe-profile-stats {
  gap: 0.35rem;
}

.pe-profile-card.style-minimal-dark {
  background: #0d0d12;
  border-color: #1c1c24;
}

.pe-profile-card.theme-crimson {
  --pe-accent: #ff4444;
}

.pe-profile-card.theme-ocean {
  --pe-accent: #4ecdc4;
}

.pe-profile-card.theme-emerald {
  --pe-accent: #22c55e;
}

.pe-profile-card.theme-royal-purple {
  --pe-accent: #a855f7;
}

.pe-profile-card.theme-gold-luxury {
  --pe-accent: #ffd700;
}

.pe-profile-card.theme-cyber-neon {
  --pe-accent: #00ffff;
}

.pe-profile-card.theme-noir {
  --pe-accent: #e8c547;
  --pe-text: #f4f4f5;
}

.pe-profile-card.theme-dawn {
  --pe-accent: #fb7185;
  --pe-text: #fdf2f8;
}

.pe-profile-card.style-glass {
  background: rgba(22, 22, 28, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    var(--shadow-md);
}

.pe-profile-card.style-cinema .pe-profile-banner {
  height: 128px;
}

.pe-profile-card.style-cinema .pe-profile-body {
  padding-top: 0.85rem;
}

.pe-profile-card.style-cinema .pe-profile-avatar-wrap {
  margin-top: -42px;
}

.pe-nav-category {
  width: 100%;
  text-align: left;
  background: transparent;
}

/* Banner art lives on .pe-banner-fill.banner-* (full-bleed under effects). */
.pe-profile-banner {
  height: 90px;
  border-bottom: 1px solid var(--pe-border);
  position: relative;
  overflow: hidden;
  background: transparent;
}

.pe-profile-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.pe-profile-avatar-wrap {
  margin-top: -36px;
  position: relative;
  z-index: 10;
}

.pe-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--pe-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  color: var(--pe-bg);
  border: 4px solid var(--pe-bg-card);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.pe-profile-avatar-wrap .pe-frame-ring {
  z-index: 2;
}

.pe-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pe-profile-info {
  margin-top: 0.75rem;
  text-align: center;
}

.pe-profile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--pe-text);
}

.pe-profile-handle {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--pe-text-muted);
  margin-top: 0.25rem;
}

.pe-profile-badges {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.625rem;
  justify-content: center;
}

.pe-profile-badge {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pe-bg);
  border: 1px solid var(--pe-border);
  border-radius: 5px;
  font-size: 0.7rem;
}

.pe-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pe-border);
}

.pe-profile-stat {
  text-align: center;
}

.pe-profile-stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--pe-accent);
}

.pe-profile-stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  color: var(--pe-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.125rem;
}

/* Display name (public name only; username unchanged) */
.pe-display-name-panel {
  padding: 0.75rem 1.25rem 0.5rem;
  background: var(--pe-bg-elevated);
  border-top: 1px solid var(--pe-border);
  flex-shrink: 0;
}

.pe-dn-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pe-text-subtle);
  margin-bottom: 0.35rem;
}

.pe-display-name-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--pe-border);
  background: var(--pe-bg-card);
  color: var(--pe-text);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.pe-display-name-input:focus {
  outline: none;
  border-color: var(--pe-accent);
  box-shadow: 0 0 0 2px rgba(232, 255, 71, 0.15);
}

.pe-display-name-input::placeholder {
  color: var(--pe-text-subtle);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.pe-dn-hint {
  margin: 0.4rem 0 0;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  line-height: 1.35;
  color: var(--pe-text-muted);
}

/* Preview Actions */
.pe-preview-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--pe-bg-elevated);
  border-top: 1px solid var(--pe-border);
  flex-shrink: 0;
}

.pe-btn {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  border: 1px solid var(--pe-border);
  background: var(--pe-bg-card);
  color: var(--pe-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.pe-btn:hover {
  background: var(--pe-bg-hover);
  border-color: var(--pe-border-light);
}

.pe-btn-primary {
  background: var(--pe-accent);
  border-color: var(--pe-accent);
  color: var(--pe-bg);
}

.pe-btn-primary:hover {
  background: #d4e63f;
  box-shadow: 0 0 16px rgba(232, 255, 71, 0.3);
}

.pe-btn-secondary {
  background: transparent;
}

/* ════════════════════════════════════════════════════════════
   THUMBNAIL PREVIEWS
   ════════════════════════════════════════════════════════════ */

/* Frame previews */
.frame-preview-none { border: 2px dashed var(--pe-border); }
.frame-preview-gold { border: 3px solid #d4a84b; border-radius: 50%; box-shadow: 0 0 12px rgba(212, 168, 75, 0.4); }
.frame-preview-fire { border: 3px solid #ff6b35; border-radius: 50%; box-shadow: 0 0 12px rgba(255, 107, 53, 0.4); }
.frame-preview-neon { border: 3px solid #E8FF47; border-radius: 50%; box-shadow: 0 0 12px rgba(232, 255, 71, 0.4); }
.frame-preview-royal { border: 3px solid #a855f7; border-radius: 50%; box-shadow: 0 0 12px rgba(168, 85, 247, 0.4); }
.frame-preview-ice { border: 3px solid #7dd3fc; border-radius: 50%; box-shadow: 0 0 12px rgba(125, 211, 252, 0.4); }
.frame-preview-rainbow { border: 3px solid transparent; border-radius: 50%; background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet) border-box; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* Banner previews */
.banner-preview-default { background: linear-gradient(135deg, var(--pe-bg-card), var(--pe-bg-hover)); }
.banner-preview-neon { background: linear-gradient(135deg, rgba(232, 255, 71, 0.3), rgba(78, 205, 196, 0.2)); }
.banner-preview-fire { background: linear-gradient(135deg, rgba(255, 107, 53, 0.4), rgba(239, 68, 68, 0.25)); }
.banner-preview-aurora { background: linear-gradient(135deg, rgba(78, 205, 196, 0.3), rgba(168, 85, 247, 0.3), rgba(232, 255, 71, 0.2)); }

/* ════════════════════════════════════════════════════════════
   EMPTY STATES
   ════════════════════════════════════════════════════════════ */

.pe-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--pe-text-muted);
  grid-column: 1 / -1;
}

.pe-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.pe-empty-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  color: var(--pe-text);
  margin-bottom: 0.5rem;
}

.pe-empty-desc {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  max-width: 200px;
  color: var(--pe-text-subtle);
}

/* ════════════════════════════════════════════════════════════
   LOADING STATES
   ════════════════════════════════════════════════════════════ */

.pe-skeleton {
  background: linear-gradient(90deg, var(--pe-bg-card) 25%, var(--pe-bg-hover) 50%, var(--pe-bg-card) 75%);
  background-size: 200% 100%;
  animation: pe-skeleton 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes pe-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ════════════════════════════════════════════════════════════ */

.pe-items-scroll::-webkit-scrollbar,
.pe-nav-panel::-webkit-scrollbar {
  width: 6px;
}

.pe-items-scroll::-webkit-scrollbar-track,
.pe-nav-panel::-webkit-scrollbar-track {
  background: transparent;
  margin: 0.5rem 0;
}

.pe-items-scroll::-webkit-scrollbar-thumb,
.pe-nav-panel::-webkit-scrollbar-thumb {
  background: var(--pe-border);
  border-radius: 3px;
}

.pe-items-scroll::-webkit-scrollbar-thumb:hover,
.pe-nav-panel::-webkit-scrollbar-thumb:hover {
  background: var(--pe-border-light);
}

/* ════════════════════════════════════════════════════════════
   RELIABLE FRAME RINGS — editor only (.profile-editor-root)
   Live preview: hollow circle = transparent background + solid border only
   (no gradient fills, no filter — avoids PFP being covered in some browsers).
   ════════════════════════════════════════════════════════════ */

.pe-avatar-stack {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-editor-root .pe-frame-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  box-sizing: border-box;
  /* Critical: nothing paints in the center — only the border ring */
  background: transparent !important;
  background-image: none !important;
  border-style: solid;
  border-width: 4px;
  box-shadow: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.profile-editor-root .pe-frame-ring--hidden {
  opacity: 0;
  visibility: hidden;
  border-width: 0;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}

/* ── Live preview rings (border + outer glow only) ── */
.profile-editor-root .pe-frame-ring--gold {
  border-color: #d4a84b;
  box-shadow: 0 0 14px rgba(212, 168, 75, 0.45);
}

.profile-editor-root .pe-frame-ring--gold-animated {
  border-color: #e6bc4a;
  animation: pe-ed-gold-shimmer calc(3s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 14px rgba(212, 168, 75, 0.5);
}

.profile-editor-root .pe-frame-ring--fire {
  border-color: #ff6b35;
  animation: pe-ed-fire-flicker calc(1.5s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.55);
}

.profile-editor-root .pe-frame-ring--neon {
  border-color: #d4e84a;
  animation: pe-ed-neon-pulse calc(2s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 12px rgba(232, 255, 71, 0.45);
}

.profile-editor-root .pe-frame-ring--royal {
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
}

.profile-editor-root .pe-frame-ring--ice {
  border-color: #38bdf8;
  animation: pe-ed-ice-glow calc(3s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 14px rgba(125, 211, 252, 0.45);
}

.profile-editor-root .pe-frame-ring--rainbow {
  border-color: #f472b6;
  animation: pe-ed-rainbow-ring calc(4s * var(--anim-duration-multiplier, 1)) linear infinite;
}

.profile-editor-root .pe-frame-ring--cyber {
  border-color: #22d3ee;
  animation: pe-ed-cyber-pulse calc(2s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.5);
}

.profile-editor-root .pe-frame-ring--glow {
  border-color: rgba(255, 255, 255, 0.92);
  animation: pe-ed-aura-breathe calc(4s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
}

.profile-editor-root .pe-frame-ring--obsidian {
  border-color: #2e2e40;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 18px rgba(0, 0, 0, 0.65);
}

.profile-editor-root .pe-frame-ring--diamond {
  border-color: #b8d4e3;
  animation: pe-ed-diamond-glow calc(2s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 12px rgba(184, 212, 227, 0.5);
}

.profile-editor-root .pe-frame-ring--titanium {
  border-color: #94a3b8;
  box-shadow: 0 0 14px rgba(148, 163, 184, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.profile-editor-root .pe-frame-ring--rose-gold {
  border-color: #f9a8d4;
  animation: pe-ed-rose-gold-glow calc(2.8s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 14px rgba(244, 114, 182, 0.45);
}

.profile-editor-root .pe-frame-ring--holo {
  border-color: #22d3ee;
  animation: pe-ed-holo-ring calc(3.5s * var(--anim-duration-multiplier, 1)) linear infinite;
}

.profile-editor-root .pe-frame-ring--verdant {
  border-color: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4), 0 0 0 1px rgba(134, 239, 172, 0.2);
}

.profile-editor-root .pe-frame-ring--sunset {
  border-color: #fb923c;
  box-shadow:
    0 0 14px rgba(251, 146, 60, 0.45),
    0 0 22px rgba(244, 114, 182, 0.25);
}

.profile-editor-root .pe-frame-ring--eclipse {
  border-color: #27272f;
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.45),
    0 0 18px rgba(0, 0, 0, 0.75);
}

/* ── Grid thumbnails: face fill + solid border ring (not over real PFP) ── */
.profile-editor-root .pe-thumb-ring {
  --pe-tr-face: radial-gradient(circle at 32% 28%, #3a3a48, #22222c 52%, #14141a 100%);
  border-radius: 50%;
  border-style: solid;
  border-width: 3px;
  box-sizing: border-box;
  background: var(--pe-tr-face);
  background-image: var(--pe-tr-face);
}

.profile-editor-root .pe-thumb-ring--none {
  border-width: 2px;
  border-style: dashed;
  border-color: #2b2b36;
  box-shadow: none;
}

.profile-editor-root .pe-thumb-ring--gold {
  border-color: #d4a84b;
  box-shadow: 0 0 10px rgba(212, 168, 75, 0.35);
}

.profile-editor-root .pe-thumb-ring--gold-animated {
  border-color: #e6bc4a;
  animation: pe-ed-gold-shimmer calc(3s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(212, 168, 75, 0.4);
}

.profile-editor-root .pe-thumb-ring--fire {
  border-color: #ff6b35;
  animation: pe-ed-fire-flicker calc(1.5s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.45);
}

.profile-editor-root .pe-thumb-ring--neon {
  border-color: #d4e84a;
  animation: pe-ed-neon-pulse calc(2s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(232, 255, 71, 0.35);
}

.profile-editor-root .pe-thumb-ring--royal {
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.profile-editor-root .pe-thumb-ring--ice {
  border-color: #38bdf8;
  animation: pe-ed-ice-glow calc(3s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(125, 211, 252, 0.4);
}

.profile-editor-root .pe-thumb-ring--rainbow {
  border-color: #f472b6;
  animation: pe-ed-rainbow-ring-thumb calc(4s * var(--anim-duration-multiplier, 1)) linear infinite;
}

.profile-editor-root .pe-thumb-ring--cyber {
  border-color: #22d3ee;
  animation: pe-ed-cyber-pulse calc(2s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.45);
}

.profile-editor-root .pe-thumb-ring--glow {
  border-color: rgba(255, 255, 255, 0.88);
  animation: pe-ed-aura-breathe calc(4s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.profile-editor-root .pe-thumb-ring--obsidian {
  border-color: #2e2e40;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 12px rgba(0, 0, 0, 0.55);
}

.profile-editor-root .pe-thumb-ring--diamond {
  border-color: #b8d4e3;
  animation: pe-ed-diamond-glow calc(2s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(184, 212, 227, 0.45);
}

.profile-editor-root .pe-thumb-ring--titanium {
  border-color: #94a3b8;
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.4);
}

.profile-editor-root .pe-thumb-ring--rose-gold {
  border-color: #f9a8d4;
  animation: pe-ed-rose-gold-glow calc(2.8s * var(--anim-duration-multiplier, 1)) ease-in-out infinite;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.4);
}

.profile-editor-root .pe-thumb-ring--holo {
  border-color: #22d3ee;
  animation: pe-ed-holo-ring-thumb calc(3.5s * var(--anim-duration-multiplier, 1)) linear infinite;
}

.profile-editor-root .pe-thumb-ring--verdant {
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.profile-editor-root .pe-thumb-ring--sunset {
  border-color: #fb923c;
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.4), 0 0 14px rgba(244, 114, 182, 0.2);
}

.profile-editor-root .pe-thumb-ring--eclipse {
  border-color: #27272f;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35), 0 0 10px rgba(0, 0, 0, 0.65);
}

/* Keyframes: only border-color + box-shadow (never background / filter on preview ring) */
@keyframes pe-ed-gold-shimmer {
  0%, 100% {
    box-shadow: 0 0 14px rgba(212, 168, 75, 0.45), 0 0 28px rgba(212, 168, 75, 0.2);
  }
  50% {
    box-shadow: 0 0 22px rgba(212, 168, 75, 0.65), 0 0 40px rgba(212, 168, 75, 0.3);
  }
}

@keyframes pe-ed-fire-flicker {
  0%, 100% {
    box-shadow: 0 0 16px rgba(255, 107, 53, 0.55), 0 0 28px rgba(239, 68, 68, 0.25);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 107, 53, 0.75), 0 0 44px rgba(255, 107, 53, 0.35);
  }
}

@keyframes pe-ed-neon-pulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(232, 255, 71, 0.45), 0 0 22px rgba(78, 205, 196, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(232, 255, 71, 0.65), 0 0 36px rgba(232, 255, 71, 0.35);
  }
}

@keyframes pe-ed-ice-glow {
  0%, 100% {
    box-shadow: 0 0 14px rgba(125, 211, 252, 0.45), 0 0 26px rgba(6, 182, 212, 0.2);
  }
  50% {
    box-shadow: 0 0 22px rgba(125, 211, 252, 0.65), 0 0 40px rgba(125, 211, 252, 0.3);
  }
}

@keyframes pe-ed-rainbow-ring {
  0% {
    border-color: #f472b6;
    box-shadow: 0 0 14px rgba(244, 114, 182, 0.4);
  }
  20% {
    border-color: #a78bfa;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.45);
  }
  40% {
    border-color: #22d3ee;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
  }
  60% {
    border-color: #4ade80;
    box-shadow: 0 0 14px rgba(74, 222, 128, 0.4);
  }
  80% {
    border-color: #facc15;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.4);
  }
  100% {
    border-color: #f472b6;
    box-shadow: 0 0 14px rgba(244, 114, 182, 0.4);
  }
}

@keyframes pe-ed-rainbow-ring-thumb {
  0% {
    border-color: #f472b6;
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.35);
  }
  20% {
    border-color: #a78bfa;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
  }
  40% {
    border-color: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
  }
  60% {
    border-color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.35);
  }
  80% {
    border-color: #facc15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
  }
  100% {
    border-color: #f472b6;
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.35);
  }
}

@keyframes pe-ed-cyber-pulse {
  0%, 100% {
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.5), 0 0 24px rgba(0, 255, 255, 0.25);
  }
  50% {
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.75), 0 0 40px rgba(0, 255, 255, 0.4);
  }
}

@keyframes pe-ed-aura-breathe {
  0%, 100% {
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.3), 0 0 26px rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.5), 0 0 42px rgba(255, 255, 255, 0.25);
  }
}

@keyframes pe-ed-diamond-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(184, 212, 227, 0.45), 0 0 22px rgba(232, 244, 248, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(184, 212, 227, 0.7), 0 0 36px rgba(232, 244, 248, 0.35);
  }
}

@keyframes pe-ed-rose-gold-glow {
  0%, 100% {
    border-color: #fbcfe8;
    box-shadow: 0 0 14px rgba(244, 114, 182, 0.45), 0 0 26px rgba(251, 191, 36, 0.15);
  }
  50% {
    border-color: #f472b6;
    box-shadow: 0 0 22px rgba(244, 114, 182, 0.65), 0 0 36px rgba(251, 191, 36, 0.25);
  }
}

@keyframes pe-ed-holo-ring {
  0% {
    border-color: #22d3ee;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
  }
  33% {
    border-color: #a855f7;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.5);
  }
  66% {
    border-color: #ec4899;
    box-shadow: 0 0 14px rgba(236, 72, 153, 0.45);
  }
  100% {
    border-color: #22d3ee;
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
  }
}

@keyframes pe-ed-holo-ring-thumb {
  0% {
    border-color: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
  }
  33% {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
  }
  66% {
    border-color: #ec4899;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
  }
  100% {
    border-color: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-editor-root .pe-frame-ring,
  .profile-editor-root .pe-thumb-ring {
    animation: none !important;
  }
}
