/* ============================================================
   kavynnn • Ultra High-End Discord Bio
   ============================================================ */

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

:root {
  --bg-primary: #07080c;
  --card-bg: rgba(14, 16, 23, 0.82);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(139, 92, 246, 0.4);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --surface-border: rgba(255, 255, 255, 0.06);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --spotify-green: #1db954;

  --status-online: #23a55a;
  --status-idle: #f0b232;
  --status-dnd: #f23f43;
  --status-streaming: #593695;
  --status-offline: #80848e;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html, body {
  min-height: 100vh;
  width: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glows */

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  will-change: transform;
}

.glow-1 {
  width: 600px;
  height: 600px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  animation: float-glow 20s ease-in-out infinite alternate;
}

.glow-2 {
  width: 700px;
  height: 700px;
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, #0284c7 0%, transparent 70%);
  animation: float-glow 24s ease-in-out infinite alternate-reverse;
}

.glow-3 {
  width: 450px;
  height: 450px;
  top: 40%;
  left: 60%;
  background: radial-gradient(circle, #db2777 0%, transparent 70%);
  animation: float-glow 18s ease-in-out infinite alternate;
}

@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* 3D Tilt Card Container */
.card-container {
  position: relative;
  z-index: 10;
  perspective: 1200px;
  width: 100%;
  max-width: 440px;
}

.profile-card {
  position: relative;
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  overflow: hidden;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 
    0 24px 60px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 40px -10px rgba(139, 92, 246, 0.15);
  transition: transform 0.15s ease-out, box-shadow 0.25s ease, border-color 0.25s ease;
  transform-style: preserve-3d;
}

.profile-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: 
    0 32px 70px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(139, 92, 246, 0.2),
    0 0 50px -5px rgba(139, 92, 246, 0.25);
}

.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Banner */
.banner {
  position: relative;
  height: 140px;
  width: 100%;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 35%, #0f172a 100%);
  background-size: cover;
  background-position: center;
  transition: background-image 0.5s ease;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(14, 16, 23, 0.8) 100%);
}

.banner-top-bar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
}

.gateway-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-secondary);
}

.gateway-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #eab308;
  box-shadow: 0 0 8px #eab308;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.gateway-status.connected .gateway-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.gateway-status.connected {
  color: #86efac;
}

.gateway-status.error .gateway-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.sound-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  transform: scale(1.05);
}

.sound-icon {
  width: 15px;
  height: 15px;
}

.sound-toggle .sound-on { display: none; }
.sound-toggle.playing .sound-off { display: none; }
.sound-toggle.playing .sound-on { display: block; color: var(--accent-cyan); }

/* Profile Head (Avatar + Badges) */
.profile-head {
  position: relative;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -50px;
  z-index: 10;
}

.avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.avatar-ring {
  position: relative;
  width: 100px;
  height: 100px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid #0e1017;
  object-fit: cover;
  background: #1e1f29;
  display: block;
}

/* Discord Avatar Decoration */
.avatar-decoration {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 124px;
  height: 124px;
  pointer-events: none;
  z-index: 5;
}

/* Discord Cutout Status Badge */
.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 4px solid #0e1017;
  background: var(--status-offline);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.status-indicator.online { background: var(--status-online); }
.status-indicator.idle { background: var(--status-idle); }
.status-indicator.dnd { background: var(--status-dnd); }
.status-indicator.streaming { background: var(--status-streaming); }
.status-indicator.offline { background: var(--status-offline); }

.status-indicator.dnd .status-symbol {
  width: 12px;
  height: 3px;
  background: #0e1017;
  border-radius: 2px;
}

.status-indicator.idle .status-symbol {
  width: 11px;
  height: 11px;
  background: #0e1017;
  border-radius: 50%;
  transform: translate(-3px, -3px);
}

.status-indicator.streaming .status-symbol {
  width: 0;
  height: 0;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 2px;
}

