/**
 * GuideUniverse - Master Aesthetic Solaris ID Player Profile & Collection System
 * Senior UX/UI Redesign: Minimalist Sci-Fi Luxury, Fluid Motion & Rounded Glassmorphism
 * Full Dark (🌙) / Light (☀️) System & Responsive Perfection
 */

/* =========================================================================
   1. GLOBAL PROFILE THEME TOKENS
   ========================================================================= */
body.theme-dark,
body:not(.theme-light) {
  --prof-bg-card: rgba(8, 8, 11, 0.88);
  --prof-bg-card-hover: rgba(12, 12, 16, 0.96);
  --prof-bg-subcard: rgba(15, 15, 19, 0.85);
  --prof-bg-glass: rgba(255, 255, 255, 0.03);
  --prof-bg-input: rgba(10, 10, 14, 0.95);
  --prof-border: rgba(255, 255, 255, 0.08);
  --prof-border-subtle: rgba(255, 255, 255, 0.04);
  --prof-border-hover: rgba(255, 255, 255, 0.18);
  --prof-border-accent: rgba(255, 59, 92, 0.4);
  --prof-text-primary: #ffffff;
  --prof-text-secondary: #94a3b8;
  --prof-text-muted: #64748b;
  --prof-accent-red: #ff3b5c;
  --prof-accent-gold: #f59e0b;
  --prof-accent-emerald: #10b981;
  --prof-accent-purple: #a855f7;
  --prof-shadow-main: 0 20px 50px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  --prof-shadow-hover: 0 26px 65px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  --prof-shadow-glow-red: 0 0 25px rgba(255, 59, 92, 0.25);
  --prof-shadow-glow-gold: 0 0 25px rgba(245, 158, 11, 0.25);
  --prof-cover-fallback: linear-gradient(135deg, #18181c 0%, #08080a 100%);
  --prof-card-art-bg: #060608;
  --prof-card-gradient: linear-gradient(180deg, transparent 35%, rgba(6, 6, 8, 0.82) 70%, rgba(3, 3, 5, 0.99) 100%);
}

body.theme-light {
  --prof-bg-card: rgba(255, 255, 255, 0.88);
  --prof-bg-card-hover: rgba(255, 255, 255, 0.98);
  --prof-bg-subcard: rgba(241, 245, 249, 0.8);
  --prof-bg-glass: rgba(0, 0, 0, 0.02);
  --prof-bg-input: #ffffff;
  --prof-border: rgba(0, 0, 0, 0.08);
  --prof-border-subtle: rgba(0, 0, 0, 0.04);
  --prof-border-hover: rgba(0, 0, 0, 0.15);
  --prof-border-accent: rgba(255, 59, 92, 0.5);
  --prof-text-primary: #0f172a;
  --prof-text-secondary: #475569;
  --prof-text-muted: #94a3b8;
  --prof-accent-red: #ef4444;
  --prof-accent-gold: #d97706;
  --prof-accent-emerald: #059669;
  --prof-accent-purple: #9333ea;
  --prof-shadow-main: 0 16px 40px -8px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
  --prof-shadow-hover: 0 24px 50px -10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08) inset;
  --prof-shadow-glow-red: 0 0 20px rgba(239, 68, 68, 0.15);
  --prof-shadow-glow-gold: 0 0 20px rgba(217, 119, 6, 0.15);
  --prof-cover-fallback: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  --prof-card-art-bg: #e2e8f0;
  --prof-card-gradient: linear-gradient(180deg, transparent 40%, rgba(248, 250, 252, 0.75) 75%, rgba(241, 245, 249, 0.98) 100%);
}

/* =========================================================================
   2. MAIN WRAPPER & GRID LAYOUT WITH TECH GRID BACKDROP
   ========================================================================= */
.profile-view-wrapper {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);
  padding: 110px 4vw 80px 4vw;
  background-color: #050507;
  overflow: hidden;
  animation: profileViewFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light .profile-view-wrapper {
  background-color: #f8fafc;
}

/* Atmospheric Red Ambient Glow & Tech Grid Backdrop */
.profile-ambient-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.profile-ambient-red-glow {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 80% 25%, rgba(239, 68, 68, 0.32) 0%, rgba(220, 38, 38, 0.15) 30%, transparent 65%),
    radial-gradient(circle at 15% 65%, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.06) 35%, transparent 60%),
    radial-gradient(circle at 50% 0%, rgba(255, 59, 92, 0.18) 0%, transparent 50%);
  animation: pulseProfileRedGlow 7s ease-in-out infinite alternate;
}

