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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  font-family: -apple-system, 'SF Pro Display', 'Inter', sans-serif;
  overflow: hidden;
  cursor: url("https://r2.guns.lol/fd746f81-b8b5-491e-b730-a6e9ffcdc9e3.cur") 16 16, auto !important;
  -webkit-font-smoothing: antialiased;
}

/* ─── SPLASH ─────────────────────────────────────────────────── */

.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
  transition: opacity .6s ease;
}
.splash.hidden { opacity: 0; pointer-events: none; }

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.splash-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
  border-top-color: rgba(255,255,255,.85);
  animation: spin 1.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.splash-header {
  margin: 0;
  color: rgba(255,255,255,.45);
  font-size: .7rem;
  letter-spacing: .55em;
  text-transform: uppercase;
  font-weight: 400;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.25} 50%{opacity:1} }

/* ─── VIDEO BG ───────────────────────────────────────────────── */

.outer {
  position: relative;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.outer.visible { display: flex; }

.video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.30) saturate(1.1);
  z-index: 0;
}

.outer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(0,0,0,.48) 100%);
  pointer-events: none;
}

/* ─── LAYOUT ─────────────────────────────────────────────────── */

.main-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  perspective: 900px;
}

/* ─── CARTE GLASS BLANC ──────────────────────────────────────── */

.profile {
  position: relative;
  width: 100%;
  max-width: 330px;
  padding: 32px 24px 24px;
  text-align: center;
  color: #fff;

  background: rgba(255,255,255,0.07);
  border-radius: 28px;

  border: 1px solid rgba(255,255,255,0.28);
  border-bottom-color: rgba(255,255,255,0.08);
  border-left-color:   rgba(255,255,255,0.15);
  border-right-color:  rgba(255,255,255,0.15);

  backdrop-filter: blur(72px) saturate(1.8) brightness(1.18);
  -webkit-backdrop-filter: blur(72px) saturate(1.8) brightness(1.18);

  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.50),
    inset 0 -1px 0 rgba(255,255,255,0.04),
    0 28px 72px rgba(0,0,0,0.38),
    0 6px 20px rgba(0,0,0,0.20);

  /* entrée */
  opacity: 0;
  transform: translateY(16px) scale(.96);
  animation: rise .6s cubic-bezier(.34,1.2,.64,1) forwards .12s;

  /* 3D tilt — géré par JS, on prépare la transition */
  will-change: transform;
  transform-style: preserve-3d;
  transition: box-shadow .25s ease, background .25s ease;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* reflet blanc haut */
.profile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 42%;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.10) 0%, transparent 100%);
  pointer-events: none;
}

/* lueur sur le côté gauche lors du tilt (manipulée par JS) */
.profile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.10) 0%, transparent 65%);
  pointer-events: none;
  transition: opacity .3s ease;
  opacity: 0;
}
.profile.tilting::after { opacity: 1; }

/* ─── AVATAR ─────────────────────────────────────────────────── */

.pic-wrap {
  position: relative;
  display: inline-block;
}

.pic {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid rgba(255,255,255,0.40);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.06), 0 8px 22px rgba(0,0,0,0.32);
}

.pic-wrap::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 6px;
  background: radial-gradient(ellipse, rgba(255,255,255,.20) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── TEXTE ──────────────────────────────────────────────────── */

.displayname {
  margin: 15px 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 1.12rem;
  font-weight: 600;
  color: rgba(255,255,255,.95);
  letter-spacing: -.01em;
}

.badges { display: inline-flex; gap: 3px; align-items: center; }

.badge {
  width: 16px; height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .18s ease;
}
.badge:hover { transform: scale(1.3); }

.username {
  margin: 0 0 6px;
  color: rgba(255,255,255,.35);
  font-size: .81rem;
}

.description {
  margin: 0 0 18px;
  color: rgba(255,255,255,.68);
  font-size: .89rem;
  line-height: 1.5;
}

/* ─── SÉPARATEUR ─────────────────────────────────────────────── */

.divider {
  width: 100%;
  height: 1px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.20) 25%, rgba(255,255,255,.20) 75%, transparent);
}

/* ─── LINKS ──────────────────────────────────────────────────── */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.link {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.34,1.3,.64,1), background .15s ease, box-shadow .15s ease;

  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-bottom-color: rgba(255,255,255,.08);

  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 3px 10px rgba(0,0,0,.22);
}
.link svg { width: 16px; height: 16px; }

.link:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.48);
  transform: translateY(-3px) scale(1.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 16px rgba(0,0,0,.28);
}
.link:active { transform: scale(.93); }

/* ─── VIEWS ──────────────────────────────────────────────────── */

.views-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: rgba(255,255,255,.28);
  font-size: .73rem;
  letter-spacing: .03em;
}

/* ─── TOOLTIP ────────────────────────────────────────────────── */

.tooltip { position: relative; }
.tooltip[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.90);
  font-size: .67rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 480px) {
  .profile { padding: 26px 18px 20px; max-width: 90%; }
}
@media (prefers-reduced-motion: reduce) {
  .profile { animation: none; opacity: 1; transform: none; }
  .splash-ring { animation: none; }
}
