/* ═══════════════════════════════════════════════════════════════════════
   Nacita Donate — Profile Management Stylesheet (profile.css)
   Features: Glassmorphism, Luxury Dark/Light Theme, Responsive Mobile/Tablet,
             Smooth Micro-interactions, Live Preview Card & Game Chips
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. PROFILE CSS VARIABLES & THEME TOKENS ──────────────────────── */
:root {
  --pf-bg-card: rgba(18, 20, 32, 0.85);
  --pf-bg-card-hover: rgba(24, 27, 42, 0.92);
  --pf-bg-input: rgba(10, 12, 20, 0.75);
  --pf-bg-input-focus: rgba(14, 16, 26, 0.95);
  --pf-bg-pill: rgba(255, 255, 255, 0.05);
  --pf-bg-pill-hover: rgba(255, 255, 255, 0.10);
  
  --pf-border: rgba(255, 255, 255, 0.08);
  --pf-border-hover: rgba(255, 255, 255, 0.16);
  --pf-border-glow: rgba(255, 140, 0, 0.35);

  --pf-accent: #ff8c00;
  --pf-accent-hover: #ff9f1c;
  --pf-accent-dark: #e67e00;
  --pf-accent-glow: rgba(255, 140, 0, 0.28);
  --pf-accent-glow-subtle: rgba(255, 140, 0, 0.12);
  --pf-accent-grad: linear-gradient(135deg, #ff9500 0%, #ff5500 100%);
  --pf-accent-grad-subtle: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 85, 0, 0.05) 100%);

  --pf-text-main: #f8fafc;
  --pf-text-sub: #cbd5e1;
  --pf-text-muted: #94a3b8;
  --pf-text-faint: #64748b;

  --pf-radius-sm: 8px;
  --pf-radius-md: 12px;
  --pf-radius-lg: 16px;
  --pf-radius-xl: 20px;
  --pf-radius-full: 9999px;

  --pf-shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.45), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --pf-shadow-glow: 0 0 20px rgba(255, 140, 0, 0.25);
  --pf-shadow-floating: 0 16px 40px -8px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 140, 0, 0.35);

  --pf-transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --pf-transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
  --pf-bg-card: rgba(255, 255, 255, 0.94);
  --pf-bg-card-hover: #ffffff;
  --pf-bg-input: #f8fafc;
  --pf-bg-input-focus: #ffffff;
  --pf-bg-pill: rgba(0, 0, 0, 0.04);
  --pf-bg-pill-hover: rgba(0, 0, 0, 0.08);

  --pf-border: rgba(0, 0, 0, 0.08);
  --pf-border-hover: rgba(0, 0, 0, 0.16);
  --pf-border-glow: rgba(255, 140, 0, 0.35);

  --pf-text-main: #0f172a;
  --pf-text-sub: #334155;
  --pf-text-muted: #64748b;
  --pf-text-faint: #94a3b8;

  --pf-shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  --pf-shadow-floating: 0 16px 40px -8px rgba(15, 23, 42, 0.15), 0 0 1px 1px rgba(255, 140, 0, 0.4);
}

/* ── 2. PAGE CONTAINER & BASE LAYOUT ──────────────────────────────── */
.pf-page-container {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: 1.5rem 1.25rem 7.5rem 1.25rem;
  box-sizing: border-box;
  position: relative;
}

/* ── 3. PAGE HEADER ───────────────────────────────────────────────── */
.pf-header {
  background: var(--pf-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-xl);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--pf-shadow-card);
  position: relative;
  overflow: hidden;
  transition: border-color var(--pf-transition);
}

.pf-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--pf-accent-grad);
}

.pf-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.pf-header-titles {
  flex: 1;
  min-width: 260px;
}

.pf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--pf-text-muted);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.pf-breadcrumb span {
  opacity: 0.5;
}

.pf-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--pf-text-main);
  margin: 0 0 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.pf-title i {
  color: var(--pf-accent);
  filter: drop-shadow(0 2px 8px var(--pf-accent-glow));
}

.pf-subtitle {
  font-size: 0.88rem;
  color: var(--pf-text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 720px;
}

.pf-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Live Status Badge */
.pf-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--pf-radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid var(--pf-border);
  transition: all var(--pf-transition);
  user-select: none;
}

