*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0612;
  --card-bg: rgba(20, 10, 40, 0.55);
  --card-border: rgba(140, 80, 255, 0.18);
  --accent: #a259ff;
  --accent2: #00e5ff;
  --text-primary: #f0eaff;
  --text-muted: rgba(200, 185, 240, 0.6);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
}

#bg {
  position: fixed;
  inset: 0;
  background-image: url('peakness.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) saturate(1.3);
  z-index: 0;
}

#bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(6,2,20,0.7) 100%);
}

.particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: float linear infinite;
}
@keyframes float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

main {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 52px 60px 36px;
  width: min(520px, 90vw);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow:
    0 0 0 1px rgba(162, 89, 255, 0.08),
    0 8px 60px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.07);
  animation: cardIn 0.9s cubic-bezier(.22,.97,.41,1) both;
  display: flex;
  flex-direction: column;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  animation: fadeUp 0.7s 0.1s cubic-bezier(.22,.97,.41,1) both;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(162, 89, 255, 0.35);
  box-shadow: 0 0 20px rgba(162, 89, 255, 0.25);
}

.profile-text {
  display: flex;
  flex-direction: column;
}

.name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 2.8rem);
  letter-spacing: 0.01em;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.tagline {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0;
}

.bio {
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(215, 205, 240, 0.78);
  margin-bottom: 32px;
  animation: fadeUp 0.7s 0.35s cubic-bezier(.22,.97,.41,1) both;
}

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

.card-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(162, 89, 255, 0.1);
  animation: fadeUp 0.7s 0.45s cubic-bezier(.22,.97,.41,1) both;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(162,89,255,0.25);
  background: rgba(162,89,255,0.07);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.card-btn:hover {
  background: rgba(162,89,255,0.18);
  border-color: rgba(162,89,255,0.6);
  transform: translateY(-1px);
}
.card-btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

#audio-btn.playing { position: relative; }
#audio-btn.playing::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 13px;
  border: 1px solid rgba(162,89,255,0.5);
  animation: ring 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes ring {
  0%   { opacity: 0; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.4); }
}

#friends-section {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease;
  margin-bottom: 0;
}
#friends-section.open {
  max-height: 200px;
  opacity: 1;
  margin-bottom: 20px;
}

.friends-label {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(162, 89, 255, 0.1);
}

.friend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid rgba(162, 89, 255, 0.25);
  background: rgba(162, 89, 255, 0.07);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  letter-spacing: 0.02em;
  cursor: default;
  transition: background 0.18s, border-color 0.18s;
}
.chip:hover {
  background: rgba(162, 89, 255, 0.16);
  border-color: rgba(162, 89, 255, 0.5);
}

#minimise-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(162,89,255,0.25);
  background: rgba(162,89,255,0.07);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
#minimise-btn:hover {
  background: rgba(162,89,255,0.18);
  border-color: rgba(162,89,255,0.5);
  color: var(--text-primary);
}

#restore-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 28px;
  border-radius: 12px;
  border: 1px solid rgba(162,89,255,0.3);
  background: rgba(20,10,40,0.7);
  backdrop-filter: blur(16px);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  cursor: pointer;
  z-index: 200;
  transition: background 0.2s, border-color 0.2s;
}
#restore-btn:hover {
  background: rgba(162,89,255,0.18);
  border-color: rgba(162,89,255,0.6);
}
#restore-btn.visible {
  display: inline-flex;
}
