/* 
 * Lush Aural Treats - Main Stylesheet (Clean Version)
 * Simplified and optimized CSS architecture
 */

/* CSS Variables and Design System */

/* ===== CSS CUSTOM PROPERTIES ===== */

:root {
  /* Brand colors */
  --primary-color: #16a34a;
  --primary-hover: #15803d;

  /* Text colors */
  --text-dark: #1a202c;
  --text-medium: #4a5568;
  --text-light: #666;
  --text-muted: #718096;

  /* Background colors */
  --bg-light: #f8f9fa;
  --bg-alt: #fafafa;
  --border-color: #e5e7eb;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Border radius */
  --border-radius: 15px;
  --border-radius-sm: 10px;

  /* Transitions */
  --transition: all 0.2s ease;

  /* Safe area insets */
  --safe-area-top: env(safe-area-inset-top);
  --safe-area-bottom: env(safe-area-inset-bottom);
  --safe-area-left: env(safe-area-inset-left);
  --safe-area-right: env(safe-area-inset-right);

  /* Dynamic viewport height */
  --dvh: 1vh;
  --viewport-height: 100vh;
  --supports-dvh: 0;

  /* Component sizes */
  --artwork-size: 150px;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
}

/* Base styles and reset */

/* ===== BASE STYLES & RESET ===== */

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

body {
  background: #f1f5f9;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  padding: var(--safe-area-top) var(--safe-area-right) var(--safe-area-bottom)
    var(--safe-area-left);
  min-height: 100vh;
  min-height: 100dvh;
  color: #1a202c;
  color: var(--text-dark);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
}

/* Viewport utilities */

.dvh-full {
  height: 100vh;
  height: 100dvh;
}

.min-dvh-full {
  min-height: 100vh;
  min-height: 100dvh;
}

/* JS fallback when dvh is not supported */

[data-supports-dvh='0'] .dvh-full {
  height: 100vh;
  height: var(--viewport-height);
}

[data-supports-dvh='0'] .min-dvh-full {
  min-height: 100vh;
  min-height: var(--viewport-height);
}

/* Container */

.container {
  margin: 0 auto;
  padding: 1.5rem;
  padding: var(--space-lg);
  max-width: 1200px;
}

/* Accessibility utility */

.visually-hidden {
  position: absolute !important;
  margin: -1px !important;
  padding: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Theme system */

/* ===== DARK THEME ===== */

[data-theme='dark'] {
  /* Brand colors */
  --primary-color: #818cf8;
  --primary-hover: #a5b4fc;

  /* Text colors */
  --text-dark: #f1f5f9;
  --text-medium: #cbd5e1;
  --text-light: #94a3b8;
  --text-muted: #64748b;

  /* Background colors */
  --bg-light: #1e293b;
  --bg-alt: #0f172a;
  --border-color: #334155;

  /* Enhanced shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] body {
  background: #334155;
  color: #1a202c;
  color: var(--text-dark);
}

/* Track components */

[data-theme='dark'] .track {
  background: rgba(15, 23, 42, 0.6);
}

[data-theme='dark'] .track:nth-child(even) {
  background: rgba(30, 41, 59, 0.4);
}

/* Content sections */

[data-theme='dark'] .email-info,
[data-theme='dark'] .contact-info,
[data-theme='dark'] .tracks-container {
  background: #fafafa;
  background: var(--bg-alt);
}

/* Track content */

[data-theme='dark'] .track-artist {
  color: #4a5568;
  color: var(--text-medium);
}

[data-theme='dark'] .track-album {
  color: #718096;
  color: var(--text-muted);
}

[data-theme='dark'] .track-description {
  color: #666;
  color: var(--text-light);
}

/* Buttons */

[data-theme='dark'] .listen-now-unknown {
  background: #475569;
}

[data-theme='dark'] .listen-now-unknown:hover {
  background: #64748b;
}

/* States */

[data-theme='dark'] .loading,
[data-theme='dark'] .empty-state {
  color: #4a5568;
  color: var(--text-medium);
}

/* Track Cards */

[data-theme='dark'] .track-card {
  border-color: #334155 !important;
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

[data-theme='dark'] .track-card::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

/* OLED optimization */

@media (prefers-color-scheme: dark) and (color-gamut: p3) {
  [data-theme='dark'] {
    --primary-color: #a5b4fc;
  }
}

/* Component styles */

/* ===== COMPONENTS ===== */

/* Button styles */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  gap: var(--space-sm);
  transition: all 0.2s ease;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  border-radius: 15px;
  border-radius: var(--border-radius);
  background: #16a34a;
  background: var(--primary-color);
  padding: 12px 24px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  -webkit-text-decoration: none;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  box-shadow: var(--shadow-md);
  background: #15803d;
  background: var(--primary-hover);
}

/* Card styles */

.card {
  transition: all 0.2s ease;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-sm);
  border-radius: 15px;
  border-radius: var(--border-radius);
  background: white;
  overflow: hidden;
}

/* Theme toggle */

.floating-theme-toggle {
  position: fixed;
  top: 1.5rem;
  top: var(--space-lg);
  right: 1.5rem;
  right: var(--space-lg);
  z-index: 1000;
}

.theme-toggle-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  box-shadow: var(--shadow-md);
  border: 2px solid #e5e7eb;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: white;
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.theme-toggle-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 6px 16px -2px rgba(0, 0, 0, 0.16),
    0 3px 6px rgba(0, 0, 0, 0.12);
}