.pf-live-badge.online {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.pf-live-badge.offline {
  background: var(--pf-bg-pill);
  color: var(--pf-text-muted);
  border-color: var(--pf-border);
}

.pf-beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pf-live-badge.online .pf-beacon-dot {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.pf-live-badge.online .pf-beacon-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: pfBeaconPulse 1.8s infinite ease-out;
}

.pf-live-badge.offline .pf-beacon-dot {
  background: var(--pf-text-faint);
}

@keyframes pfBeaconPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ── 4. BUTTON COMPONENTS ─────────────────────────────────────────── */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--pf-radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--pf-transition);
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.4;
  outline: none;
  min-height: 40px;
  box-sizing: border-box;
}

.pf-btn:focus-visible {
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
}

.pf-btn:active {
  transform: scale(0.97);
}

/* Primary Button (Accent Orange Gradient) */
.pf-btn-primary {
  background: var(--pf-accent-grad);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px var(--pf-accent-glow);
}

.pf-btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(255, 140, 0, 0.45);
  transform: translateY(-1px);
}

.pf-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* Secondary Button (Dark Glass / Light Neutral) */
.pf-btn-secondary {
  background: var(--pf-bg-pill);
  color: var(--pf-text-main);
  border-color: var(--pf-border);
}

.pf-btn-secondary:hover {
  background: var(--pf-bg-pill-hover);
  border-color: var(--pf-border-hover);
  color: var(--pf-text-main);
  transform: translateY(-1px);
}

/* Outline Button */
.pf-btn-outline {
  background: transparent;
  color: var(--pf-text-sub);
  border-color: var(--pf-border);
}

.pf-btn-outline:hover {
  border-color: var(--pf-accent);
  color: var(--pf-accent);
  background: var(--pf-accent-glow-subtle);
  transform: translateY(-1px);
}

/* Upgrade VIP Pill Button */
.pf-btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--pf-radius-full);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: all var(--pf-transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.pf-btn-upgrade:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

/* ── 5. MAIN 2-COLUMN GRID LAYOUT ─────────────────────────────────── */
.pf-layout-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.pf-preview-column {
  position: sticky;
  top: calc(var(--db-topbar-h, 68px) + 1.25rem);
  z-index: 10;
}

.pf-form-column {
  min-width: 0;
  width: 100%;
}

/* ── 6. LIVE PREVIEW CARD (MOCKUP) ────────────────────────────────── */
.pf-preview-card {
  background: var(--pf-bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-xl);
  box-shadow: var(--pf-shadow-card);
  overflow: hidden;
  transition: all var(--pf-transition);
  position: relative;
}

.pf-preview-card:hover {
  border-color: var(--pf-border-hover);
}

.pf-preview-header-bar {
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--pf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--pf-text-muted);
}

.pf-preview-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--pf-accent);
  font-weight: 700;
  font-size: 0.75rem;
}

/* Cover Banner Preview */
.pf-preview-banner {
  height: 125px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a1d2e;
  position: relative;
  transition: background-image 0.3s ease;
}

.pf-preview-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.65) 100%);
}

/* Preview Body */
.pf-preview-body {
  padding: 0 1.25rem 1.25rem 1.25rem;
  position: relative;
}

/* Avatar Row */
.pf-preview-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -38px;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 2;
}

.pf-preview-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--pf-bg-card);
  padding: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border: 2px solid var(--pf-accent);
  flex-shrink: 0;
}

.pf-preview-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--pf-bg-input);
}

.pf-preview-verified {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  border: 2px solid var(--pf-bg-card);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Identity */
.pf-preview-identity {
  margin-bottom: 0.85rem;
}

.pf-preview-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pf-preview-name {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--pf-text-main);
  margin: 0;
  line-height: 1.25;
  word-break: break-word;
}

.pf-preview-handle {
  font-size: 0.82rem;
  color: var(--pf-accent);
  font-weight: 600;
  margin-top: 0.15rem;
}

.pf-preview-tabtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding: 0.25rem 0.65rem;
  background: var(--pf-bg-pill);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-sm);
  font-size: 0.75rem;
  color: var(--pf-text-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bio */
.pf-preview-bio {
  font-size: 0.82rem;
  color: var(--pf-text-sub);
  line-height: 1.55;
  background: var(--pf-bg-pill);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.85rem;
  word-break: break-word;
  max-height: 110px;
  overflow-y: auto;
}

.pf-preview-bio.empty {
  color: var(--pf-text-faint);
  font-style: italic;
}

/* Games Preview */
.pf-preview-games {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.pf-preview-game-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  background: var(--pf-accent-glow-subtle);
  border: 1px solid rgba(255, 140, 0, 0.25);
  border-radius: var(--pf-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pf-text-main);
  transition: all var(--pf-transition);
}

.pf-game-logo-mini {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Social Buttons Preview */
.pf-preview-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.pf-preview-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--pf-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff !important;
  background: var(--brand-bg, #333);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform var(--pf-transition), filter var(--pf-transition);
}

.pf-preview-social-btn:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.15);
}