body.theme-light .profile-ambient-red-glow {
  background: 
    radial-gradient(circle at 80% 25%, rgba(239, 68, 68, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 15% 65%, rgba(239, 68, 68, 0.08) 0%, transparent 50%);
}

@keyframes pulseProfileRedGlow {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1.18; transform: scale(1.04); }
}

.profile-tech-grid {
  position: absolute;
  inset: 0;
  background-size: 42px 42px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 95%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 95%);
}

body.theme-light .profile-tech-grid {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.032) 1px, transparent 1px);
}

.profile-stencil-watermark {
  position: absolute;
  right: -2%;
  bottom: 2%;
  font-family: var(--font-display);
  font-size: clamp(8rem, 18vw, 20rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.022);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

body.theme-light .profile-stencil-watermark {
  color: rgba(0, 0, 0, 0.022);
}

@keyframes profileViewFade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-layout-container {
  position: relative;
  z-index: 2;
  max-width: 1550px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1180px) {
  .profile-layout-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .profile-view-wrapper {
    padding-top: 96px;
  }
}

/* =========================================================================
   3. LEFT SIDEBAR: GAMER IDENTITY & EXPERIENCE PASSPORT
   ========================================================================= */
.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--prof-shadow-main);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-card:hover {
  border-color: var(--prof-border-hover);
  box-shadow: var(--prof-shadow-hover);
}

/* ==========================================================================
   MINIMALIST DARK USER PROFILE CARD (MATCHING REFERENCE DESIGN)
   ========================================================================== */
.profile-user-card {
  position: relative;
  border-radius: 24px;
  background: #111317;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Cover Wrap */
.profile-cover-wrap {
  height: 160px;
  position: relative;
  background: #16181f;
  overflow: hidden;
  cursor: pointer;
}

.profile-cover-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.profile-cover-wrap:hover .profile-cover-bg-image {
  transform: scale(1.03);
}

.profile-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(17, 19, 23, 0.6) 70%, #111317 100%);
  pointer-events: none;
}

.profile-cover-hover-hint {
  position: absolute;
  top: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 3;
}

.profile-cover-wrap:hover .profile-cover-hover-hint {
  opacity: 1;
  transform: translateY(2px);
}

/* Profile Content */
.profile-identity-content {
  padding: 0 24px 24px 24px;
  position: relative;
}

/* Header Row: Avatar + Name + Buttons */
.profile-user-header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: -46px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

/* Avatar Box (Rounded Square / Squircle) */
.profile-avatar-box {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 20px;
  background: #1c1e24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-avatar-box:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 59, 92, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.profile-avatar-initial {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  user-select: none;
}

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

.avatar-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: inherit;
}

.profile-avatar-box:hover .avatar-hover-overlay {
  opacity: 1;
}

.avatar-edit-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* User Info & Actions Container */
.profile-user-info-actions {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-user-text-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.profile-shield-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff3b5c;
  flex-shrink: 0;
}

.profile-handle {
  font-size: 0.92rem;
  color: #8c909c;
  font-weight: 500;
}

/* Action Buttons */
.profile-user-btns-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-profile-edit-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff3b5c;
  border: none;
  color: #ffffff;
  font-family: var(--font-display, sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 59, 92, 0.3);
}

.btn-profile-edit-solid:hover {
  background: #e83353;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 59, 92, 0.45);
}

.btn-profile-share-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-profile-share-icon:hover {
  background: #22252c;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

/* 4 Separate Stats Cards */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.stat-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #17191f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 14px 4px;
  gap: 5px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.stat-mini-card:hover {
  background: #1c1f26;
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-number.rank-red-text {
  color: #ff3b5c;
  font-weight: 900;
}

.stat-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #717682;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
}

/* Footer: Meta Row */
.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.82rem;
  color: #717682;
  font-weight: 500;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  color: #717682;
}

