/* ==========================================================================
   ELITE PUBLIC PROFILE CSS
   Glassmorphism, Ken-Burns Banners, SVG Generation
   ========================================================================== */

/* Layout & Globals */
.pfp-container { padding: 0; min-height: 100vh; color: #ffffff; font-family: 'Inter', sans-serif; position: relative; overflow-x: hidden; }
/* Note: Container padding removed to let banner go edge-to-edge. Inner content has padding */
.pfp-layout { display: flex; gap: 32px; align-items: flex-start; padding: 0 40px 40px 40px; margin-left: 20px; /* offset sidebar */ }
.pfp-sidebar { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 32px; z-index: 10; }
.pfp-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }

/* Utilities */
.hidden { display: none !important; opacity: 0; pointer-events: none; }
.m-0 { margin: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.p-0 { padding: 0 !important; } .p-16 { padding: 16px; } .pt-16 { padding-top: 16px; } .pt-24 { padding-top: 24px; } .pb-16 { padding-bottom: 16px; } .border-top { border-top: 1px solid rgba(255,255,255,0.1); } .border-bottom { border-bottom: 1px solid rgba(255,255,255,0.1); }
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.85rem; } .text-muted { color: rgba(255,255,255,0.6); } .w-full { width: 100%; } .text-center { text-align: center; } .text-right { text-align: right; } .italic { font-style: italic; } .cursor-pointer { cursor: pointer; }
.uppercase { text-transform: uppercase; } .letter-spacing { letter-spacing: 1px; } .font-bold { font-weight: 700; } .tabular-nums { font-variant-numeric: tabular-nums; }
.flex-between { display: flex; justify-content: space-between; align-items: center; } .flex-align-center { display: flex; align-items: center; } .justify-center { justify-content: center; } .gap-8 { gap: 8px; } .gap-16 { gap: 16px; }

/* Palette */
.text-purple { color: #c084fc; } .text-cyan { color: #06b6d4; } .text-gold { color: #fbbf24; } .text-red { color: #ef5350; } .text-green { color: #22c55e; } .text-white { color: #ffffff; }
.bg-gold { background: #fbbf24; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes kenBurns { 0% { transform: scale(1); } 100% { transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.fade-in { animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.pulse-btn { animation: pulseGlow 2s infinite; border-radius: 12px; }
.pulse-dot { animation: pulseDot 2s infinite; }
.shimmer-effect { position: relative; overflow: hidden; }
.shimmer-effect::after { content:''; position:absolute; top:0; left:0; width:200%; height:100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); animation: shimmer 2.5s infinite; }
.shimmer-bg { background-image: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3), rgba(255,255,255,0.1)); background-size: 200% 100%; animation: shimmer 2s infinite; }

/* Cards & Buttons */
.pfp-card { background: rgba(255,255,255,0.03); backdrop-filter: blur(24px) saturate(180%); border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05); transition: all 0.4s; }