/* Mock Donate Button */
.pf-preview-donate-mock {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--pf-radius-md);
  background: var(--pf-accent-grad);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 16px var(--pf-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  user-select: none;
  cursor: default;
}

.pf-preview-donate-mock i {
  animation: pfHeartBeat 1.6s infinite ease-in-out;
}

@keyframes pfHeartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* ── 7. FORM CARDS & INPUT STYLING ────────────────────────────────── */
.pf-card {
  background: var(--pf-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-xl);
  padding: 1.65rem 1.75rem;
  box-shadow: var(--pf-shadow-card);
  transition: border-color var(--pf-transition), box-shadow var(--pf-transition);
  position: relative;
}

.pf-card:hover {
  border-color: var(--pf-border-hover);
}

.pf-card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--pf-border);
}

.pf-card-title-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.pf-card-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--pf-radius-md);
  background: var(--pf-accent-glow-subtle);
  color: var(--pf-accent);
  border: 1px solid rgba(255, 140, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--pf-accent-glow-subtle);
}

.pf-card-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--pf-text-main);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.pf-card-desc {
  font-size: 0.84rem;
  color: var(--pf-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Form Groups */
.pf-form-group {
  margin-bottom: 1.45rem;
}

.pf-form-group:last-child {
  margin-bottom: 0;
}

.pf-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pf-text-main);
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pf-label-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--pf-text-muted);
}

/* Handle Input Bar */
.pf-handle-bar {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pf-handle-input-box {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 240px;
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  overflow: hidden;
  transition: all var(--pf-transition);
}

.pf-handle-input-box:focus-within {
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
  background: var(--pf-bg-input-focus);
}

.pf-handle-prefix {
  padding: 0 0.85rem;
  background: var(--pf-bg-pill);
  border-right: 1px solid var(--pf-border);
  font-size: 0.86rem;
  color: var(--pf-text-muted);
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  display: flex;
  align-items: center;
  height: 100%;
}

.pf-handle-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pf-text-main);
  font-family: inherit;
}

.pf-handle-input::placeholder {
  color: var(--pf-text-faint);
  font-weight: 400;
}

.pf-handle-actions {
  display: flex;
  gap: 0.4rem;
}

/* Standard Input Wrap */
.pf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.pf-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--pf-text-faint);
  font-size: 0.92rem;
  pointer-events: none;
  transition: color var(--pf-transition);
}

.pf-input-wrap:focus-within .pf-input-icon {
  color: var(--pf-accent);
}

.pf-input {
  width: 100%;
  padding: 0.68rem 1rem 0.68rem 2.65rem;
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.9rem;
  color: var(--pf-text-main);
  font-family: inherit;
  outline: none;
  transition: all var(--pf-transition);
  box-sizing: border-box;
}

.pf-input:focus {
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
  background: var(--pf-bg-input-focus);
}

.pf-input::placeholder {
  color: var(--pf-text-faint);
}

.pf-input[data-locked="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.15);
}

/* Textarea */
.pf-textarea {
  width: 100%;
  min-height: 105px;
  padding: 0.75rem 1rem;
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.9rem;
  color: var(--pf-text-main);
  font-family: inherit;
  outline: none;
  resize: vertical;
  line-height: 1.55;
  transition: all var(--pf-transition);
  box-sizing: border-box;
}

.pf-textarea:focus {
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
  background: var(--pf-bg-input-focus);
}

.pf-textarea::placeholder {
  color: var(--pf-text-faint);
}

/* Info Note Callout */
.pf-info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: var(--pf-bg-pill);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.78rem;
  color: var(--pf-text-muted);
  line-height: 1.45;
  margin-top: 0.55rem;
}

.pf-info-note i {
  color: var(--pf-accent);
  font-size: 0.88rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Upgrade Notice Box */
.pf-upgrade-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--pf-radius-md);
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.pf-upgrade-text {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--pf-text-sub);
}

