:root {
  --blue: #5865f2;
  --green: #57f287;
  --status-green: #3ba55c;
  --text-muted: #a3a6aa;
  --card-bg: rgba(32, 34, 37, 0.7);
}

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

@import url('https://fonts.googleapis.com/css2?family=GG+Sans:wght@400;600&display=swap');

body {
  font-family: 'GG Sans', 'Segoe UI', sans-serif;
  background-color: black;
  color: white;
  overflow: hidden;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

a { color: white; text-decoration: none; }

/* ── Welcome screen ── */
#welcome-screen {
  z-index: 50;
  background-color: black;
  color: white;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}
#welcome-screen h1 { font-size: 3rem; letter-spacing: 2px; }
#welcome-screen p  { font-size: 0.9rem; opacity: 0.7; margin-top: 10px; }

/* ── Background ── */
.background-container {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1; overflow: hidden;
}
.background-video { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.background-overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.25);
}

/* ── Mute button ── */
.mute-button {
  position: fixed; top: 20px; left: 20px;
  width: 40px; height: 40px;
  background-color: rgba(0,0,0,0.7);
  border-radius: 50%;
  justify-content: center; align-items: center;
  z-index: 100; cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: none;
}
.mute-button:hover { background-color: rgba(32,34,37,0.9); transform: scale(1.1); }
.mute-icon { width: 20px; height: 20px; color: white; }

/* ── Volume slider ── */
.volume-control {
  position: fixed; bottom: 20px; left: 20px;
  z-index: 100;
  background-color: rgba(32,34,37,0.7);
  padding: 10px; border-radius: 20px; width: 150px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: none;
}
.volume-slider {
  width: 100%; height: 5px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.2);
  border-radius: 5px; outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--blue); cursor: pointer;
}

/* ── Main card ── */
.card-container {
  background-color: rgba(32,34,37,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: min(460px, 92vw);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  transform-style: preserve-3d;
  transform: perspective(1000px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tilt-background-gif {
  position: absolute; inset: 0;
  background-image: url('./static/images/sparkle_white.gif');
  background-size: cover; background-position: center;
  opacity: 0.15; z-index: 0; pointer-events: none;
}

.content-container {
  position: relative; z-index: 1;
  padding: 40px 30px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Profile header (avatar + name) ── */
.profile-header {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  transform-style: preserve-3d;
  transform: translateZ(40px);
}

.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.avatar-decoration {
  width: 130px; height: 130px;
  background: conic-gradient(#ff7b00,#ff9a00,#ffb700,#ffd400,#fff200,#e7ff00,#c9ff00,#aaff00,#8cff00,#6eff00,#51ff00,#33ff00,#15ff00,#00ff0d,#00ff2b,#00ff49,#00ff67,#00ff84,#00ffa2,#00ffc0,#00ffdd,#00fffa,#00e7ff,#00caff,#00adff,#008fff,#0072ff,#0055ff,#0038ff,#001aff,#0d00ff,#2a00ff,#4800ff,#6500ff,#8300ff,#a000ff,#be00ff,#db00ff,#f900ff,#ff00db,#ff00be,#ff00a0,#ff0083,#ff0065,#ff0048,#ff002a,#ff000d);
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.avatar-inner {
  width: 120px; height: 120px;
  background-color: black; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
}

.avatar-img {
  width: 112px; height: 112px;
  border-radius: 50%; object-fit: cover;
}

.username-container {
  position: absolute; bottom: -22px;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 5px 18px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transform: translateZ(20px);
  white-space: nowrap;
}

.username { font-weight: 700; font-size: 18px; }

.nickname {
  color: var(--text-muted);
  font-size: 12px;
  background-color: rgba(88,101,242,0.2);
  border: 1px solid rgba(88,101,242,0.4);
  padding: 1px 6px; border-radius: 4px;
  display: none;
}

/* ── Description ── */
.profile-description {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
  margin-bottom: 22px;
  line-height: 1.5;
  transform: translateZ(35px);
  width: 100%;
}

/* ── Cards container (single card, full width) ── */
.cards-container {
  width: 100%;
  transform-style: preserve-3d;
  transform: translateZ(30px);
  margin-bottom: 20px;
}

.card {
  background-color: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  width: 100%;
}

.card:hover { transform: translateY(-3px); }

/* ── User card internals ── */
.user-info { display: flex; align-items: flex-start; gap: 14px; }

.small-avatar-container { position: relative; flex-shrink: 0; }

.small-avatar {
  width: 50px; height: 50px;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.small-decoration {
  position: absolute;
  top: -10%; left: -14%;
  width: 63px; height: 63px;
  object-fit: cover; z-index: 2;
}

.small-status-indicator {
  position: absolute;
  width: 14px; height: 14px;
  background-color: var(--status-green);
  border-radius: 50%;
  bottom: 0; right: 0;
  border: 2px solid var(--card-bg);
}

.user-details {
  display: flex; flex-direction: column;
  align-items: flex-start; width: 100%; gap: 4px;
}

.top-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.user-name { font-weight: 600; font-size: 16px; }

.user-discriminator {
  color: var(--text-muted); font-size: 12px; display: none;
}

.discord-clan-badge {
  background-color: #3b3d41;
  color: #fff; display: none;
  align-items: center;
  font-size: 12px; font-weight: 500; line-height: 1;
  gap: 6px; padding: 2px 7px; border-radius: 4px;
}
.discord-clan-badge img {
  width: 14px; height: 14px;
  border-radius: 50%; object-fit: cover; display: block;
}
.discord-clan-badge span { white-space: nowrap; }

.badge-container {
  margin-top: 4px;
  display: flex; flex-wrap: wrap;
  row-gap: 5px; column-gap: 5px;
  width: 100%;
}

.badge {
  height: 22px; width: auto; flex-shrink: 0;
  transition: transform 0.15s ease;
}
.badge:hover { transform: scale(1.2); }

/* ── Social section (bottom of card) ── */
.social-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateZ(20px);
  padding-top: 4px;
}

.view-counter {
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 20px;
  padding: 5px 12px;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  white-space: nowrap;
}

/* Social icons — centered in remaining space */
.social-links-centered {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-link {
  width: 38px; height: 38px;
  background-color: rgba(32,34,37,0.8);
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  color: white;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  font-size: 16px;
}
.social-link:hover {
  background-color: var(--blue);
  transform: translateY(-3px);
}
.social-icon { width: 18px; height: 18px; }

/* ── Responsive ── */
@media (max-width: 500px) {
  .content-container { padding: 36px 18px 22px; }
  .avatar-decoration { width: 110px; height: 110px; }
  .avatar-inner { width: 100px; height: 100px; }
  .avatar-img { width: 92px; height: 92px; }
  .card-container { width: 94vw; }
  .social-link { width: 34px; height: 34px; font-size: 14px; }
  .volume-control { width: 110px; }
}