@media (max-width: 600px) {
  .profile-user-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .profile-user-info-actions {
    width: 100%;
  }
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Experience / Level Card */
.profile-level-card {
  padding: 20px 24px;
  display: flex;
  gap: 18px;
  align-items: center;
}

.level-badge-circle-wrap {
  flex-shrink: 0;
}

.level-circle {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.15) 0%, rgba(14, 14, 18, 0.95) 100%);
  border: 1.5px solid rgba(255, 59, 92, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(255, 59, 92, 0.2);
  position: relative;
}

.level-number {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.level-tag {
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--prof-accent-red);
  margin-top: 2px;
  text-transform: uppercase;
}

.level-info-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.level-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.level-title-left h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sparkle-icon {
  color: var(--prof-accent-red);
  font-size: 0.85rem;
}

.last-access-text {
  font-size: 0.7rem;
  color: var(--prof-text-muted);
  margin: 1px 0 0 0;
}

.xp-counter-text {
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: var(--prof-text-primary);
  background: var(--prof-bg-subcard);
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--prof-border-subtle);
}

.xp-progress-bar-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 3px;
  border: 1px solid var(--prof-border-subtle);
  position: relative;
}

.xp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff3b5c 0%, #ff7b90 100%);
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(255, 59, 92, 0.6);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.next-level-msg {
  font-size: 0.7rem;
  color: var(--prof-text-muted);
  margin: 0;
}

/* =========================================================================
   4. RIGHT MAIN CONTENT: TABS, MODERN CONTROLS & SHOWCASE GRID
   ========================================================================= */
.profile-main-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  width: 100%;
}

/* Floating Segmented Navigation Tab Bar */
.profile-nav-tabs,
.profile-nav-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 20px;
  padding: 6px;
  overflow-x: auto;
  box-shadow: var(--prof-shadow-main);
  scrollbar-width: none;
}

.profile-nav-tabs::-webkit-scrollbar {
  display: none;
}

.profile-tab-btn {
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--prof-text-secondary);
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  position: relative;
  outline: none;
}

.profile-tab-btn:hover {
  color: var(--prof-text-primary);
  background: var(--prof-bg-glass);
}

.profile-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #ff3b5c 0%, #d92344 100%);
  box-shadow: 0 6px 20px rgba(255, 59, 92, 0.4);
}

body.theme-light .profile-tab-btn.active {
  color: #ffffff;
}

/* Tab Panes Toggle */
.profile-tab-pane {
  display: none;
}

.profile-tab-pane.active {
  display: block;
  animation: profileTabFade 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes profileTabFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Collection Toolbar & Filter Pills */
.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 18px;
  padding: 12px 18px;
  box-shadow: var(--prof-shadow-main);
}

.collection-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.coll-filter-pill {
  background: var(--prof-bg-subcard);
  border: 1px solid var(--prof-border);
  color: var(--prof-text-secondary);
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.coll-filter-pill:hover {
  color: var(--prof-text-primary);
  border-color: rgba(255, 59, 92, 0.4);
  transform: translateY(-1px);
}

.coll-filter-pill.active {
  background: linear-gradient(135deg, #ff3b5c 0%, #e11d48 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 59, 92, 0.4);
}

/* Search Bar in Collection */
.collection-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--prof-bg-input);
  border: 1px solid var(--prof-border);
  border-radius: 12px;
  padding: 7px 14px;
  gap: 8px;
  min-width: 240px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.collection-search-wrap:focus-within {
  border-color: var(--prof-accent-red);
  box-shadow: 0 0 14px rgba(255, 59, 92, 0.25);
}

.coll-search-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 0.84rem;
  color: var(--prof-text-primary);
  width: 100%;
}

.coll-search-input::placeholder {
  color: var(--prof-text-muted);
}

.btn-clear-coll-search {
  background: transparent;
  border: none;
  color: var(--prof-text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.btn-clear-coll-search:hover {
  color: var(--prof-text-primary);
}

/* Empty Filter State */
.collection-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--prof-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.collection-empty-state svg {
  opacity: 0.4;
}

/* =========================================================================
   5. LUXURY RESIDUUM / CHARACTER CARDS SHOWCASE GRID
   ========================================================================= */
.collection-characters-grid,
.profile-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  width: 100%;
}

@media (min-width: 1440px) {
  .collection-characters-grid,
  .profile-collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 16px;
  }
}

