/* ============================================================
   PROFILE PAGE CSS — Public profile view
   ============================================================ */

/* ── Page Reset for Profile ── */
.profile-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 80px;
  position: relative;
  overflow: hidden;
  font-family: var(--profile-font, 'Plus Jakarta Sans', sans-serif);
}

/* ── Background Layers ── */
.profile-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.profile-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.profile-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-bg-blur {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(var(--bg-blur, 0px));
  -webkit-backdrop-filter: blur(var(--bg-blur, 0px));
}
.profile-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.15) 100%);
}

/* ── Effects Canvas ── */
#effectCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── Profile Card ── */
.profile-card {
  width: 100%;
  max-width: 580px;
  position: relative;
  z-index: 10;
}

.profile-card-inner {
  background: var(--card-bg, rgba(10,10,18,0.85));
  backdrop-filter: blur(var(--card-blur, 12px));
  -webkit-backdrop-filter: blur(var(--card-blur, 12px));
  border-radius: var(--card-radius, 22px);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.16,1,.3,1);
}

/* Border styles */
.profile-card-inner.border-glow {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 0 40px rgba(var(--accent-rgb, 255,26,42), 0.25), 0 20px 60px rgba(0,0,0,0.5);
}
.profile-card-inner.border-solid {
  border: 1px solid var(--accent, #ff1a2a);
}
.profile-card-inner.border-gradient {
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px var(--accent, #ff1a2a), 0 20px 60px rgba(0,0,0,0.5);
}
.profile-card-inner.border-none {
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ── Profile Header ── */
.profile-header {
  padding: 36px 36px 24px;
  text-align: center;
  position: relative;
}

.profile-header.layout-left { text-align: left; }
.profile-header.layout-right { text-align: right; }

/* ── Avatar ── */
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent, #ff1a2a);
  box-shadow: 0 0 20px rgba(var(--accent-rgb, 255,26,42), 0.4);
  display: block;
}
.profile-avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff1a2a, #b80010);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  border: 3px solid rgba(255,26,42,0.6);
}

/* Profile effect: float */
.profile-effect-float .profile-avatar-wrap {
  animation: avatar-float 3s ease-in-out infinite;
}
@keyframes avatar-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
/* Profile effect: pulse */
.profile-effect-pulse .profile-avatar {
  animation: avatar-pulse 2s ease-in-out infinite;
}
@keyframes avatar-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255,26,42,0.4); }
  50% { box-shadow: 0 0 40px rgba(255,26,42,0.8), 0 0 60px rgba(255,26,42,0.3); }
}

/* ── Username ── */
.profile-username {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text, #f5f5f7);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  display: inline-block;
}