.pf-upgrade-text i {
  color: #f59e0b;
  font-size: 1.05rem;
  flex-shrink: 0;
}

/* ── 8. AVATAR & COVER UPLOAD COMPONENT ───────────────────────────── */
.pf-avatar-grid {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 1.35rem;
  align-items: center;
}

.pf-avatar-preview-box {
  width: 104px;
  cursor: pointer;
  text-align: center;
  position: relative;
  user-select: none;
}

.pf-avatar-img-container {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--pf-accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  background: var(--pf-bg-input);
  margin-bottom: 0.35rem;
  transition: transform var(--pf-transition);
}

.pf-avatar-preview-box:hover .pf-avatar-img-container {
  transform: scale(1.04);
}

.pf-avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pf-avatar-hover-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity var(--pf-transition);
}

.pf-avatar-preview-box:hover .pf-avatar-hover-badge {
  opacity: 1;
}

.pf-avatar-preview-box.uploading .pf-avatar-hover-badge {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
}

.pf-avatar-click-text {
  font-size: 0.75rem;
  color: var(--pf-accent);
  font-weight: 600;
  display: block;
}

.pf-avatar-controls {
  flex: 1;
  min-width: 0;
}

.pf-upload-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.pf-upload-tip-text {
  font-size: 0.78rem;
  color: var(--pf-text-muted);
}

/* Preset Pills (Avatar Presets) */
.pf-preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.pf-preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  background: var(--pf-bg-pill);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--pf-text-sub);
  cursor: pointer;
  transition: all var(--pf-transition);
}

.pf-preset-pill:hover {
  background: var(--pf-bg-pill-hover);
  border-color: var(--pf-accent);
  color: var(--pf-accent);
  transform: translateY(-1px);
}

/* Preset Cover Banners */
.pf-cover-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.pf-cover-item {
  height: 64px;
  border-radius: var(--pf-radius-md);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--pf-transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pf-cover-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.75) 100%);
  transition: background var(--pf-transition);
}

.pf-cover-item:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--pf-accent);
  box-shadow: 0 6px 16px var(--pf-accent-glow);
}

.pf-cover-item-label {
  position: absolute;
  bottom: 0.35rem;
  left: 0.5rem;
  right: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.pf-cover-item.locked {
  opacity: 0.5;
  filter: grayscale(0.5);
  cursor: pointer;
}

.pf-cover-item.locked::after {
  content: '\f023';
  font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fbbf24;
  font-size: 1.1rem;
  z-index: 3;
}

/* Counter Badge */
.pf-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--pf-radius-full);
  background: var(--pf-bg-pill);
  border: 1px solid var(--pf-border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pf-text-sub);
}

.pf-counter-badge.full {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

/* ── 9. SOCIAL MEDIA GRID ─────────────────────────────────────────── */
.pf-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.pf-social-card {
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  padding: 1rem 1.15rem;
  transition: all var(--pf-transition);
  position: relative;
}

.pf-social-card:hover,
.pf-social-card:focus-within {
  border-color: var(--social-color, var(--pf-accent));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  background: var(--pf-bg-input-focus);
}

.pf-social-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  gap: 0.5rem;
}

.pf-social-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pf-text-main);
}

.pf-social-brand i {
  color: var(--social-color, var(--pf-accent));
  font-size: 1.05rem;
}

.pf-social-subtext {
  font-size: 0.74rem;
  color: var(--pf-text-muted);
}

.pf-social-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: var(--pf-bg-card);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.86rem;
  color: var(--pf-text-main);
  font-family: inherit;
  outline: none;
  transition: all var(--pf-transition);
  box-sizing: border-box;
}

.pf-social-input:focus {
  border-color: var(--social-color, var(--pf-accent));
  box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2);
}

.pf-social-input::placeholder {
  color: var(--pf-text-faint);
  font-size: 0.82rem;
}

/* ── 10. GAMES & ACTIVITIES SECTION ───────────────────────────────── */
.pf-plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--pf-radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.pf-plan-free {
  background: rgba(100, 116, 139, 0.15);
  color: var(--pf-text-sub);
  border-color: var(--pf-border);
}