.collection-card {
  position: relative;
  aspect-ratio: 3 / 4.2;
  border-radius: 18px;
  background: rgba(13, 17, 26, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.collection-card:not(.owned) {
  opacity: 0.55;
  filter: grayscale(0.4) contrast(0.9);
}

.collection-card:not(.owned):hover {
  opacity: 0.88;
  filter: grayscale(0.1);
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
}

.collection-card.owned {
  opacity: 1;
  filter: none;
  transform: none;
}

.collection-card.owned:hover {
  transform: translateY(-5px) scale(1.03);
}

/* 5-Star Character */
.collection-card.rarity-5.owned {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.3), 0 0 0 1px rgba(245, 158, 11, 0.3) inset;
}

.collection-card.rarity-5.owned:hover {
  border-color: #fbbf24;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.45);
}

/* 4-Star Character */
.collection-card.rarity-4.owned {
  border-color: rgba(168, 85, 247, 0.75);
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.25), 0 0 0 1px rgba(168, 85, 247, 0.25) inset;
}

.collection-card.rarity-4.owned:hover {
  border-color: #c084fc;
  box-shadow: 0 14px 34px rgba(168, 85, 247, 0.4);
}

/* Card Artwork */
.collection-card-art,
.card-image-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #080c14;
}

.collection-card-art img,
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.collection-card:hover .collection-card-art img,
.collection-card:hover .card-image-wrap img {
  transform: scale(1.08);
}

/* Card Checkmark Badge (Right) */
.card-check-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(8, 11, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: all 0.22s ease;
  color: transparent;
  pointer-events: none;
}

.card-check-badge svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.collection-card.owned .card-check-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.45);
}

/* Card Favorite Star Button (Left) */
.card-favorite-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(8, 11, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  outline: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgba(255, 255, 255, 0.55);
  padding: 0;
}

body.theme-light .card-favorite-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.45);
}

.card-favorite-btn .star-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-favorite-btn:hover {
  border-color: rgba(245, 158, 11, 0.7);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  transform: scale(1.16);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.card-favorite-btn:hover .star-icon {
  transform: rotate(15deg) scale(1.1);
}

.card-favorite-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #fde047;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.6), 0 0 10px rgba(251, 191, 36, 0.45);
  animation: favStarPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-favorite-btn.active .star-icon {
  fill: #ffffff;
}

@keyframes favStarPop {
  0% { transform: scale(0.65); }
  60% { transform: scale(1.35) rotate(-12deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Gradient Overlay at Bottom */
.card-bottom-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 7, 12, 0.65) 70%, rgba(5, 7, 12, 0.96) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Card Info */
.card-info-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 10px 8px 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-char-name {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.card-rarity-stars {
  font-size: 0.66rem;
  letter-spacing: 1px;
}

.card-rarity-stars.star-gold {
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}

.card-rarity-stars.star-purple {
  color: #c084fc;
  text-shadow: 0 0 6px rgba(192, 132, 252, 0.6);
}

/* Floating Points Toast Animation */
.floating-pts-badge {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6);
  z-index: 10;
  pointer-events: none;
  animation: floatUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-pts-badge.sub {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.6);
}

.floating-pts-badge.fav-toast {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.6);
  font-size: 0.76rem;
  padding: 3px 10px;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.8);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -10px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -35px) scale(0.9);
  }
}

/* =========================================================================
   6. TAB 2: CONQUISTAS (ACHIEVEMENTS)
   ========================================================================= */
.achievements-header-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 20px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  box-shadow: var(--prof-shadow-main);
}

.achievements-summary h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0 0 4px 0;
}

.achievements-summary p {
  font-size: 0.78rem;
  color: var(--prof-text-muted);
  margin: 0;
}

.achievements-progress-pill {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--prof-accent-red);
  background: rgba(255, 59, 92, 0.1);
  border: 1px solid rgba(255, 59, 92, 0.3);
  padding: 6px 16px;
  border-radius: 9999px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.achievement-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--prof-shadow-main);
  position: relative;
  transition: all 0.25s ease;
  opacity: 0.65;
}

.achievement-card.unlocked {
  opacity: 1;
  border-color: var(--prof-border);
  box-shadow: var(--prof-shadow-main);
}

.achievement-card:hover {
  transform: translateY(-2px);
  border-color: var(--prof-border-hover);
}