/* Username effects */
.username-effect-glow .profile-username {
  text-shadow: 0 0 10px var(--accent, #ff1a2a), 0 0 30px rgba(255,26,42,0.4);
}
.username-effect-glitch .profile-username {
  animation: glitch-username 3s infinite;
}
@keyframes glitch-username {
  0%, 90%, 100% { text-shadow: none; clip-path: none; }
  91% { text-shadow: 2px 0 #ff1a2a, -2px 0 #00f0ff; transform: skewX(2deg); }
  93% { text-shadow: -2px 0 #ff1a2a, 2px 0 #00f0ff; transform: skewX(-3deg); }
  95% { text-shadow: 2px 0 #ff1a2a, -2px 0 #00f0ff; transform: skewX(0); }
}
.username-effect-rainbow .profile-username {
  background: linear-gradient(90deg,#ff1a2a,#ff6b35,#ffd700,#00ff66,#00f0ff,#a855f7,#ff1a2a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-shift 3s linear infinite;
}
@keyframes rainbow-shift { to { background-position: 200% center; } }
.username-effect-bounce .profile-username {
  animation: bounce-name 1.2s ease-in-out infinite;
}
@keyframes bounce-name {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.username-effect-neon .profile-username {
  color: var(--accent, #ff1a2a);
  text-shadow:
    0 0 5px var(--accent, #ff1a2a),
    0 0 10px var(--accent, #ff1a2a),
    0 0 20px var(--accent, #ff1a2a),
    0 0 40px var(--accent, #ff1a2a);
}
.username-effect-float .profile-username {
  animation: float-name 2.5s ease-in-out infinite;
}
@keyframes float-name {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.username-effect-typewriter .profile-username {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent, #ff1a2a);
  animation: typewriter-name 2s steps(20,end) forwards, blink-caret 0.75s step-end infinite;
}
@keyframes typewriter-name {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink-caret { from, to { border-color: transparent; } 50% { border-color: var(--accent, #ff1a2a); } }

/* ── Pronouns & Badges ── */
.profile-pronouns {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}
.profile-badge {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid currentColor;
  opacity: 0.9;
  cursor: default;
  transition: transform 0.2s;
}
.profile-badge:hover { transform: scale(1.08); }

/* ── Bio ── */
.profile-bio {
  font-size: 0.9rem;
  color: var(--text, #f5f5f7);
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 440px;
}
.profile-header.layout-left .profile-bio,
.profile-header.layout-right .profile-bio { margin: 0 0 12px; }
.profile-header:not(.layout-left):not(.layout-right) .profile-bio { margin: 0 auto 12px; }

/* ── Location & Meta ── */
.profile-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.profile-meta span { display: flex; align-items: center; gap: 5px; }

/* ── Discord Status ── */
.discord-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(88,101,242,0.1);
  border: 1px solid rgba(88,101,242,0.3);
  font-size: 0.78rem;
  color: #b0b5ff;
  margin-bottom: 12px;
}
.discord-status .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.status-online { background: #3ba55d; box-shadow: 0 0 6px #3ba55d; }
.status-idle { background: #faa81a; }
.status-dnd { background: #ed4245; }
.status-offline { background: #747f8d; }

/* ── Audio Player ── */
.profile-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.05);
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0;
}
.audio-play-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent, #ff1a2a);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.audio-play-btn:hover { transform: scale(1.1); box-shadow: 0 0 15px rgba(255,26,42,0.5); }
.audio-title { font-size: 0.78rem; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.audio-bars-mini {
  display: flex; align-items: flex-end; gap: 2px; height: 14px;
}
.audio-bars-mini span {
  width: 3px; border-radius: 2px;
  background: var(--accent, #ff1a2a);
  animation: mini-bar 0.8s ease-in-out infinite alternate;
}
.audio-bars-mini span:nth-child(1) { height: 60%; animation-delay: 0s; }
.audio-bars-mini span:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.audio-bars-mini span:nth-child(3) { height: 40%; animation-delay: 0.3s; }
.audio-bars-mini.paused span { animation-play-state: paused; }
@keyframes mini-bar { from { height: 20%; } to { height: 100%; } }

/* ── Links Section ── */
.profile-links { padding: 8px 28px 28px; display: flex; flex-direction: column; gap: 10px; }

.profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--link-color, #fff);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(.16,1,.3,1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.profile-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent, #ff1a2a);
  opacity: 0;
  transition: opacity 0.25s;
}
.profile-link:hover::before { opacity: 0.08; }
.profile-link:hover {
  border-color: var(--accent, #ff1a2a);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.profile-link > * { position: relative; z-index: 1; }
.profile-link-icon { font-size: 1.1rem; flex-shrink: 0; width: 24px; text-align: center; }
.profile-link-title { flex: 1; }
.profile-link-arrow { color: rgba(255,255,255,0.3); font-size: 0.75rem; transition: transform 0.2s; }
.profile-link:hover .profile-link-arrow { transform: translateX(3px); color: rgba(255,255,255,0.6); }

/* Link animations */
.link-anim-bounce:hover { animation: link-bounce 0.5s; }
@keyframes link-bounce { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(-6px); } }
.link-anim-shake:hover { animation: link-shake 0.5s; }
@keyframes link-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.link-anim-glow:hover { box-shadow: 0 0 20px rgba(255,26,42,0.5); }
.link-anim-pulse { animation: link-pulse-border 2s ease-in-out infinite; }
@keyframes link-pulse-border { 0%,100% { border-color: rgba(255,255,255,0.08); } 50% { border-color: var(--accent, #ff1a2a); } }

/* ── Embed ── */
.profile-embed {
  padding: 0 28px 16px;
}
.embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Footer Badge ── */
.profile-footer-badge {
  text-align: center;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.profile-footer-badge a {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.profile-footer-badge a:hover { color: rgba(255,255,255,0.6); }

/* ── 404 / Private / Not Found ── */
.profile-error {
  text-align: center;
  padding: 60px 40px;
  background: rgba(10,10,18,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  max-width: 440px;
  margin: 0 auto;
}
.profile-error h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.profile-error p { color: rgba(255,255,255,0.5); font-size: 0.9rem; margin-bottom: 24px; }

/* ── Card Layout Variants ── */
.card-style-square .profile-card-inner { border-radius: 8px; }
.card-style-minimal .profile-card-inner { background: transparent; backdrop-filter: none; border: none; box-shadow: none; }
.card-style-glass .profile-card-inner { background: rgba(255,255,255,0.04); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .profile-page { padding: 20px 12px 60px; }
  .profile-header { padding: 28px 20px 18px; }
  .profile-links { padding: 8px 16px 24px; }
  .profile-embed { padding: 0 16px 14px; }
  .profile-avatar { width: 80px; height: 80px; }
  .profile-username { font-size: 1.3rem; }
}