.pf-plan-basic {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.pf-plan-pro {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.pf-games-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

/* Selected Games Showcase */
.pf-selected-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1rem;
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  margin-bottom: 1.25rem;
  align-items: center;
}

.pf-selected-empty {
  font-size: 0.82rem;
  color: var(--pf-text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.pf-chip-selected {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem 0.35rem 0.55rem;
  background: var(--pf-accent-glow-subtle);
  border: 1px solid rgba(255, 140, 0, 0.4);
  border-radius: var(--pf-radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pf-text-main);
  animation: pfChipPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px var(--pf-accent-glow-subtle);
}

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

.pf-chip-remove {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all var(--pf-transition);
  margin-left: 0.15rem;
  padding: 0;
}

.pf-chip-remove:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.15);
}

/* Games Search & Controls */
.pf-games-controls {
  margin-bottom: 1.15rem;
}

.pf-games-search-box {
  position: relative;
  width: 100%;
  margin-bottom: 0.85rem;
}

.pf-games-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pf-text-faint);
  font-size: 0.92rem;
}

.pf-games-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.65rem;
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.88rem;
  color: var(--pf-text-main);
  font-family: inherit;
  outline: none;
  transition: all var(--pf-transition);
  box-sizing: border-box;
}

.pf-games-search-input:focus {
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
  background: var(--pf-bg-input-focus);
}

/* Category Filter Tabs */
.pf-games-cat-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pf-games-cat-tabs::-webkit-scrollbar {
  display: none;
}

.pf-cat-tab {
  padding: 0.4rem 0.9rem;
  border-radius: var(--pf-radius-full);
  background: var(--pf-bg-pill);
  border: 1px solid var(--pf-border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pf-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--pf-transition);
  flex-shrink: 0;
}

.pf-cat-tab:hover {
  background: var(--pf-bg-pill-hover);
  color: var(--pf-text-main);
}

.pf-cat-tab.active {
  background: var(--pf-accent);
  border-color: var(--pf-accent);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--pf-accent-glow);
}

/* Games Grid */
.pf-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.35rem;
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-lg);
  margin-bottom: 1.15rem;
}

.pf-game-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  background: var(--pf-bg-card);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pf-text-sub);
  cursor: pointer;
  transition: all var(--pf-transition);
  text-align: left;
  user-select: none;
  outline: none;
  min-height: 44px;
  box-sizing: border-box;
}

.pf-game-chip:hover {
  background: var(--pf-bg-card-hover);
  border-color: var(--pf-border-hover);
  color: var(--pf-text-main);
  transform: translateY(-1px);
}

.pf-game-chip.selected {
  background: var(--pf-accent-glow-subtle);
  border-color: var(--pf-accent);
  color: var(--pf-accent);
  box-shadow: 0 0 12px var(--pf-accent-glow-subtle);
}

.pf-game-chip-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-game-logo-img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}

/* Custom Game Row */
.pf-custom-game-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pf-custom-game-input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: var(--pf-bg-input);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.88rem;
  color: var(--pf-text-main);
  font-family: inherit;
  outline: none;
  transition: all var(--pf-transition);
}

.pf-custom-game-input:focus {
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px var(--pf-accent-glow);
  background: var(--pf-bg-input-focus);
}

/* ── 11. FLOATING BOTTOM SAVE BAR ─────────────────────────────────── */
.pf-save-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 960px;
  z-index: 990;
  background: var(--pf-bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 140, 0, 0.4);
  border-radius: var(--pf-radius-xl);
  padding: 0.85rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: var(--pf-shadow-floating);
  animation: pfSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pfSlideUp {
  0% { transform: translate(-50%, 40px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

.pf-save-bar-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.pf-save-bar-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--pf-radius-md);
  background: var(--pf-accent-grad);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px var(--pf-accent-glow);
}

.pf-save-bar-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pf-text-main);
  line-height: 1.25;
}

.pf-save-bar-desc {
  font-size: 0.78rem;
  color: var(--pf-text-muted);
  line-height: 1.35;
}

.pf-save-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* ── 12. QR CODE MODAL ────────────────────────────────────────────── */
.pf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: pfFadeIn 0.2s ease-out;
}

@keyframes pfFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.pf-modal-box {
  background: var(--pf-bg-card);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-xl);
  padding: 2rem 1.75rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  position: relative;
  animation: pfModalZoom 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pfModalZoom {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.pf-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pf-bg-pill);
  color: var(--pf-text-muted);
  border: 1px solid var(--pf-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--pf-transition);
}