.achievement-card.unlocked:hover {
  border-color: var(--prof-border-hover);
}

.achievement-icon-box {
  width: auto;
  height: auto;
  min-height: 56px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
  padding: 0;
}

.achievement-card.unlocked .achievement-icon-box {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.achievement-icon-box svg {
  width: 50px !important;
  height: 50px !important;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.achievement-icon-box img,
.achievement-icon-img {
  width: 52px !important;
  height: 52px !important;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.achievement-icon-emoji {
  font-size: 2.5rem !important;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.achievement-card:hover .achievement-icon-box svg,
.achievement-card:hover .achievement-icon-box img,
.achievement-card:hover .achievement-icon-img,
.achievement-card:hover .achievement-icon-emoji {
  transform: scale(1.12) rotate(4deg);
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.55));
}

.achievement-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.achievement-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.achievement-title {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0;
  line-height: 1.25;
}

.achievement-reward {
  font-size: 0.74rem;
  font-weight: 800;
  color: #ff3b5c;
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.achievement-desc {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--prof-text-muted);
  margin: 0;
  line-height: 1.35;
}

.achievement-progress-wrap {
  width: 100%;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.achievement-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.achievement-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff3b5c, #10b981);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.achievement-progress-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--prof-text-muted);
  align-self: flex-start;
  margin-top: 2px;
}

.achievement-rewards {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.reward-pts {
  color: var(--prof-accent-gold);
}

.reward-xp {
  color: var(--prof-accent-red);
}

/* =========================================================================
   7. TAB 3: ATIVIDADE (TIMELINE FEED)
   ========================================================================= */
.activity-feed-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--prof-shadow-main);
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--prof-border-subtle);
}

.activity-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0;
}

.btn-clear-activity {
  background: transparent;
  border: 1px solid var(--prof-border);
  color: var(--prof-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-activity:hover {
  color: var(--prof-accent-red);
  border-color: var(--prof-accent-red);
}

.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--prof-bg-subcard);
  border: 1px solid var(--prof-border-subtle);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  border-color: var(--prof-border-hover);
  transform: translateX(4px);
}

.activity-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--prof-bg-glass);
  border: 1px solid var(--prof-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-item-icon svg {
  display: block;
}

.activity-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--prof-text-primary);
  margin: 0;
}

.activity-time {
  font-size: 0.72rem;
  color: var(--prof-text-muted);
}

.activity-pts {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--prof-accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 10px;
  border-radius: 8px;
}

.activity-pts.sub {
  color: var(--prof-accent-red);
  background: rgba(255, 59, 92, 0.1);
}

/* =========================================================================
   7. TAB 3: INSÍGNIAS (BADGES)
   ========================================================================= */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.badge-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--prof-shadow-main);
  position: relative;
  transition: all 0.25s ease;
}

.badge-card.locked {
  opacity: 0.5;
  filter: grayscale(0.6);
}

.badge-card.unlocked {
  opacity: 1;
  border-color: var(--prof-border);
  box-shadow: var(--prof-shadow-main);
}

.badge-card:hover {
  transform: translateY(-2px);
  border-color: var(--prof-border-hover);
}

.badge-card.unlocked:hover {
  border-color: var(--prof-border-hover);
}

.badge-card-icon {
  width: auto;
  height: auto;
  min-height: 58px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
  padding: 0;
}

.badge-card.unlocked .badge-card-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.badge-card-icon svg {
  width: 52px !important;
  height: 52px !important;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.badge-card-icon img,
.badge-icon-img {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.badge-card-icon span,
.badge-icon-emoji {
  font-size: 2.6rem !important;
  line-height: 1;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.badge-card:hover .badge-card-icon svg,
.badge-card:hover .badge-card-icon img,
.badge-card:hover .badge-icon-img,
.badge-card:hover .badge-card-icon span,
.badge-card:hover .badge-icon-emoji {
  transform: scale(1.12) rotate(4deg);
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.55));
}

.badge-card-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.badge-card-title {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0;
  line-height: 1.25;
}

.badge-card-desc {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--prof-text-muted);
  margin: 0;
  line-height: 1.35;
}

.badge-status-pill {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  margin-top: 8px;
}