/* Vinyl icon */

.vinyl-icon {
  position: relative;
  animation: slowSpin 8s linear infinite;
  margin: 0 auto 1rem;
  margin: 0 auto var(--space-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  width: 60px;
  height: 60px;
}

.vinyl-icon:hover {
  animation: fastSpin 2s linear infinite;
}

.vinyl-icon::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #374151;
  width: 12px;
  height: 12px;
  content: '';
}

.vinyl-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(55, 65, 81, 0.4);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  content: '';
}

[data-theme='dark'] .vinyl-icon {
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.4);
}

/* Loading states */

.loading,
.empty-state {
  padding: 3rem;
  padding: var(--space-2xl);
  color: #718096;
  color: var(--text-muted);
  text-align: center;
}

/* ===== HEADER ===== */

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  margin-bottom: var(--space-xl);
  padding: 3rem 1.5rem;
  padding: var(--space-2xl) var(--space-lg);
  color: #1a202c;
  color: var(--text-dark);
  text-align: center;
}

.header h1 {
  margin-bottom: 0;
  font-weight: 400;
  font-size: 3rem;
  letter-spacing: 2px;
}

/* Logo styling */

.brand-logo {
  display: block;
  margin: 0 auto 20px;
  image-rendering: -webkit-optimize-contrast;
  width: max(260px, min(55vw, 900px));
  max-width: 100%;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.brand-logo-light {
  display: block;
  filter: drop-shadow(0 6px 18px rgba(34, 197, 94, 0.35))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.brand-logo-dark {
  display: none;
  filter: drop-shadow(0 6px 18px rgba(99, 102, 241, 0.35))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* Text elements */

.header p {
  color: #4a5568;
  color: var(--text-medium);
  font-size: 1.2rem;
}

.rotating-tagline {
  animation: fadeInTag 0.6s ease;
  margin-top: -10px;
  min-height: 1.1em;
  color: #4a5568;
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

/* Info sections */

.email-info,
.contact-info,
.tracks-container {
  margin-bottom: 1.5rem;
  margin-bottom: var(--space-lg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-sm);
  border-radius: 15px;
  border-radius: var(--border-radius);
  background: #f8f9fa;
  background: var(--bg-light);
  padding: 1.5rem;
  padding: var(--space-lg);
}

.email-info h2,
.contact-info h2 {
  margin-bottom: 1rem;
  margin-bottom: var(--space-md);
  color: #16a34a;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.5rem;
}

.email-info p,
.contact-info p {
  margin-bottom: 0.5rem;
  margin-bottom: var(--space-sm);
  color: #4a5568;
  color: var(--text-medium);
  line-height: 1.6;
}

.email-info a,
.contact-info a {
  color: #16a34a;
  color: var(--primary-color);
  font-weight: 500;
  -webkit-text-decoration: none;
  text-decoration: none;
}

.email-info a:hover,
.contact-info a:hover {
  -webkit-text-decoration: underline;
  text-decoration: underline;
}

/* Dark theme */

[data-theme='dark'] .header {
  color: #666;
  color: var(--text-light, #e2e8f0);
}

[data-theme='dark'] .header p,
[data-theme='dark'] .rotating-tagline {
  color: #666;
  color: var(--text-light, #e2e8f0);
}

[data-theme='dark'] .brand-logo-light {
  display: none;
}

[data-theme='dark'] .brand-logo-dark {
  display: block;
  filter: drop-shadow(0 8px 26px rgba(129, 140, 248, 0.45))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

/* ===== BUTTONS ===== */

/* Listen Now Button Base */

.listen-now-btn,
.listen-now-overlay {
  display: flex;
  position: absolute;
  bottom: 12px;
  left: 50%;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow:
    0 3px 8px -1px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.25);
  border: none;
  border-radius: 16px;
  padding: 8px 16px;
  width: auto;
  min-width: 100px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  -webkit-text-decoration: none;
  text-decoration: none;
}

/* Platform icon inside button */

.btn-platform-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: brightness(0) invert(1); /* Make icons white by default */
}

.btn-text {
  white-space: nowrap;
}

.track-artwork-container:hover .listen-now-btn,
.track-artwork-container:hover .listen-now-overlay {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Platform-specific button colors */

.btn-spotify,
.listen-now-spotify {
  background: #1db954;
  color: white;
}

.btn-spotify:hover,
.listen-now-spotify:hover {
  background: #1ed760;
}

.btn-apple,
.listen-now-apple {
  background: #fc3c44;
  color: white;
}

.btn-apple:hover,
.listen-now-apple:hover {
  background: #ff5a62;
}

.btn-youtube,
.listen-now-youtube {
  background: #f00;
  color: white;
}

.btn-youtube:hover,
.listen-now-youtube:hover {
  background: #f33;
}

.btn-soundcloud,
.listen-now-soundcloud {
  background: #f30;
  color: white;
}

.btn-soundcloud:hover,
.listen-now-soundcloud:hover {
  background: #f53;
}

.btn-unknown,
.listen-now-unknown {
  background: #6b7280;
  color: white;
}

.btn-unknown:hover,
.listen-now-unknown:hover {
  background: #374151;
}

.listen-now-btn .platform-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
  padding: 3px;
  width: 24px;
  height: 24px;
}

.listen-now-btn .platform-icon svg,
.listen-now-btn .platform-icon img {
  width: 18px;
  height: 18px;
}

.listen-now-btn .listen-text {
  position: relative;
  z-index: 2;
  font-size: 12px;
}

.listen-now-btn::after {
  position: absolute;
  opacity: 0;
  transition: opacity 0.4s ease;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.35),
    transparent 70%
  );
  content: '';
}

.listen-now-btn:hover::after {
  opacity: 1;
}

/* Platform-specific colors */

.listen-now-spotify {
  background: #63d861;
  color: white;
}

.listen-now-spotify:hover {
  background: #1ed760;
}

.listen-now-apple {
  background: #fc3c44;
  color: white;
}

.listen-now-apple:hover {
  background: #ff5a62;
}

.listen-now-youtube {
  background: #f00;
  color: white;
}

.listen-now-youtube:hover {
  background: #f33;
}

.listen-now-soundcloud {
  background: #f30;
  color: white;
}

.listen-now-soundcloud:hover {
  background: #f53;
}

.listen-now-unknown {
  background: #6b7280;
  color: white;
}

.listen-now-unknown:hover {
  background: #374151;
}

/* Platform icons */

.platform-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 0.25rem;
  margin-right: var(--space-xs);
  width: 20px;
  height: 20px;
}

.platform-icon img,
.platform-icon svg {
  filter: brightness(0) invert(1);
  width: 16px;
  height: 16px;
}

/* Animation system */

/* ===== ANIMATIONS ===== */

/* Vinyl spinning animations */

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes fastSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes vinylPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.4);
  }

  50% {
    box-shadow: 0 0 30px rgba(129, 140, 248, 0.6);
  }
}

