/* ========================================
   BONCHEM.IN - Link-in-Bio & Smartlinks
   Modern Dark Theme
======================================== */

/* CSS Variables */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-2: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Container */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Profile Section */
.profile {
  text-align: center;
  margin-bottom: 2.5rem;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--border);
  margin-bottom: 1.25rem;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.avatar:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.profile h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.profile .bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 300px;
  margin: 0 auto;
}

/* Links Container */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  flex: 1;
}

/* Link Button */
.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-1);
  opacity: 0;
  transition: var(--transition);
}

.link-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.link-btn:hover::before {
  opacity: 0.1;
}

.link-btn:active {
  transform: translateY(0);
}

.link-btn svg,
.link-btn .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.link-btn span {
  position: relative;
  z-index: 1;
}

/* Platform-specific colors */
.link-btn[data-platform="spotify"]:hover { border-color: #1db954; }
.link-btn[data-platform="apple"]:hover { border-color: #fc3c44; }
.link-btn[data-platform="deezer"]:hover { border-color: #feaa2d; }
.link-btn[data-platform="youtube"]:hover { border-color: #ff0000; }
.link-btn[data-platform="soundcloud"]:hover { border-color: #ff5500; }
.link-btn[data-platform="instagram"]:hover { border-color: #e1306c; }
.link-btn[data-platform="tiktok"]:hover { border-color: #00f2ea; }
.link-btn[data-platform="twitter"]:hover { border-color: #1da1f2; }

/* Player Page Specific */
.player-container {
  text-align: center;
}

.cover-art {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.cover-art:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-glow);
}

.song-info {
  margin-bottom: 2rem;
}

.song-info h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  letter-spacing: -0.02em;
}

.song-info .artist {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.streaming-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Back to home link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-top: 2rem;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--text-primary);
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error State */
.error-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.error-message h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0 1rem;
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--accent);
}

/* Responsive */
@media (min-width: 640px) {
  .container {
    padding: 3rem 2rem;
  }
  
  .avatar {
    width: 130px;
    height: 130px;
  }
  
  .profile h1 {
    font-size: 2rem;
  }
  
  .cover-art {
    max-width: 360px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

.links .link-btn {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}

.links .link-btn:nth-child(1) { animation-delay: 0.1s; }
.links .link-btn:nth-child(2) { animation-delay: 0.15s; }
.links .link-btn:nth-child(3) { animation-delay: 0.2s; }
.links .link-btn:nth-child(4) { animation-delay: 0.25s; }
.links .link-btn:nth-child(5) { animation-delay: 0.3s; }
.links .link-btn:nth-child(6) { animation-delay: 0.35s; }
.links .link-btn:nth-child(7) { animation-delay: 0.4s; }
.links .link-btn:nth-child(8) { animation-delay: 0.45s; }