.badge-status-pill.status-unlocked {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status-pill.status-locked {
  background: rgba(255, 255, 255, 0.05);
  color: var(--prof-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* =========================================================================
   8. TAB 4: ESTATÍSTICAS (STATS OVERVIEW)
   ========================================================================= */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.stat-box-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--prof-shadow-main);
  position: relative;
  transition: all 0.25s ease;
}

.stat-box-card:hover {
  transform: translateY(-2px);
  border-color: var(--prof-border-hover);
}

.stat-box-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.stat-box-icon-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.stat-box-card:hover .stat-box-icon-img {
  transform: scale(1.1) rotate(4deg);
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.55));
}

.stat-box-value {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--prof-text-primary);
  line-height: 1.1;
}

.stat-box-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--prof-text-muted);
}

.stat-box-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 8px;
}

.stat-box-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff3b5c, #10b981);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* =========================================================================
   9. TAB 5: CONFIGURAÇÕES (PROFILE SETTINGS)
   ========================================================================= */
.profile-settings-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: var(--prof-shadow-main);
}

.settings-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0 0 16px 0;
}

.settings-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-settings-action {
  background: var(--prof-bg-subcard);
  border: 1px solid var(--prof-border);
  color: var(--prof-text-primary);
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.btn-settings-action:hover {
  background: rgba(255, 59, 92, 0.12);
  border-color: rgba(255, 59, 92, 0.4);
  color: #ff3b5c;
  transform: translateY(-1px);
}

.profile-settings-card {
  background: var(--prof-bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--prof-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--prof-shadow-main);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.config-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--prof-border-subtle);
  flex-wrap: wrap;
}

.config-header-titles h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0 0 4px 0;
  font-family: var(--font-display);
}

.config-sub {
  font-size: 0.82rem;
  color: var(--prof-text-muted);
  margin: 0;
}

.btn-save-config-header {
  background: linear-gradient(135deg, #ff3b5c 0%, #dc2626 100%);
  border: none;
  border-radius: 14px;
  padding: 10px 22px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(255, 59, 92, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-save-config-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.5);
}

.profile-config-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.config-block-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-block-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--prof-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
}

/* Visual Customization Cards (Avatar & Banner) */
.config-visual-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.config-visual-card {
  background: var(--prof-bg-subcard);
  border: 1px solid var(--prof-border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.25s ease;
}

.config-visual-card:hover {
  border-color: var(--prof-border-hover);
}

.visual-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.visual-card-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--prof-text-primary);
}

.visual-card-tag {
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: var(--prof-text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--prof-border-subtle);
}

body.theme-light .visual-card-tag {
  background: rgba(0, 0, 0, 0.05);
}

.visual-avatar-body,
.visual-banner-body {
  display: flex;
  align-items: center;
  gap: 18px;
}

.config-avatar-preview-box {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--prof-bg-card);
  border: 2px solid var(--prof-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.config-avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.config-avatar-preview-box span {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--prof-text-primary);
  font-family: var(--font-display);
}

.config-cover-preview-box {
  width: 120px;
  height: 72px;
  border-radius: 14px;
  background: var(--prof-cover-fallback);
  background-size: cover;
  background-position: center;
  border: 2px solid var(--prof-border);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cover-preview-overlay-text {
  width: 100%;
  font-size: 0.62rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: 3px 6px;
  text-align: center;
}

.visual-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.btn-config-btn {
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-config-btn.btn-primary {
  background: rgba(255, 59, 92, 0.12);
  border: 1px solid rgba(255, 59, 92, 0.35);
  color: var(--prof-accent-red);
}

.btn-config-btn.btn-primary:hover {
  background: var(--prof-accent-red);
  border-color: var(--prof-accent-red);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 59, 92, 0.35);
}

.btn-config-btn.btn-secondary {
  background: transparent;
  border: 1px solid var(--prof-border);
  color: var(--prof-text-secondary);
}

.btn-config-btn.btn-secondary:hover {
  border-color: var(--prof-border-hover);
  color: var(--prof-text-primary);
  background: var(--prof-bg-glass);
}

/* Public Identity Fields Grid */
.config-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .config-fields-grid {
    grid-template-columns: 1fr;
  }
}

.config-field-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-field-box label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--prof-text-secondary);
}

