@charset "UTF-8";

/* Variables */
:root {
  --primary: #0078d7;
  --primary-dark: #005ea6;
  --secondary: #e74c3c;
  --background: #ffffff;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --primary: #3498db;
  --primary-dark: #2980b9;
  --background: #121212;
  --surface: #1e1e1e;
  --text: #f0f0f0;
  --text-secondary: #a0a0a0;
  --border: #333333;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  transition: var(--transition);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
}

/* Header - Centrado */
.header {
  margin-bottom: 2rem;
  text-align: center;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.brand-icon {
  font-size: 2rem;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-align: center;
}

.theme-toggle {
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: absolute;
  top: 20px;
  right: 20px;
}

.theme-toggle:hover {
  transform: rotate(180deg);
  box-shadow: var(--shadow-lg);
}

/* Status Badge - Centrado */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(231, 76, 60, 0.1);
  color: var(--secondary);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 auto 2rem auto;
  animation: pulse 2s infinite;
}

.status-badge.live .status-dot {
  background: var(--secondary);
}

.status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
  display: inline-block;
  animation: blink 1s infinite;
}

.status-badge.offline .status-dot {
  background: #999;
  animation: none;
}

/* Player Card - Carátula + Reproductor en mismo cuadro */
.player-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.player-card-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Carátula en el mismo cuadro */
.album-wrapper {
  width: 100%;
  max-width: 300px;
  height: 300px;
  margin: 0 auto;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  align-self: center;
}

[data-theme="dark"] .album-wrapper {
  background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
}

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

.album-wrapper:hover img {
  transform: scale(1.05);
}

.album-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  opacity: 0.3;
  font-size: 5rem;
}

/* Player Controls en mismo cuadro */
.player-controls-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Play Button + Song Info Container */
.play-info-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.play-button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 120, 215, 0.4);
}

.play-button:hover {
  background: var(--primary-dark);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 120, 215, 0.5);
}

.play-button.playing {
  background: var(--secondary);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
  animation: rotate 2s linear infinite;
}

.play-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Song Info */
.song-info {
  text-align: center;
  width: 100%;
}

.now-playing-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.song-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  min-height: 1.6em;
}

.song-artist {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  min-height: 1.4em;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 300px;
}

.volume-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: var(--transition);
}

.volume-btn:hover {
  color: var(--primary-dark);
  transform: scale(1.1);
}

.volume-slider {
  flex: 1;
  height: 6px;
  border-radius: 10px;
  background: var(--border);
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 120, 215, 0.3);
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 3px 8px rgba(0, 120, 215, 0.5);
}

/* iOS Hint - Centrado */
.ios-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(0, 120, 215, 0.05);
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  text-align: center;
}

.ios-hint i {
  color: var(--primary);
}

.ios-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.ios-link:hover {
  text-decoration: underline;
}

/* Action Buttons - Centrado */
.action-buttons {
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
}

.btn-share {
  background: var(--primary);
  color: white;
}

.btn-share:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
}

/* Social Section - Centrado */
.social-section {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.social-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.social-links a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.social-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px) scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* Footer - Centrado */
.footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.copyright {
  text-align: center;
}

.copyright a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.copyright a:hover {
  text-decoration: underline;
}

.location,
.ip-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.location i,
.ip-info i {
  color: var(--primary);
  font-size: 0.9rem;
}

/* Animations */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

/* Responsive - Versión horizontal en desktop */
@media (min-width: 768px) {
  .player-card-content {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3rem;
  }

  .album-wrapper {
    max-width: 280px;
    height: 280px;
    margin: 0;
    align-self: unset;
  }

  .player-controls-section {
    align-items: flex-start;
    padding-top: 0;
    border-top: none;
    flex: 1;
  }

  .play-info-container {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    width: auto;
  }

  .play-button {
    width: 90px;
    height: 90px;
    font-size: 2.2rem;
  }

  .song-info {
    text-align: left;
    width: auto;
  }

  .song-title {
    font-size: 1.6rem;
  }

  .song-artist {
    font-size: 1.2rem;
  }

  .volume-control {
    width: 100%;
  }
}

/* Responsive - Móvil */
@media (max-width: 767px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .header-content {
    gap: 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .player-card {
    padding: 1.5rem;
  }

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

  .play-button {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }

  .song-title {
    font-size: 1.3rem;
  }

  .song-artist {
    font-size: 1rem;
  }

  .volume-control {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.25rem;
  }

  .social-links a {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    top: 15px;
    right: 15px;
  }

  .footer-content {
    align-items: center;
  }
}