* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #0f172a;
  --card: rgba(30, 41, 59, 0.85);
  --primary: #3b82f6;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center; /* Centrado horizontal absoluto */
  align-items: flex-start; /* Alineación superior para scroll natural */
  padding: 0;
  margin: 0;
}

.app {
  width: 100%;
  max-width: 480px; /* Evita que se estire en PC */
  margin: 0 auto; /* LA CLAVE: fuerza el centrado horizontal */
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
}

.header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.install-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.install-btn:active { transform: scale(0.95); }
.hidden { display: none !important; }

.player {
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 2.5rem 1.5rem;
  margin-top: 1rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cover {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem; /* Centrado del disco */
  border-radius: 50%;
  overflow: visible;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: transform 0.3s;
}

.cover.playing img {
  animation: rotate 15s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  pointer-events: none;
}

.cover.playing .pulse {
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 0; }
}

.info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.status {
  color: var(--text-dim);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 1.5em;
}

.status.live { color: var(--success); font-weight: 600; }
.status.live::before {
  content: '●';
  font-size: 0.6rem;
  animation: blink 1.5s infinite;
}
.status.connecting { color: var(--warning); }
.status.error { color: var(--error); }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.controls {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.play-btn:active { 
  transform: scale(0.92); 
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.volume {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
}

.volume input {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  outline: none;
}

.volume input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* REDES SOCIALES */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.social-btn:hover {
  transform: translateY(-4px);
  color: white;
}

.social-btn:hover svg {
  transform: scale(1.1);
}

.social-btn.facebook:hover { 
  background: #1877F2; 
  border-color: #1877F2; 
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
}
.social-btn.instagram:hover { 
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
  border-color: transparent; 
  box-shadow: 0 8px 20px rgba(220, 39, 67, 0.3);
}
.social-btn.whatsapp:hover { 
  background: #25D366; 
  border-color: #25D366; 
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* BANNER iOS */
.ios-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.3);
  animation: slideUp 0.5s ease-out;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ios-install-banner p {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}

.ios-install-banner strong {
  color: var(--primary);
}

.close-ios-banner {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}