.config-input-wrap input,
.config-input-wrap textarea {
  width: 100%;
  background: var(--prof-bg-input);
  border: 1px solid var(--prof-border);
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  color: var(--prof-text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-input-wrap textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.4;
}

.config-input-wrap input:focus,
.config-input-wrap textarea:focus {
  border-color: var(--prof-accent-red);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.18);
}

/* Actions Bar at bottom */
.config-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
}

.btn-config-save-bottom {
  background: linear-gradient(135deg, #ff3b5c 0%, #dc2626 100%);
  border: none;
  border-radius: 14px;
  padding: 12px 26px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(255, 59, 92, 0.35);
  transition: all 0.22s ease;
}

.btn-config-save-bottom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.5);
}

.btn-config-export {
  background: var(--prof-bg-subcard);
  border: 1px solid var(--prof-border);
  border-radius: 14px;
  padding: 12px 20px;
  color: var(--prof-text-primary);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-config-export:hover {
  border-color: var(--prof-text-primary);
  transform: translateY(-1px);
}

.btn-config-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 14px;
  padding: 12px 20px;
  color: #ef4444;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  transition: all 0.2s ease;
}

.btn-config-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .btn-config-danger {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================================
   MODALS SYSTEM: PROFILE EDIT, AVATAR & COVER CUSTOMIZER
   High-tech Sci-Fi Glassmorphism Luxury UI
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.modal-backdrop.open,
.modal-backdrop[style*="display: flex"] {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  background: rgba(13, 15, 22, 0.95);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 59, 92, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
}

body.theme-light .modal-box {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-box-profile-edit {
  max-width: 620px;
}

.modal-box-avatar {
  max-width: 560px;
}

.modal-box-cover {
  max-width: 680px;
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.theme-light .modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.modal-header-branding {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-badge-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ff3b5c;
  text-transform: uppercase;
}

.modal-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
  color: inherit;
}

.btn-close-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: rgba(255, 59, 92, 0.2);
  border-color: #ff3b5c;
  color: #ffffff;
  transform: rotate(90deg);
}

body.theme-light .btn-close-modal {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #334155;
}

/* Modal Profile Live Header Preview (Inside Quick Edit) */
.modal-profile-header-preview {
  position: relative;
  padding: 0 24px;
  margin-top: 16px;
}

.modal-profile-cover-preview {
  height: 120px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-color: #12141a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.btn-modal-change-media {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 9999px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-change-media:hover {
  background: #ff3b5c;
  border-color: #ff3b5c;
  transform: translateY(-1px);
}

.modal-profile-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -36px;
  padding: 0 10px;
  position: relative;
  z-index: 3;
}

.modal-profile-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #181c2b;
  border: 3px solid #0d0f17;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

body.theme-light .modal-profile-avatar-preview {
  border-color: #ffffff;
}

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

.modal-avatar-letter {
  font-family: var(--font-display, sans-serif);
  font-size: 1.8rem;
  font-weight: 900;
  color: #ff3b5c;
}

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

.modal-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-profile-avatar-preview:hover .modal-avatar-overlay {
  opacity: 1;
}

