/* ============================================================
   @Syrup — Discord-style profile card
   ============================================================ */

:root {
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.35);
  --blurple: #5865f2;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --green: #1db954;
}

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

::selection {
  background: #ffffff;
  color: #000000;
}
::-moz-selection {
  background: #ffffff;
  color: #000000;
}

html,
body {
  min-height: 100%;
}

body {
  background: #000;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Background layer (video + overlay + canvas) ===== */
#bg,
#bg-video,
#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#bg {
  display: block;
}

#bg-video {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

#bg-overlay {
  background: rgba(0, 0, 0, 0.6);
}

/* ===== Enter gate ===== */
#enter-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#enter-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-text {
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
  animation: gate-pulse 2s ease-in-out infinite;
}

@keyframes gate-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ============================================================
   Profile card (transparent — content floats over the video)
   ============================================================ */
#card {
  position: relative;
  z-index: 2;
  transform: translateZ(0);
  width: 460px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 30px 0 40px;
}

.avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  margin-bottom: 12px;
}

.avatar-halo {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.5), transparent 70%);
  filter: blur(8px);
  animation: halo-pulse 3.5s ease-in-out infinite;
}

@keyframes halo-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

#avatar {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 4px solid rgba(20, 21, 33, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* Rotating conic ring */
.avatar-decoration {
  position: absolute;
  inset: -7px;
  z-index: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blurple), var(--violet), var(--pink), var(--blurple));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  animation: spin 5s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Discord-style presence (online) dot */
.presence-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  border: 4px solid rgba(20, 21, 33, 0.9);
  box-shadow: 0 0 12px rgba(29, 185, 84, 0.7);
}

.presence-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(29, 185, 84, 0.5);
  animation: presence-ring 2s ease-out infinite;
}

@keyframes presence-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

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

.name {
  font-weight: 800;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, #ffffff 40%, #cfc3ff);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  filter: drop-shadow(0 2px 14px rgba(139, 92, 246, 0.35));
}

.name-spark {
  color: var(--violet);
  font-size: 18px;
  animation: sparkle 2.2s ease-in-out infinite;
  display: inline-block;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(20deg); }
}

/* Status text (Discord custom-status style) */
.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 0 6px;
}

.status {
  font-style: italic;
  font-weight: 570;
  font-size: 15px;
  color: #d9ccff;
}

.status-orn {
  color: var(--violet);
  font-size: 14px;
  line-height: 1;
}

/* ===== Socials ===== */
.socials {
  display: flex;
  gap: 12px;
}

.social {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.social svg {
  width: 18px;
  height: 18px;
}

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

/* Discord brand hover */
.social-discord:hover {
  background: rgba(88, 101, 242, 0.25);
  border-color: rgba(88, 101, 242, 0.7);
  box-shadow: 0 10px 28px rgba(88, 101, 242, 0.35);
}

/* Instagram brand hover */
.social-instagram:hover {
  background: linear-gradient(135deg, rgba(253, 29, 29, 0.25), rgba(252, 176, 69, 0.25));
  border-color: rgba(236, 72, 153, 0.7);
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.3);
}

/* ===== Audio player (minimal bar) ===== */
.audio-player {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ap-cover {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.ap-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ap-main {
  flex: 1;
  min-width: 0;
}

.ap-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.ap-progress {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  cursor: pointer;
}

.ap-progress .progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3ad86b, var(--green));
  border-radius: 999px;
}

.ap-progress .progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ap-progress:hover .progress-thumb {
  opacity: 1;
}

/* Minimal icon buttons */
.ap-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ap-btn:hover {
  color: #fff;
  transform: scale(1.1);
}

.ap-btn:active {
  transform: scale(0.95);
}

.ap-btn svg {
  width: 20px;
  height: 20px;
}

#play-toggle.ap-btn {
  color: rgba(61, 216, 107, 0.9);
}

#play-toggle.ap-btn:hover {
  color: #3ad86b;
}

#volume-toggle.ap-btn {
  color: rgba(255, 255, 255, 0.55);
}

#volume-toggle.ap-btn:hover {
  color: #fff;
}

/* Volume slider (revealed on hover) */
.ap-volume {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ap-vol-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green) var(--fill, 100%), rgba(255, 255, 255, 0.15) var(--fill, 100%));
  outline: none;
  cursor: pointer;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.25s ease;
}

.ap-volume:hover .ap-vol-slider,
.ap-volume:focus-within .ap-vol-slider {
  width: 60px;
  opacity: 1;
}

.ap-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.ap-vol-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

/* ===== Profile views ===== */
.views {
  position: absolute;
  bottom: 14px;
  left: 20px;
  display: flex;
  align-items: center;
  cursor: default;
}

.views-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

.views-count svg {
  width: 13px;
  height: 13px;
  color: var(--violet);
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: rgba(20, 20, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.views:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 520px) {
  #card {
    padding: 24px 18px 36px;
  }
  .name {
    font-size: 30px;
  }
  .avatar-wrap {
    width: 112px;
    height: 112px;
  }
  #avatar {
    width: 104px;
    height: 104px;
  }
  .audio-player {
    gap: 10px;
  }
  .ap-volume:hover .ap-vol-slider {
    width: 44px;
  }
}