.pf-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.pf-qr-container {
  padding: 1.25rem;
  background: #ffffff;
  border-radius: var(--pf-radius-lg);
  display: inline-block;
  margin: 1.25rem auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.pf-qr-img {
  width: 200px;
  height: 200px;
  display: block;
}

.pf-qr-url-pill {
  padding: 0.5rem 0.85rem;
  background: var(--pf-bg-pill);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius-md);
  font-size: 0.82rem;
  color: var(--pf-text-sub);
  word-break: break-all;
  margin-bottom: 1.25rem;
  font-family: monospace;
}

@media (max-width: 1024px) {
  .pf-page-container {
    padding: 1.25rem 1rem 8rem 1rem;
  }

  .pf-layout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pf-preview-column {
    position: static;
    top: auto;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  .pf-header {
    padding: 1.25rem 1.4rem;
  }

  .pf-title {
    font-size: 1.45rem;
  }

  .pf-save-bar {
    width: calc(100% - 2rem);
    bottom: 1.25rem;
  }
}

/* ── MOBILE LARGE (max-width: 768px) ── */
@media (max-width: 768px) {
  .pf-page-container {
    padding: 1rem 0.75rem 8rem 0.75rem;
  }

  .pf-header {
    padding: 1.15rem 1rem;
    border-radius: var(--pf-radius-lg);
    margin-bottom: 1.25rem;
  }

  .pf-header-top {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .pf-header-titles {
    min-width: 0;
  }

  .pf-title {
    font-size: 1.3rem;
  }

  .pf-subtitle {
    font-size: 0.82rem;
  }

  .pf-header-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
  }

  .pf-header-actions .pf-live-badge {
    grid-column: span 2;
    justify-content: center;
    padding: 0.45rem 0.8rem;
  }

  .pf-header-actions .pf-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    justify-content: center;
  }

  .pf-preview-column {
    max-width: 100%;
  }

  .pf-preview-card {
    border-radius: var(--pf-radius-lg);
  }

  .pf-preview-banner {
    height: 110px;
  }

  .pf-preview-avatar-wrap {
    width: 68px;
    height: 68px;
    margin-top: -34px;
  }

  .pf-preview-name {
    font-size: 1.15rem;
  }

  .pf-card {
    padding: 1.25rem 1rem;
    border-radius: var(--pf-radius-lg);
    margin-bottom: 1.25rem !important;
  }

  .pf-card-title {
    font-size: 1.08rem;
  }

  .pf-card-desc {
    font-size: 0.8rem;
  }

  .pf-card-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.1rem;
  }

  .pf-avatar-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
    justify-items: center;
  }

  .pf-avatar-controls {
    width: 100%;
  }

  .pf-upload-actions-bar {
    justify-content: center;
  }

  .pf-preset-pills {
    justify-content: center;
  }

  .pf-social-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .pf-games-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 320px;
  }

  .pf-cover-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Floating Save Bar on Mobile */
  .pf-save-bar {
    width: calc(100% - 1.25rem);
    bottom: 0.85rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--pf-radius-lg);
    gap: 0.65rem;
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  }

  .pf-save-bar-icon {
    display: none;
  }

  .pf-save-bar-desc {
    display: none;
  }

  .pf-save-bar-title {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pf-save-bar-actions .pf-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }
}

/* ── MOBILE SMALL (max-width: 480px) ── */
@media (max-width: 480px) {
  .pf-header-actions {
    grid-template-columns: 1fr;
  }

  .pf-header-actions .pf-live-badge {
    grid-column: span 1;
  }

  .pf-handle-bar {
    flex-direction: column;
  }

  .pf-handle-input-box {
    width: 100%;
    min-width: 0;
  }

  .pf-handle-prefix {
    padding: 0 0.6rem;
    font-size: 0.8rem;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pf-handle-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .pf-handle-actions .pf-btn {
    justify-content: center;
  }

  .pf-games-grid {
    grid-template-columns: 1fr;
  }

  .pf-game-chip {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
  }

  .pf-custom-game-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pf-custom-game-row .pf-btn {
    width: 100%;
  }

  .pf-cover-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .pf-cover-item {
    height: 56px;
  }

  .pf-save-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    text-align: center;
  }

  .pf-save-bar-info {
    justify-content: center;
  }

  .pf-save-bar-actions {
    width: 100%;
  }

  .pf-save-bar-actions .pf-btn-primary {
    width: 100%;
    justify-content: center;
  }

  .pf-modal-box {
    padding: 1.5rem 1.15rem;
  }

  .pf-qr-container {
    padding: 0.75rem;
  }

  .pf-qr-img {
    width: 170px;
    height: 170px;
  }
}