.pfp-btn { padding: 10px 20px; border-radius: 12px; font-weight: 700; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s; border: none; text-transform: uppercase; font-family: inherit; }
.pfp-btn--primary { background: linear-gradient(135deg, #a855f7, #7e22ce); color: white; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); }
.pfp-btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5); }
.pfp-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.pfp-btn--secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.pfp-btn--secondary:hover:not(:disabled) { background: rgba(255,255,255,0.1); border-color: #c084fc; color: #c084fc; }
.pfp-btn-icon-small { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.pfp-btn-icon-small:hover { background: rgba(192,132,252,0.4); color: #fff; border-color: #c084fc; }

.pfp-input, .pfp-select { width: 100%; padding: 10px 14px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; transition: 0.3s; font-family: inherit; font-size: 0.85rem; outline: none; }
.pfp-input:focus, .pfp-select:focus { border-color: #c084fc; box-shadow: 0 0 0 2px rgba(192,132,252,0.2); }
.pfp-form-group { margin-bottom: 16px; }
.pfp-form-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.8); font-weight: 600; }
.pfp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Switch Toggle */
.pfp-switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.pfp-switch input { opacity: 0; width: 0; height: 0; }
.pfp-slider-toggle { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .4s; border-radius: 24px; }
.pfp-slider-toggle:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
.pfp-switch input:checked + .pfp-slider-toggle { background-color: #a855f7; }
.pfp-switch input:checked + .pfp-slider-toggle:before { transform: translateX(20px); }

/* Hero Banner */
.pfp-hero { position: relative; width: 100%; height: 320px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-left: 20px; /* sidebar offset */ width: calc(100vw - 300px); }
.pfp-banner-wrapper { width: 100%; height: 100%; position: absolute; top:0; left:0; overflow: hidden; }
.pfp-banner-img { width: 100%; height: 100%; object-fit: cover; animation: kenBurns 20s infinite alternate ease-in-out; }
.pfp-banner-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to bottom, rgba(2,0,5,0.1) 0%, rgba(2,0,5,1) 100%); }
.pfp-edit-banner-btn { position: absolute; top: 24px; right: 24px; z-index: 10; }

.pfp-avatar-container { position: absolute; bottom: -50px; left: 40px; z-index: 10; }
.pfp-avatar-wrapper { position: relative; width: 160px; height: 160px; border-radius: 50%; border: 6px solid #020005; background: #1a1a1a; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.pfp-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pfp-tier-crown { position: absolute; bottom: 5px; right: 5px; width: 36px; height: 36px; background: #fbbf24; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #000; font-size: 1.2rem; border: 3px solid #020005; box-shadow: 0 0 15px rgba(251,191,36,0.5); }
.pfp-online-dot { position: absolute; top: 15px; right: 15px; width: 16px; height: 16px; background: #22c55e; border-radius: 50%; border: 3px solid #020005; }

/* Identity Block */
.pfp-identity { padding-top: 16px; }
.pfp-name { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.5px; }
.pfp-meta-list { display: flex; gap: 16px; font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.pfp-meta-item { display: flex; align-items: center; gap: 6px; }
.pfp-social-link { cursor: pointer; transition: 0.2s; }
.pfp-social-link:hover strong { color: #c084fc; }
.pfp-actions-grid { display: flex; gap: 12px; flex-wrap: wrap; }

/* Rank & Level */
.pfp-level-card { background: linear-gradient(145deg, rgba(255,255,255,0.02), rgba(168,85,247,0.05)); border-color: rgba(192,132,252,0.2); }
.pfp-progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.pfp-progress-fill { height: 100%; border-radius: 3px; transition: width 1s ease-out; }
.pfp-trust-gauge { position: relative; width: 100px; height: 50px; margin-top: 8px; }
.pfp-gauge-svg { width: 100%; height: 100%; overflow: visible; }
.gauge-bg { stroke: rgba(255,255,255,0.1); stroke-width: 8; stroke-linecap: round; fill: none; }
.gauge-fill { stroke: #22c55e; stroke-width: 8; stroke-linecap: round; fill: none; transition: stroke-dashoffset 1.5s cubic-bezier(0.16,1,0.3,1); }
.gauge-val { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 1.2rem; font-weight: 800; color: #22c55e; }

/* Stats Grid */
.pfp-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.pfp-stat-cell { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: 0.3s; }
.pfp-stat-cell:hover { transform: translateY(-4px); background: rgba(255,255,255,0.04); border-color: rgba(192,132,252,0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.s-lbl { font-size: 0.7rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.s-val { font-size: 1.8rem; font-weight: 800; tabular-nums: tabular-nums; line-height: 1.1; }
.s-spark { position: absolute; bottom: 0; left: 0; width: 100%; height: 30px; opacity: 0.3; }
.spark-path { fill: none; stroke: #c084fc; stroke-width: 2; }

/* Tabs */
.pfp-tabs { display: flex; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.pfp-tab { background: transparent; border: none; color: rgba(255,255,255,0.5); font-weight: 700; cursor: pointer; padding: 8px 16px; border-radius: 12px; transition: 0.3s; text-transform: uppercase; font-size: 0.85rem; white-space: nowrap; }
.pfp-tab:hover { color: white; background: rgba(255,255,255,0.05); }
.pfp-tab.active { background: rgba(192,132,252,0.2); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.2); border: 1px solid rgba(192,132,252,0.3); }
.pfp-tab-count { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 12px; font-size: 0.7rem; margin-left: 6px; color: #fff; }
.pfp-tab-pane { animation: fadeInUp 0.4s forwards; }

/* About & Chips */
.pfp-chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.pfp-chip { font-size: 0.75rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 16px; color: rgba(255,255,255,0.8); }

/* Badges Grid */
.pfp-badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.pfp-badge-card { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 24px 16px; text-align: center; transition: 0.3s; cursor: pointer; }
.pfp-badge-card:hover { transform: translateY(-4px) rotate(2deg); background: rgba(255,255,255,0.03); border-color: rgba(251,191,36,0.3); }
.b-icon { font-size: 2.5rem; margin-bottom: 12px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.b-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.b-date { font-size: 0.7rem; color: rgba(255,255,255,0.4); }
.rarity-legendary { border-color: rgba(251,191,36,0.5); box-shadow: inset 0 0 20px rgba(251,191,36,0.1); }

/* Trades Grid */
.pfp-trades-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.pfp-t-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 16px; cursor: pointer; transition: 0.2s; }
.pfp-t-card:hover { border-color: #c084fc; background: rgba(255,255,255,0.05); }

/* Challenges List */
.pfp-challenges-list { display: flex; flex-direction: column; gap: 12px; }
.pfp-chl-item { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05); border-left: 4px solid #c084fc; padding: 16px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; }

/* Edit Profile Form Tabs */
.pfp-edit-pane { animation: fadeInUp 0.3s forwards; }

/* Modals */
.pfp-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.pfp-modal__overlay { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); }
.pfp-modal__content { position: relative; background: #0d0b12; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; width: 90%; max-height: 90vh; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); animation: popIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards; }
.pfp-modal__close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.5rem; cursor: pointer; transition: 0.3s; z-index: 10; }
.pfp-modal__close:hover { color: white; }

.pfp-share-url-box { display: flex; gap: 8px; }