:root {
	--bg: #333;
	--card: #0f0f12;
	--accent: #6366f1;
	--text-main: #ffffff;
	--text-dim: #94a3b8;
	--surface-light: rgba(255, 255, 255, 0.05);
}

body {
	font-family: 'Plus Jakarta Sans', sans-serif;
	background: var(--bg);
	color: var(--text-main);
	margin: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	padding: 20px;
}

/* Contenedor Principal */
.player-frame {
	width: 100%;
	max-width: 950px;
	background: var(--card);
	border-radius: 40px;
	padding: 30px;
	display: flex;
	gap: 40px;
	align-items: center;
	box-shadow: 0 50px 100px -20px rgba(0,0,0,1);
	border: 1px solid rgba(255,255,255,0.03);
	overflow: hidden;
}

/* Sección Izquierda: Portada */
.left-col {
	flex: 0 0 280px;
}

.cover-wrapper {
	width: 100%;
	aspect-ratio: 1/1;
	position: relative;
}

#mainCover {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 30px;
	box-shadow: 0 20px 40px rgba(0,0,0,0.5);
	border: 1px solid rgba(255,255,255,0.1);
	transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Sección Derecha: Todo el contenido */
.right-col {
	flex: 1;
	min-width: 0; /* CRÍTICO: Evita que el contenido empuje el ancho */
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.header-meta {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

.status-badge {
	padding: 8px 16px;
	background: rgba(99, 102, 241, 0.1);
	border-radius: 100px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--accent);
}

#contentTitle { 
	font-size: 32px; 
	font-weight: 800; 
	margin: 10px 0 5px; 
	letter-spacing: -1.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis; 
}

#stationName { 
	font-size: 15px; 
	color: var(--text-dim); 
	font-weight: 500; 
}

/* Fila de controles y tiempo */
.controls-row {
	display: flex;
	align-items: center;
	gap: 25px;
	margin: 10px 0;
}

.playback-meta {
	flex: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--surface-light);
	padding: 15px 25px;
	border-radius: 20px;
}

#timer { 
	font-size: 22px; 
	font-weight: 700; 
	color: var(--accent); 
	font-variant-numeric: tabular-nums; 
}

/* Visualizador de barras */
.viz-bars { display: flex; gap: 4px; align-items: flex-end; height: 20px; }
.bar { width: 3px; height: 4px; background: var(--accent); border-radius: 2px; }
.active .bar { animation: barPulse 0.8s infinite ease-in-out; }

@keyframes barPulse { 
	0%, 100% { height: 4px; } 
	50% { height: 20px; opacity: 0.6; } 
}

.main-btn {
	width: 75px;
	height: 75px;
	border-radius: 25px;
	background: var(--text-main);
	border: none;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: 0.3s;
	flex-shrink: 0;
}

.main-btn:hover { transform: scale(1.08); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }

/* Carrusel de Señales (Anti-desborde) */
.signals-grid {
	display: flex;
	gap: 15px;
	overflow-x: auto;
	padding: 15px 0 10px;
	border-top: 1px solid rgba(255,255,255,0.05);
	scrollbar-width: thin;
	scrollbar-color: var(--accent) transparent;
	/* Máscara para avisar que hay más señales */
	-webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
	mask-image: linear-gradient(to right, black 90%, transparent 100%);
}

.signals-grid::-webkit-scrollbar { height: 4px; }
.signals-grid::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

.sig-item {
	flex: 0 0 auto; /* Importante para que no se encojan */
	background: var(--surface-light);
	padding: 10px 20px;
	border-radius: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid transparent;
	transition: 0.3s;
}

.sig-item:hover { background: rgba(255,255,255,0.1); }
.sig-item.active { border-color: var(--accent); background: rgba(99, 102, 241, 0.15); }

.sig-item img { width: 35px; height: 35px; border-radius: 10px; object-fit: cover; }
.sig-item span { font-size: 13px; font-weight: 700; white-space: nowrap; }

/* Volumen oculto pero funcional para el JS */
#volume { display--: none; }

 /* Estilo del Slider de Volumen */
#volume {
	flex: 0 0 100px;
	accent-color: var(--accent);
	height: 4px;
	cursor: pointer;
	outline: none;
	opacity: 0.7;
	transition: opacity 0.3s;
}
#volume:hover { opacity: 1; }

/* Adaptación Móvil */
/*@media (max-width: 850px) {
	.player-frame { flex-direction: column; text-align: center; max-width: 450px; }
	.left-col { flex: 0 0 auto; width: 100%; }
	.header-meta { flex-direction: column; align-items: center; }
	.controls-row { flex-direction: column; }
	.playback-meta { width: 100%; box-sizing: border-box; }
}*/

/* ==========================================
   MODO MÓVIL (TRANSFORMACIÓN A VERTICAL)
   ========================================== */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    .player-frame {
        flex-direction: column; /* Cambia de fila a columna */
        padding: 25px;
        gap: 0px;
        max-width: 400px; /* Tamaño típico de smartphone */
    }

    .left-col {
        flex: 0 0 auto;
        width: 100%;
    }

    #mainCover {
        border-radius: 25px;
    }

    .right-col {
        width: 100%;
		gap: 0px;
        text-align: center; /* Centramos textos para el modo vertical */
    }

    .header-meta {
        flex-direction: column;
        align-items: center;
        gap: 0px;
    }

    #contentTitle {
        font-size: 26px; /* Un poco más pequeño para que no rompa */
        white-space: normal; /* Permitimos que baje de línea si es muy largo */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .controls-row {
        flex-direction: column-reverse; /* El botón de play abajo o arriba según gustes */
        gap: 10px;
    }

    .playback-meta {
        width: 100%;
        box-sizing: border-box;
        padding: 15px;
    }

    #volume {
        max-width: none; /* Que use el espacio necesario */
    }

    .main-btn {
        width: 80px; /* Un poco más grande para que sea fácil tocarlo con el dedo */
        height: 80px;
    }
}