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

:root {
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;

  --glass: rgba(18, 20, 24, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shine: rgba(255, 255, 255, 0.04);
  --blur: 24px;

  --white-95: rgba(255, 255, 255, 0.95);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-45: rgba(255, 255, 255, 0.45);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-08: rgba(255, 255, 255, 0.08);

  --radius: 18px;
  --radius-sm: 14px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--white-95);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  background: #080a0c;
}

/* ═══ BACKGROUND ═══ */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-image {
  position: absolute;
  inset: -40px;
  background: url('photos/backround.jpg') center/cover no-repeat #080a0c;
  filter: blur(4px) saturate(1.2) brightness(0.55);
  transform: scale(1.1);
}

.bg-fog {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(8, 10, 12, 0.35) 65%),
    linear-gradient(180deg, rgba(8, 10, 12, 0) 0%, rgba(8, 10, 12, 0.45) 100%);
}

/* ═══ PARTICLES ═══ */
#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ═══ NOISE ═══ */
.noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ═══ MAIN CONTAINER ═══ */
.container {
  position: relative;
  z-index: 10;
  width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ═══ PROFILE ═══ */
.profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.avatar-area {
  position: relative;
  width: 105px;
  height: 105px;
  flex-shrink: 0;
}

.avatar-glow {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 185, 200, 0.13) 0%, transparent 70%);
  animation: glowPulse 3.5s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes glowPulse {
  from { transform: scale(0.92); opacity: 0.5; }
  to   { transform: scale(1.08); opacity: 1; }
}

.avatar-ring {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.1) 100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-ring:hover { transform: scale(1.05); }

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: url('photos/avatar.jpg') center/cover no-repeat #111318;
}

/* Decoration overlay */
.avatar-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  object-fit: contain;
  pointer-events: none;
  z-index: 3;
}

/* Top half — static */
.deco-top {
  transform: translate(-50%, -50%);
  clip-path: inset(0 0 50% 0);
}

/* Bottom half — animated */
.deco-bottom {
  transform: translate(-50%, -50%);
  clip-path: inset(50% 0 0 0);
  animation: decoFloat 3s ease-in-out infinite;
}

@keyframes decoFloat {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
  }
  25% {
    transform: translate(-50%, -50%) translateY(-2.5px) rotate(0.5deg);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-1px) rotate(-0.3deg);
  }
  75% {
    transform: translate(-50%, -50%) translateY(-3px) rotate(0.2deg);
  }
}

.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3ba55d;
  border: 2.5px solid rgba(18, 20, 24, 0.8);
  z-index: 5;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(59, 165, 93, 0); }
}

/* Identity */
.identity { text-align: left; }

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

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

.name-particles {
  position: absolute;
  inset: -12px -16px;
  width: calc(100% + 32px);
  height: calc(100% + 24px);
  pointer-events: none;
  z-index: 0;
}

.username {
  position: relative;
  z-index: 1;
  font-family: 'Silkscreen', cursive;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white-95);
  text-shadow:
    0 0 8px rgba(200, 210, 230, 0.2),
    0 0 20px rgba(180, 190, 220, 0.08);
}

.badge {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--white-45);
  text-transform: uppercase;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--white-45);
  margin-top: 3px;
}

/* ═══ GLASS CARDS ═══ */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.glass-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.2);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 0 0 1px var(--glass-shine) inset,
    0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.05) 0%, transparent 40%);
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px var(--glass-shine) inset,
    0 0 24px rgba(150, 160, 180, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.25);
}

.card-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white-70);
  display: block;
  margin-bottom: 6px;
}

.card-text {
  font-size: 0.74rem;
  color: var(--white-45);
  line-height: 1.55;
}

/* ═══ SPOTIFY CARD ═══ */
.spotify-card {
  position: relative;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(16, 18, 22, 0.65);
  backdrop-filter: blur(var(--blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.2);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 0 0 1px var(--glass-shine) inset,
    0 4px 20px rgba(0, 0, 0, 0.2);
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  gap: 6px 12px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.spotify-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, transparent 40%);
  pointer-events: none;
}

.spotify-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px var(--glass-shine) inset,
    0 8px 28px rgba(0, 0, 0, 0.25);
}

.sp-logo {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.sp-album {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: url('photos/Screenshot_2.png') center/cover no-repeat rgba(255, 255, 255, 0.04);
  border: 1px solid var(--white-08);
  grid-row: 1;
  grid-column: 1;
  flex-shrink: 0;
}

.sp-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
  padding-right: 20px;
}

.sp-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white-95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-artist {
  font-size: 0.68rem;
  color: var(--white-45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 2px 0 0;
}

.sp-btn {
  width: 14px;
  height: 14px;
  color: var(--white-45);
  cursor: pointer;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.sp-btn--sm {
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

.sp-btn:hover,
.sp-btn--sm:hover {
  color: var(--white-95);
  opacity: 1;
}

.sp-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--white-95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.sp-play svg {
  width: 14px;
  height: 14px;
  fill: #0a0a0c;
  margin-left: 1.5px;
}

.sp-play:hover {
  transform: scale(1.08);
  background: #fff;
}

/* ═══ SOCIAL ICONS ═══ */
.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 0;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white-70);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.social-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--white-95);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 0 20px rgba(200, 210, 220, 0.08);
}

.social-icon:hover::after { opacity: 1; }
.social-icon:active { transform: translateY(-1px) scale(1.02); }
.social-icon.disabled { opacity: 0.25; pointer-events: none; }

.social-icon svg {
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 1;
}

.social-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: brightness(0.9);
  transition: filter 0.3s ease;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.social-icon:hover .social-img { filter: brightness(1.2); }

/* Tooltip */
.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(12, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--white-70);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

.has-tooltip:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══ FOOTER ═══ */
.footer {
  font-size: 0.6rem;
  color: var(--white-20);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 560px) {
  .container {
    width: 100%;
    padding: 0 16px;
    gap: 12px;
  }

  .avatar-area {
    width: 72px;
    height: 72px;
  }

  .username { font-size: 1.5rem; }

  .cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }
}

/* Selection & Scrollbar */
::selection {
  background: rgba(180, 200, 220, 0.18);
  color: var(--white-95);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
