/* ==========================================================================
   Aesthetic Dark Bio & Apple Music Style Portfolio Styles
   Fully Responsive & GPU-Accelerated for Mobile (iOS / Android)
   ========================================================================== */

:root {
  --bg-dark: #070709;
  --glass-bg: rgba(18, 18, 22, 0.65);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hover: rgba(255, 255, 255, 0.2);
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --font-primary: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* ==========================================================================
   Background & Canvas Visualizer
   ========================================================================== */

#visualizerCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  will-change: transform;
}

.bg-wallpaper {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.7) contrast(1.05);
  transform: scale(1.05) translate3d(0,0,0);
  z-index: 0;
  transition: background-image 1s ease, filter 0.8s ease;
  will-change: transform, filter;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.bg-wallpaper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 35%, rgba(7, 7, 9, 0.55) 100%);
}

/* ==========================================================================
   Landing "Click to Enter" Overlay
   ========================================================================== */

.enter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #050507;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.enter-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.enter-content {
  text-align: center;
  padding: 16px;
}

.enter-text {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: #e4e4e7;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: pulseText 2.5s infinite ease-in-out;
}

.enter-overlay:hover .enter-text {
  opacity: 1;
  transform: scale(1.03);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

@keyframes pulseText {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.02); }
}

/* ==========================================================================
   Main Application Layout Container
   ========================================================================== */

.main-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 900px;
  padding: 16px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-container.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Header Bio Profile Card */
.bio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 12px 24px;
  width: 100%;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s ease;
}

.bio-card:hover {
  border-color: var(--glass-border-hover);
}

.bio-profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background-color: #22c55e;
  border: 2px solid #141417;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.username-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.username {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #f4f4f5;
}

.user-badge {
  font-size: 0.95rem;
  color: #a1a1aa;
}

.status-subtitle {
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 12px;
}

.bio-card-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.views-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.views-widget:hover {
  opacity: 1;
  color: #ffffff;
}

.eye-icon {
  font-size: 0.9rem;
}

/* Social Media Icons - Pure Transparent Monochrome */
.socials-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-btn {
  background: transparent;
  border: none;
  color: #e4e4e7;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.35rem;
  text-decoration: none;
  opacity: 0.82;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-btn:hover {
  background: transparent;
  border: none;
  color: #ffffff;
  opacity: 1;
  transform: translateY(-2px) scale(1.12);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

/* ==========================================================================
   Apple Music Split Player & Live Lyrics Layout
   ========================================================================== */

.apple-music-container {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  height: 480px;
  overflow: hidden;
}

/* Left Panel: Album Art & Controls */
.player-left-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 10px;
}

.album-art-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 250px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.album-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.album-art-wrapper:hover .album-cover {
  transform: scale(1.03);
}

/* Song Metadata */
.song-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.song-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.explicit-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.song-artist {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scrubber Timeline */
.scrubber-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  touch-action: manipulation;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transition: width 0.1s linear;
}

.progress-thumb {
  position: absolute;
  left: 0%;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.progress-bar-track:hover .progress-thumb {
  opacity: 1;
}

.time-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Controls Row */
.playback-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.control-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.control-btn.icon-subtle {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.control-btn.icon-subtle:hover, .control-btn.icon-subtle.active {
  color: #ffffff;
}

.control-btn:hover, .control-btn:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.08);
}

.control-btn.play-main {
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-btn.play-main:hover, .control-btn.play-main:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

/* Volume Bar Row */
.volume-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.vol-icon {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.volume-range-slider {
  flex: 1;
  height: 4px;
  accent-color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  touch-action: manipulation;
}

/* Right Panel: Apple Music Live Lyrics with GPU Acceleration */
.lyrics-right-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.lyrics-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 88%, transparent 100%);
}

.lyrics-scroll {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 10px 0 200px 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.apple-lyric-line {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.3;
  transition: transform 0.25s ease, opacity 0.25s ease;
  cursor: pointer;
  transform-origin: left center;
  touch-action: manipulation;
  will-change: transform, opacity;
}

.apple-lyric-line:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Sequential Word-by-Word Karaoke Elements */
.apple-lyric-word {
  display: inline;
  color: rgba(255, 255, 255, 0.28);
  transition: color 0.15s ease, text-shadow 0.15s ease, opacity 0.15s ease;
}

.apple-lyric-line.active {
  transform: scale(1.02);
}

.apple-lyric-line.active .apple-lyric-word.word-lit {
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.apple-lyric-line.passed .apple-lyric-word {
  color: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Rules
   ========================================================================== */

@media (max-width: 840px) {
  body {
    overflow-y: auto;
    align-items: flex-start;
    padding: 12px 0;
  }

  .main-container {
    padding: 12px;
    gap: 12px;
    max-width: 100%;
  }

  /* Compact Bio Header on Mobile */
  .bio-card {
    padding: 10px 16px;
    border-radius: 16px;
  }

  .username {
    font-size: 1rem;
  }

  .status-subtitle {
    display: none;
  }

  .avatar-wrapper {
    width: 40px;
    height: 40px;
  }

  /* Single Column Stacked Player on Mobile */
  .apple-music-container {
    grid-template-columns: 1fr;
    gap: 20px;
    height: auto;
    padding: 20px 18px;
    border-radius: 20px;
  }

  .player-left-panel {
    align-items: center;
    gap: 14px;
  }

  .album-art-wrapper {
    max-height: 180px;
    max-width: 180px;
    margin: 0 auto;
  }

  .song-meta {
    text-align: center;
    align-items: center;
  }

  .song-artist {
    white-space: normal;
  }

  .lyrics-viewport {
    height: 220px;
  }

  .apple-lyric-line {
    font-size: 1.25rem;
  }

  .progress-thumb {
    opacity: 1;
  }

  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .control-btn.play-main {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .bio-card {
    padding: 8px 14px;
  }

  .bio-card-right {
    gap: 12px;
  }

  .views-widget {
    font-size: 0.78rem;
  }

  .social-btn {
    font-size: 1.2rem;
  }

  .apple-music-container {
    padding: 16px 14px;
  }

  .album-art-wrapper {
    max-height: 150px;
    max-width: 150px;
  }

  .lyrics-viewport {
    height: 190px;
  }

  .apple-lyric-line {
    font-size: 1.15rem;
  }
}