.modal-profile-actions-inline {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.btn-subaction-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-subaction-pill:hover {
  background: rgba(255, 59, 92, 0.15);
  border-color: #ff3b5c;
  color: #ff8597;
}

body.theme-light .btn-subaction-pill {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

/* Modal Form Body */
.modal-form-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}

body.theme-light .form-group label {
  color: #64748b;
}

.form-input,
.form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

body.theme-light .form-input,
body.theme-light .form-textarea {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #ff3b5c;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(255, 59, 92, 0.25);
}

/* Modal Actions */
.modal-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

body.theme-light .modal-form-actions {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.btn-modal-primary {
  background: linear-gradient(135deg, #ff3b5c 0%, #d90429 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.35);
  transition: all 0.2s ease;
}

.btn-modal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 59, 92, 0.5);
}

.btn-modal-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

body.theme-light .btn-modal-secondary {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.btn-modal-danger-soft {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ff6b84;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-danger-soft:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Avatar Center Circle in Dedicated Modal */
.avatar-center-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 16px 20px;
  text-align: center;
  gap: 12px;
}

.avatar-center-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #141722;
  border: 3px solid #ff3b5c;
  box-shadow: 0 0 30px rgba(255, 59, 92, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-center-circle .avatar-center-letter {
  font-family: var(--font-display, sans-serif);
  font-size: 2.5rem;
  font-weight: 900;
  color: #ff3b5c;
}

.avatar-center-circle .avatar-center-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-center-info h4 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 2px 0;
}

.avatar-center-sub {
  font-size: 0.75rem;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
}

/* Cover Live Banner in Dedicated Modal */
.cover-live-banner-preview {
  height: 140px;
  margin: 16px 24px 0 24px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-color: #12141a;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cover-live-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  align-items: flex-end;
  padding: 12px 16px;
}

.cover-live-banner-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}

/* Modal Sub Tabs */
.modal-sub-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

body.theme-light .modal-sub-tabs {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.modal-sub-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.modal-sub-tab:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.modal-sub-tab.active {
  background: #ff3b5c;
  border-color: #ff3b5c;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 59, 92, 0.35);
}

body.theme-light .modal-sub-tab {
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

body.theme-light .modal-sub-tab.active {
  color: #ffffff;
}

.modal-sub-content {
  padding: 20px 24px;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
}

.modal-pane-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 12px;
}

body.theme-light .modal-pane-hint {
  color: #64748b;
}

/* Dropzone Box */
.dropzone-box {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 32px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropzone-box:hover {
  border-color: #ff3b5c;
  background: rgba(255, 59, 92, 0.05);
}

.dropzone-icon {
  color: #ff3b5c;
}

.dropzone-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

body.theme-light .dropzone-text {
  color: #0f172a;
}

.dropzone-hint {
  font-size: 0.74rem;
  color: #94a3b8;
}

.btn-browse-file {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-browse-file:hover {
  background: #ff3b5c;
  border-color: #ff3b5c;
}

body.theme-light .btn-browse-file {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* URL Input with Inline Action */
.input-with-action-row {
  display: flex;
  gap: 8px;
}

.btn-modal-inline {
  background: rgba(255, 59, 92, 0.18);
  border: 1px solid #ff3b5c;
  color: #ff8597;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-modal-inline:hover {
  background: #ff3b5c;
  color: #ffffff;
}

/* Preset Cards Grid (Avatars & Covers) */
.preset-avatars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
}

.preset-avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-avatar-card:hover {
  transform: translateY(-2px);
  border-color: #ff3b5c;
  background: rgba(255, 59, 92, 0.1);
}

.preset-avatar-card.active {
  border-color: #ff3b5c;
  background: rgba(255, 59, 92, 0.2);
  box-shadow: 0 0 14px rgba(255, 59, 92, 0.35);
}

.preset-avatar-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #181c2b;
}

.preset-avatar-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

body.theme-light .preset-avatar-label {
  color: #334155;
}

.preset-covers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.preset-cover-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-cover-card:hover {
  transform: translateY(-2px);
  border-color: #ff3b5c;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.preset-cover-card.active {
  border-color: #ff3b5c;
  box-shadow: 0 0 16px rgba(255, 59, 92, 0.4);
}

.preset-cover-thumb {
  height: 64px;
  background-size: cover;
  background-position: center;
  background-color: #161822;
}

.preset-cover-label {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-light .preset-cover-label {
  color: #0f172a;
  background: #f1f5f9;
}

/* =========================================================================
   MOBILE RESPONSIVENESS (PERFECTION FOR PHONES & TABLETS)
   ========================================================================= */
@media (max-width: 992px) {
  .profile-layout-container {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .profile-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 640px) {
  .profile-view-wrapper {
    padding: 85px 12px 60px 12px !important;
  }

  .profile-cover-wrap {
    height: 160px !important;
  }

  .profile-identity-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-top: -36px !important;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .profile-nav-tabs {
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding-bottom: 6px !important;
    gap: 6px !important;
  }

  .profile-collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
    gap: 10px !important;
  }

  .modal-grid-2 {
    grid-template-columns: 1fr !important;
  }

  .modal-box {
    max-height: 94vh !important;
    border-radius: 18px !important;
    margin: 8px !important;
  }

  .modal-header {
    padding: 16px 18px !important;
  }

  .modal-form-body {
    padding: 16px 18px !important;
  }

  .modal-form-actions {
    padding: 14px 18px 18px 18px !important;
    flex-wrap: wrap !important;
  }

  .preset-covers-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .preset-avatars-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