/* Tag fade in animation */

@keyframes fadeInTag {
  from {
    transform: translateY(4px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Track slide in animation */

@keyframes slideInUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Track slide in and fade animation */

@keyframes slideInAndFade {
  0% {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }

  70% {
    transform: translateY(-2px) scale(1.01);
    opacity: 0.8;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Animation utilities */

.animate-slow-spin {
  animation: slowSpin 8s linear infinite;
}

.animate-fast-spin {
  animation: fastSpin 2s linear infinite;
}

.animate-pulse-glow {
  animation: vinylPulse 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeInTag 0.6s ease;
}

.animate-slide-up {
  animation: slideInUp 0.6s ease forwards;
}

.animate-slide-fade {
  animation: slideInAndFade 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Fade animation class for tagline rotation */

.fade {
  animation: fadeInTag 0.6s ease;
}

/* Reduced motion preferences */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .vinyl-icon {
    animation: none;
  }

  .track {
    transform: none;
    opacity: 1;
    animation: none;
  }
}

/* Track cards and mobile responsive styles combined */

/* ===== TRACK CARDS & MOBILE RESPONSIVE ===== */

/* Desktop track cards */

.track-card {
  display: flex;
  position: relative;
  gap: 1.5rem;
  gap: var(--space-lg);
  transform: translateY(20px);
  opacity: 0;
  animation: slideInUp 0.6s ease forwards;
  transition: all 0.2s ease;
  transition: var(--transition);
  margin-bottom: 1.5rem;
  margin-bottom: var(--space-lg);
  border: 1px solid #e5e7eb;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  border-radius: var(--border-radius);
  background: #f8f9fa;
  background: var(--bg-light);
  padding: 1.5rem;
  padding: var(--space-lg);
}

.track-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-lg);
}

/* Animation delays */

.track-card:nth-child(1) {
  animation-delay: 0.1s;
}

.track-card:nth-child(2) {
  animation-delay: 0.2s;
}

.track-card:nth-child(3) {
  animation-delay: 0.3s;
}

.track-card:nth-child(4) {
  animation-delay: 0.4s;
}

.track-card:nth-child(5) {
  animation-delay: 0.5s;
}

.track-card:nth-child(n + 6) {
  animation-delay: 0.6s;
}

/* Track content layout */

.track-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* Artwork container */

.track-artwork-container {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 10px;
  border-radius: var(--border-radius-sm);
  width: 150px;
  width: var(--artwork-size, 120px);
  height: 150px;
  height: var(--artwork-size, 120px);
  overflow: hidden;
}

.track-artwork {
  transition: all 0.2s ease;
  transition: var(--transition);
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.track-artwork-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    135deg,
    #16a34a,
    var(--secondary-color)
  );
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  width: 100%;
  height: 100%;
  color: white;
  font-size: 2.5rem;
}

.track-artwork-container:hover .track-artwork {
  transform: scale(1.05);
}

/* Track header information */

.track-header-line {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  gap: var(--space-xs);
  margin-bottom: 1rem;
  margin-bottom: var(--space-md);
}

.track-title {
  margin: 0;
  color: #1a202c;
  color: var(--text-dark);
  font-weight: 700;
  font-size: max(1.125rem, min(2.5vw, 1.25rem));
  line-height: 1.2;
}

.track-artist {
  margin: 0;
  color: #4a5568;
  color: var(--text-medium);
  font-weight: 500;
  font-size: max(1rem, min(2vw, 1.125rem));
}

.track-inline-meta {
  margin: 0;
  color: #718096;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Track description */

.track-description {
  flex-grow: 1;
  margin: 0.5rem 0;
  margin: var(--space-sm) 0;
  color: #4a5568;
  color: var(--text-medium);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.description-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.description-full {
  display: none;
}

.track-description:not(.collapsed) .description-preview {
  display: none;
}

.track-description:not(.collapsed) .description-full {
  display: block;
}

.read-more-btn {
  cursor: pointer;
  margin-top: 0.25rem;
  margin-top: var(--space-xs);
  border: none;
  background: transparent;
  padding: 0;
  color: #16a34a;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  -webkit-text-decoration: underline;
  text-decoration: underline;
  text-transform: uppercase;
}

.read-more-btn:hover {
  color: #15803d;
  color: var(--primary-hover);
}

/* Track footer */

.track-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  padding-top: var(--space-sm);
}

/* Platform badge */

.platform-badge {
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 20px;
  padding: 0.375rem 0.75rem;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  -webkit-text-decoration: none;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
}

.platform-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.platform-badge.spotify {
  background: #63d861;
}

.platform-badge.spotify:hover {
  background: #1ed760;
}

.platform-badge.apple {
  background: #000;
}

.platform-badge.apple:hover {
  background: #333;
}

.platform-badge.youtube {
  background: #f00;
}

.platform-badge.youtube:hover {
  background: #f33;
}

.platform-badge.soundcloud {
  background: #f50;
}

.platform-badge.soundcloud:hover {
  background: #f53;
}

.platform-badge.unknown {
  background: #6b7280;
}

.platform-badge.unknown:hover {
  background: #374151;
}

/* Genre tags */

.genre-tag {
  display: inline-block;
  border: 1px solid #e5e7eb;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #f8f9fa;
  background: var(--bg-light);
  padding: 0.25rem 0.625rem;
  color: #4a5568;
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: lowercase;
  white-space: nowrap;
}

[data-theme='dark'] .genre-tag {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #666;
  color: var(--text-light);
}

.track-timestamp {
  color: #718096;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8125rem;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */

/* Base mobile optimizations */

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
     -moz-text-size-adjust: 100%;
          text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* iOS Safari optimizations */

@supports (-webkit-touch-callout: none) {
  body {
    padding: max(env(safe-area-inset-top), 0) max(env(safe-area-inset-right), 0)
      max(env(safe-area-inset-bottom), 0) max(env(safe-area-inset-left), 0);
    min-height: -webkit-fill-available;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Touch device hover fixes */

@media (hover: none) and (pointer: coarse) {
  .listen-now-overlay:hover {
    transform: translateY(100%);
    opacity: 0;
  }

  .track-card:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    box-shadow: var(--shadow-md);
  }
}

/* Mobile responsive design */

@media (max-width: 768px) {
  .container {
    padding: 1rem max(0.5rem, min(4vw, 1rem));
  }

  /* Header adjustments */
  .header {
    margin-bottom: 1rem;
    padding: 1rem 0;
    text-align: center;
  }

  .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .brand-logo {
    margin-bottom: 0.5rem;
    /* Maximize width for full logo display */
    width: calc(100vw - 1rem) !important;
    max-width: 98vw !important;
    min-width: 0 !important;
    height: auto;
  }

  .rotating-tagline {
    margin-top: 0.25rem;
    font-size: max(0.85rem, min(3.5vw, 1rem));
    line-height: 1.3;
    text-align: center;
  }

  /* Mobile track card layout */
  #tracks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .track-card {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    border: 1px solid #e5e7eb;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    background: var(--bg-light);
    padding: 1rem;
    min-height: 120px;
  }

  .track-artwork-container {
    flex: 0 0 80px;
    border-radius: 8px;
    width: 80px;
    height: 80px;
  }

  .track-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
  }

  .track-header-line {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0;
  }

  .track-title {
    display: -webkit-box;
    font-weight: 600;
    font-size: max(1rem, min(4.2vw, 1.1rem));
    line-height: 1.25;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
  }

  .track-artist {
    overflow: hidden;
    color: #4a5568;
    color: var(--text-medium);
    font-size: max(0.825rem, min(3.5vw, 0.9rem));
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .track-inline-meta {
    overflow: hidden;
    color: #718096;
    color: var(--text-muted);
    font-size: max(0.75rem, min(3.2vw, 0.8rem));
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .track-description {
    flex-grow: 0;
    flex-shrink: 1;
    margin: 0.25rem 0;
    font-size: max(0.8rem, min(3.4vw, 0.85rem));
    line-height: 1.4;
  }

  .track-description .description-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
  }

  .read-more-btn {
    flex-shrink: 0;
    margin: 0.25rem 0 0;
    padding: 0.25rem 0;
    touch-action: manipulation;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .track-footer {
    display: flex;
    flex-shrink: 0;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    min-height: 32px;
  }

  .platform-badge {
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }

  .track-timestamp {
    font-size: 0.75rem;
  }

  /* Content sections */
  .email-info,
  .contact-info {
    margin: 1rem 0;
    border-radius: 15px;
    border-radius: var(--border-radius);
    padding: 1rem;
  }

  .email-info h2,
  .contact-info h2 {
    margin-bottom: 0.75rem;
    font-size: max(1.2rem, min(5vw, 1.4rem));
    line-height: 1.2;
  }

  .email-info p,
  .contact-info p {
    font-size: max(0.9rem, min(3.8vw, 1rem));
    line-height: 1.5;
  }

  /* Theme toggle */
  .floating-theme-toggle {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top) + 1rem);
    right: max(1rem, env(safe-area-inset-right) + 1rem);
    z-index: 100;
  }

  .theme-toggle-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    box-shadow: var(--shadow-md);
    border: 1px solid #e5e7eb;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: #f8f9fa;
    background: var(--bg-light);
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* Small mobile devices */

@media (max-width: 480px) {
  .container {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .track-card {
    gap: 0.75rem;
    padding: 0.75rem;
    min-height: 100px;
  }

  .track-artwork-container {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
  }

  .track-content {
    gap: 0.375rem;
  }

  .track-footer {
    padding-top: 0.375rem;
    min-height: 28px;
  }
}

/* Very small devices */

@media (max-width: 360px) {
  .container {
    padding: 1rem 0.5rem;
  }

  .brand-logo {
    /* Maximum width for very small screens */
    width: calc(100vw - 1rem) !important;
    max-width: 99vw !important;
    min-width: 0 !important;
  }

  .track-card {
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .track-artwork-container {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
  }

  .track-title {
    font-size: max(0.9rem, min(3.8vw, 0.95rem));
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .track-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: 0.25rem;
    padding-top: 0.25rem;
  }

  .platform-badge {
    padding: 0.15rem 0.35rem;
    font-size: 0.6rem;
  }

  .track-timestamp {
    font-size: 0.65rem;
  }
}

/* Landscape orientation fixes */

@media (max-height: 500px) and (orientation: landscape) {
  .header {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.25rem;
  }

  .brand-logo {
    margin-bottom: 0.25rem;
    /* Show full logo even in landscape */
    width: min(60vw, 350px);
  }

  .rotating-tagline {
    margin-top: 0.25rem;
    font-size: 0.8rem;
  }

  .track-card {
    padding: 0.5rem 0.75rem;
  }
}

/* Animations */

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== AUDIO PLAYER STYLES ===== */

/* Track actions container */

.track-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Preview play button */

.preview-play-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid #16a34a;
  border: 2px solid var(--primary-color);
  border-radius: 20px;
  background: transparent;
  padding: 6px 12px;
  min-width: 80px;
  height: 32px;
  color: #16a34a;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.75rem;
}

/* Default fallback hover state */

.preview-play-btn:hover {
  transform: scale(1.05);
  background: #16a34a;
  background: var(--primary-color);
  color: white;
}

/* Platform-specific preview button colors */

.preview-btn-spotify {
  border-color: #1db954;
  color: #1db954;
}

.preview-btn-spotify:hover {
  transform: scale(1.05);
  background: #1db954;
  color: white;
}

.preview-btn-apple {
  border-color: #fc3c44;
  color: #fc3c44;
}

.preview-btn-apple:hover {
  transform: scale(1.05);
  background: #fc3c44;
  color: white;
}

.preview-btn-youtube {
  border-color: #f00;
  color: #f00;
}

.preview-btn-youtube:hover {
  transform: scale(1.05);
  background: #f00;
  color: white;
}

.preview-btn-soundcloud {
  border-color: #f30;
  color: #f30;
}

.preview-btn-soundcloud:hover {
  transform: scale(1.05);
  background: #f30;
  color: white;
}

.preview-btn-unknown {
  border-color: #6b7280;
  color: #6b7280;
}

.preview-btn-unknown:hover {
  transform: scale(1.05);
  background: #6b7280;
  color: white;
}

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

.preview-play-btn:disabled {
  transform: none;
  opacity: 0.6;
  cursor: not-allowed;
}

.preview-play-btn .preview-icon {
  font-size: 0.875rem;
}

.preview-play-btn .preview-text {
  font-weight: 600;
  font-size: 0.75rem;
}

/* Track states during preview */

.track-card.preview-playing {
  border-color: #16a34a;
  border-color: var(--primary-color);
  background: linear-gradient(135deg, #f8f9fa, rgba(59, 130, 246, 0.05));
  background: linear-gradient(135deg, var(--bg-light), rgba(59, 130, 246, 0.05));
}

.track-card.preview-playing .preview-btn-spotify {
  animation: pulse 2s infinite;
  background: #1db954;
  color: white;
}

.track-card.preview-playing .preview-btn-apple {
  animation: pulse 2s infinite;
  background: #fc3c44;
  color: white;
}

.track-card.preview-playing .preview-btn-youtube {
  animation: pulse 2s infinite;
  background: #f00;
  color: white;
}

.track-card.preview-playing .preview-btn-soundcloud {
  animation: pulse 2s infinite;
  background: #f30;
  color: white;
}

.track-card.preview-playing .preview-btn-unknown {
  animation: pulse 2s infinite;
  background: #6b7280;
  color: white;
}

.track-card.preview-loading {
  opacity: 0.8;
}

/* Now playing indicator */

.now-playing-indicator {
  display: none;
  animation: fadeIn 0.3s ease;
  margin-top: 0.5rem;
  color: #16a34a;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.8rem;
}

/* Audio player animations */

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

@keyframes fadeIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile responsive adjustments for audio controls */

@media (max-width: 768px) {
  .preview-play-btn {
    padding: 4px 8px;
    min-width: 70px;
    height: 28px;
    font-size: 0.7rem;
  }

  .preview-play-btn .preview-icon {
    font-size: 0.75rem;
  }

  .preview-play-btn .preview-text {
    font-size: 0.7rem;
  }

  .track-actions {
    gap: 0.375rem;
  }
}

@media (max-width: 480px) {
  .preview-play-btn {
    gap: 2px;
    padding: 4px 6px;
    min-width: 60px;
    height: 24px;
    font-size: 0.65rem;
  }

  .preview-play-btn .preview-icon {
    font-size: 0.7rem;
  }

  .preview-play-btn .preview-text {
    font-size: 0.65rem;
  }
}
