/* 
 * Echofy Modern OLED Glassmorphism Design System
 * Pure CSS3 with variables, grid, flexbox, and backdrop filters
 */

:root {
  --bg-primary: #07070a;
  --bg-surface: rgba(18, 18, 28, 0.7);
  --bg-surface-hover: rgba(28, 28, 44, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-card: rgba(20, 20, 32, 0.65);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(168, 85, 247, 0.4);

  --accent-purple: #8b5cf6;
  --accent-fuchsia: #d946ef;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #d946ef 100%);
  --accent-emerald-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.45);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-glow: 0 12px 40px rgba(139, 92, 246, 0.25);
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Gradient Mesh */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 90%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
  filter: blur(60px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-purple);
}

.nav-btn {
  padding: 10px 20px;
  background: var(--accent-gradient);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

/* Dynamic Shared Item Banner (When link contains track / jam / playlist) */
#shared-item-section {
  display: none;
  padding: 48px 0 24px;
}

.shared-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-glow), var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.shared-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.shared-media-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.shared-art {
  width: 220px;
  height: 220px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-glass);
}

.shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shared-badge.jam {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.shared-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.shared-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.shared-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.btn-open-app {
  flex: 1;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--accent-gradient);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-open-app:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(139, 92, 246, 0.55);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Jam Room Display */
.jam-code-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.jam-code-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #34d399;
  font-family: monospace;
}

.btn-copy {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: rgba(16, 185, 129, 0.35);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-full);
  color: #d8b4fe;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.pill-dot {
  width: 8px;
  height: 8px;
  background: #a855f7;
  border-radius: 50%;
  box-shadow: 0 0 10px #a855f7;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(40px, 6.5vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 20%, #c084fc 60%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subhead {
  font-size: clamp(17px, 2.5vw, 21px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  font-weight: 400;
}

/* Hero CTA Buttons */
.hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--accent-gradient);
  color: white;
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: 0 10px 35px rgba(139, 92, 246, 0.45);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 45px rgba(139, 92, 246, 0.6);
}

.btn-playstore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.btn-playstore:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.btn-drive {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-drive:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-3px);
}

/* Sound Wave Animation */
.wave-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  margin: 16px 0 32px;
}

.wave-bar {
  width: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  animation: waveMotion 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.wave-bar:nth-child(2) { height: 24px; animation-delay: 0.3s; }
.wave-bar:nth-child(3) { height: 36px; animation-delay: 0.5s; }
.wave-bar:nth-child(4) { height: 18px; animation-delay: 0.2s; }
.wave-bar:nth-child(5) { height: 30px; animation-delay: 0.4s; }
.wave-bar:nth-child(6) { height: 14px; animation-delay: 0.6s; }

@keyframes waveMotion {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

/* Features Grid */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.15);
}

.feature-icon-box {
  width: 56px;
  height: 56px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon-box svg {
  width: 28px;
  height: 28px;
  fill: #c084fc;
}

.feature-card h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

/* Download Center */
.download-section {
  background: linear-gradient(180deg, transparent 0%, rgba(18, 18, 30, 0.4) 100%);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.downloads-wrapper {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 48px;
  backdrop-filter: blur(20px);
}

.download-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.download-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: white;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.download-tile:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-purple);
  transform: translateY(-4px);
}

.tile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.tile-icon {
  width: 44px;
  height: 44px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon svg {
  width: 22px;
  height: 22px;
  fill: #c084fc;
}

.tile-title {
  font-size: 17px;
  font-weight: 600;
}

.tile-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.tile-action {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Footer */
footer {
  background: #050508;
  border-top: 1px solid var(--border-glass);
  padding: 56px 0 36px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 36px;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Toast Notification */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(18, 18, 28, 0.95);
  border: 1px solid var(--accent-purple);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .shared-card {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
  .shared-art {
    width: 160px;
    height: 160px;
  }
  .hero {
    padding: 48px 0 36px;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-primary, .btn-playstore, .btn-drive {
    width: 100%;
    justify-content: center;
  }
  .downloads-wrapper {
    padding: 24px;
  }
  .nav-links {
    display: none;
  }
}