/* Badges Row */
.badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.badge-item {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-item:hover {
  transform: scale(1.25) translateY(-2px);
}

.badge-item img, .badge-item svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Identity Section */
.identity-section {
  padding: 16px 24px 0;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.display-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

.clan-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 3px 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clan-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.username-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.username-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.username-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.at-sign {
  color: var(--accent-purple);
  font-weight: 700;
}

.copy-icon {
  width: 13px;
  height: 13px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.username-btn:hover .copy-icon {
  opacity: 1;
}

.device-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.device-badge svg {
  width: 12px;
  height: 12px;
}

/* Custom Status */
.custom-status {
  margin-top: 12px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cbd5e1;
}

.status-emoji {
  font-size: 16px;
  line-height: 1;
}

/* Bio / Terminal Section */
.bio-section {
  padding: 16px 24px 0;
}

.terminal-block {
  background: #0a0c12;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.term-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.term-title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.terminal-content {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.term-line {
  color: var(--text-secondary);
}

.term-prompt {
  color: var(--accent-purple);
  font-weight: 700;
  margin-right: 4px;
}

.term-highlight {
  color: #38bdf8;
  font-weight: 600;
}

.term-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tech-tag {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Presence & Activity */
.presence-section {
  padding: 18px 24px 0;
}

.section-title-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.title-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 8px var(--accent-purple);
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.activity-container {
  min-height: 80px;
}

/* Activity Skeletons */
.activity-skeleton {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
}

.skeleton-art {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  animation: pulse-skele 1.5s infinite ease-in-out;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  animation: pulse-skele 1.5s infinite ease-in-out;
}
.w-70 { width: 70%; }
.w-40 { width: 40%; }

@keyframes pulse-skele {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Rich Presence Cards */
.activity-card {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  overflow: hidden;
}

.activity-card:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.activity-card.spotify-card {
  border-color: rgba(29, 185, 84, 0.25);
  background: linear-gradient(135deg, rgba(29, 185, 84, 0.08) 0%, rgba(14, 16, 23, 0.9) 100%);
}

.activity-art-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.activity-art {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.activity-small-art {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #0e1017;
  object-fit: cover;
  background: #1e1f29;
}

.activity-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.activity-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activity-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-purple);
}

.spotify-badge {
  color: var(--spotify-green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.spotify-badge svg {
  width: 14px;
  height: 14px;
}

.activity-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.activity-details, .activity-state {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.activity-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Spotify Animated Wave Bars */
.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.sound-bars span {
  width: 2px;
  height: 100%;
  background: var(--spotify-green);
  border-radius: 1px;
  animation: sound-bounce 1.2s infinite ease-in-out alternate;
}
.sound-bars span:nth-child(1) { animation-duration: 0.8s; }
.sound-bars span:nth-child(2) { animation-duration: 1.1s; }
.sound-bars span:nth-child(3) { animation-duration: 0.6s; }
.sound-bars span:nth-child(4) { animation-duration: 0.9s; }

@keyframes sound-bounce {
  0% { height: 2px; }
  100% { height: 14px; }
}

/* Spotify Progress Bar */
.spotify-progress-container {
  margin-top: 8px;
}

.spotify-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.spotify-progress-fill {
  height: 100%;
  background: var(--spotify-green);
  border-radius: inherit;
  transition: width 0.8s linear;
}

.spotify-time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* Idle State Card */
.idle-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
}

.idle-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.idle-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.idle-text-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.idle-text-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Socials Section */
.socials-section {
  padding: 18px 24px 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.social-link {
  flex: 1;
  max-width: 160px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.social-link:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.social-link.discord-link svg { color: #5865f2; }
.social-link.discord-link:hover {
  border-color: rgba(88, 101, 242, 0.4);
  box-shadow: 0 8px 20px -4px rgba(88, 101, 242, 0.25);
  color: #fff;
}
.social-link.discord-link:hover svg { transform: scale(1.15); }

.social-link.telegram-link svg { color: #229ed9; }
.social-link.telegram-link:hover {
  border-color: rgba(34, 158, 217, 0.4);
  box-shadow: 0 8px 20px -4px rgba(34, 158, 217, 0.25);
  color: #fff;
}
.social-link.telegram-link:hover svg { transform: scale(1.15); }

/* Card Footer */
.card-footer {
  padding: 18px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.footer-item {
  display: flex;
  gap: 5px;
}

.footer-label {
  color: var(--text-muted);
}

.footer-value {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(14, 16, 23, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.4);
  backdrop-filter: blur(16px);
  padding: 10px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.2);
  z-index: 100;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-check {
  width: 16px;
  height: 16px;
  color: #22c55e;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
  .card-container {
    max-width: 100%;
  }
  .profile-card {
    border-radius: 22px;
  }
  .display-name {
    font-size: 20px;
  }
}
