.arpe-player,
.arpe-player * {
    box-sizing: border-box;
}

.arpe-player {
    --arpe-accent: #ff7a00;
    --arpe-bg: #101010;
    --arpe-text: #f5f5f5;
    --arpe-muted: #b7b7b7;

    width: 100%;
    min-height: 84px;
    padding: 13px 26px;
    display: grid;
    grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 1.6fr) minmax(190px, .8fr);
    align-items: center;
    gap: 26px;

    color: var(--arpe-text);
    background:
        radial-gradient(circle at 14% 10%, rgba(255,255,255,.035), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,.018), rgba(0,0,0,.04)),
        var(--arpe-bg);

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 13px;
    box-shadow: 0 12px 40px rgba(0,0,0,.38);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    position: relative;
    overflow: hidden;
    z-index: 99999;
}

.arpe-fixed {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    z-index: 999999;
}

.arpe-square,
.arpe-fixed.arpe-square {
    border-radius: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

.arpe-left,
.arpe-center,
.arpe-right {
    min-width: 0;
    display: flex;
    align-items: center;
}

.arpe-left {
    gap: 15px;
}

.arpe-play {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
    border: 3px solid var(--arpe-accent);
    background: #050505;
    color: var(--arpe-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow:
        0 0 0 4px rgba(255,122,0,.08),
        0 5px 16px rgba(0,0,0,.35);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.arpe-play:hover {
    transform: scale(1.045);
    box-shadow:
        0 0 0 5px rgba(255,122,0,.12),
        0 6px 20px rgba(0,0,0,.42);
}

.arpe-play:focus-visible,
.arpe-volume-btn:focus-visible {
    outline: 2px solid var(--arpe-accent);
    outline-offset: 3px;
}

.arpe-play svg {
    width: 27px;
    height: 27px;
    fill: currentColor;
}

.arpe-play-icon {
    display: inline-flex;
    margin-left: 3px;
}

.arpe-pause-icon {
    display: none;
}

.arpe-player.is-playing .arpe-play-icon {
    display: none;
}

.arpe-player.is-playing .arpe-pause-icon {
    display: inline-flex;
}

.arpe-player.is-playing .arpe-play {
    background: var(--arpe-accent);
    color: #111;
}

.arpe-cover-wrap {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    position: relative;
}

.arpe-cover {
    width: 48px;
    height: 48px;
    display: block;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.10);
    background: #090909;
}

.arpe-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.arpe-cover-empty svg {
    width: 24px;
    height: 24px;
    fill: var(--arpe-accent);
}

.arpe-live-dot {
    width: 9px;
    height: 9px;
    position: absolute;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: var(--arpe-accent);
    border: 2px solid var(--arpe-bg);
    box-shadow: 0 0 10px rgba(255,122,0,.75);
}

.arpe-player.is-playing .arpe-live-dot {
    animation: arpe-pulse 1.5s ease-in-out infinite;
}

@keyframes arpe-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.42); opacity: .6; }
}

.arpe-meta {
    min-width: 0;
    line-height: 1.15;
}

.arpe-title-row {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.arpe-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--arpe-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 245px;
}

.arpe-subtitle {
    color: var(--arpe-muted);
    font-size: 12px;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.arpe-live-badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 3px;
    color: #fff;
    background: var(--arpe-accent);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .7px;
}

.arpe-center {
    gap: 10px;
    justify-content: center;
}

.arpe-time {
    color: var(--arpe-muted);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.arpe-progress {
    height: 4px;
    flex: 1 1 auto;
    min-width: 100px;
    background: rgba(255,255,255,.18);
    border-radius: 999px;
    position: relative;
}

.arpe-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: var(--arpe-accent);
    border-radius: 999px;
}

.arpe-progress-dot {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--arpe-accent);
    box-shadow: 0 0 8px rgba(255,122,0,.55);
}

.arpe-player.is-playing .arpe-progress-fill {
    animation: arpe-live-progress 18s linear infinite alternate;
}

.arpe-player.is-playing .arpe-progress-dot {
    animation: arpe-live-dot-progress 18s linear infinite alternate;
}

@keyframes arpe-live-progress {
    from { width: 6%; }
    to   { width: 94%; }
}

@keyframes arpe-live-dot-progress {
    from { left: 6%; }
    to   { left: 94%; }
}

.arpe-right {
    justify-content: flex-end;
    gap: 13px;
}

.arpe-listeners {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--arpe-muted);
    font-size: 11px;
    white-space: nowrap;
}

.arpe-listeners svg {
    width: 15px;
    height: 15px;
    fill: var(--arpe-muted);
}

.arpe-volume-btn {
    width: 29px;
    height: 29px;
    border: 0;
    background: transparent;
    color: var(--arpe-muted);
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.arpe-volume-btn svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.arpe-volume-off {
    display: none;
}

.arpe-player.is-muted .arpe-volume-on {
    display: none;
}

.arpe-player.is-muted .arpe-volume-off {
    display: block;
}

.arpe-volume {
    width: 78px;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: linear-gradient(
        to right,
        var(--arpe-accent) 0%,
        var(--arpe-accent) var(--arpe-volume-percent, 80%),
        rgba(255,255,255,.18) var(--arpe-volume-percent, 80%),
        rgba(255,255,255,.18) 100%
    );
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}

.arpe-volume::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    background: var(--arpe-accent);
}

.arpe-volume::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    background: var(--arpe-accent);
}

.arpe-equalizer {
    position: absolute;
    right: 12px;
    bottom: 8px;
    height: 13px;
    display: none;
    align-items: flex-end;
    gap: 2px;
    opacity: .85;
}

.arpe-player.is-playing .arpe-equalizer {
    display: flex;
}

.arpe-equalizer i {
    width: 2px;
    height: 5px;
    display: block;
    background: var(--arpe-accent);
    animation: arpe-eq .65s ease-in-out infinite alternate;
}

.arpe-equalizer i:nth-child(2) { animation-delay: .14s; }
.arpe-equalizer i:nth-child(3) { animation-delay: .29s; }
.arpe-equalizer i:nth-child(4) { animation-delay: .08s; }

@keyframes arpe-eq {
    from { height: 3px; }
    to   { height: 12px; }
}

.arpe-hide-listeners .arpe-listeners {
    display: none;
}

.arpe-hide-volume .arpe-volume-btn,
.arpe-hide-volume .arpe-volume {
    display: none;
}

.arpe-admin-warning {
    padding: 14px 16px;
    border-left: 4px solid #d63638;
    background: #fff;
    color: #1d2327;
}

@media (max-width: 900px) {
    .arpe-player {
        grid-template-columns: minmax(250px, 1fr) minmax(170px, .9fr);
        gap: 18px;
    }

    .arpe-center {
        display: none;
    }
}

@media (max-width: 620px) {
    .arpe-player {
        min-height: 72px;
        padding: 10px 12px;
        grid-template-columns: 1fr auto;
        gap: 10px;
        border-radius: 9px;
    }

    .arpe-fixed {
        left: 6px;
        right: 6px;
        bottom: 6px;
    }

    .arpe-play {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .arpe-cover-wrap,
    .arpe-cover {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .arpe-left {
        gap: 9px;
    }

    .arpe-title {
        font-size: 12px;
        max-width: 150px;
    }

    .arpe-subtitle {
        font-size: 10px;
        max-width: 160px;
    }

    .arpe-live-badge {
        font-size: 8px;
        padding: 3px 5px;
    }

    .arpe-listeners,
    .arpe-volume {
        display: none;
    }

    .arpe-right {
        gap: 2px;
    }
}

@media (max-width: 420px) {
    .arpe-cover-wrap {
        display: none;
    }

    .arpe-title {
        max-width: 128px;
    }

    .arpe-subtitle {
        max-width: 140px;
    }
}


/* ===== V3: mantiene exactamente la escala compacta de la V1 ===== */

/* Play/Pause sin círculo grande: icono amarillo limpio */
.arpe-play {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--arpe-accent);
    box-shadow: none;
}

.arpe-play:hover {
    transform: scale(1.04);
    box-shadow: none;
    background: transparent;
}

.arpe-player.is-playing .arpe-play {
    background: transparent;
    color: var(--arpe-accent);
}

.arpe-play svg {
    width: 38px;
    height: 38px;
}

/* Portada: mantiene el tamaño pequeño/original */
.arpe-cover-wrap,
.arpe-cover {
    width: 54px;
    height: 54px;
}

.arpe-cover-wrap {
    flex: 0 0 54px;
}

.arpe-cover {
    border-radius: 7px;
    object-fit: cover;
}

/* Punto + etiqueta amarilla arriba, sin aumentar la barra */
.arpe-station-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 3px;
    min-width: 0;
}

.arpe-status-dot {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border-radius: 50%;
    background: #ff666b;
    box-shadow: 0 0 0 3px #666d76;
}

.arpe-player.is-playing .arpe-status-dot {
    animation: arpe-status-pulse 1.35s ease-in-out infinite;
}

@keyframes arpe-status-pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: .72; transform: scale(1.06); }
}

.arpe-station-badge {
    display: inline-flex;
    align-items: center;
    max-width: 190px;
    height: 21px;
    padding: 0 7px;
    border-radius: 5px;
    background: var(--arpe-accent);
    color: #050505;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Canción + artista, conservando tamaño compacto */
.arpe-meta {
    min-width: 0;
}

.arpe-title {
    max-width: 260px;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--arpe-text);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arpe-subtitle {
    max-width: 260px;
    margin-top: 0;
    font-size: 13px;
    line-height: 1.15;
    font-weight: 700;
    color: var(--arpe-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ocultamos el antiguo punto de la portada para no duplicarlo */
.arpe-live-dot {
    display: none;
}

/* Móvil: conservar compacto */
@media (max-width: 620px) {
    .arpe-play {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .arpe-play svg {
        width: 31px;
        height: 31px;
    }

    .arpe-cover-wrap,
    .arpe-cover {
        width: 46px;
        height: 46px;
    }

    .arpe-cover-wrap {
        flex-basis: 46px;
    }

    .arpe-station-badge {
        max-width: 135px;
        height: 19px;
        font-size: 10px;
    }

    .arpe-title {
        max-width: 155px;
        font-size: 12px;
    }

    .arpe-subtitle {
        max-width: 155px;
        font-size: 11px;
    }
}


/* ===== V6: fondo glass / frosted ===== */
.arpe-player {
    background: linear-gradient(135deg, rgba(255,255,255,0.20), rgba(255,255,255,0.08)) !important;
    border: 1px solid rgba(255,255,255,0.28) !important;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.22) !important;
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.arpe-fixed {
    background: transparent !important;
}

.arpe-player::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.20), rgba(255,255,255,0.03)),
        radial-gradient(circle at top left, rgba(255,255,255,0.20), transparent 38%);
    pointer-events: none;
    z-index: 0;
}

.arpe-player > * {
    position: relative;
    z-index: 1;
}

.arpe-cover {
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}

.arpe-play {
    background: rgba(255,255,255,0.10) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    border-radius: 50% !important;
    box-shadow:
        0 4px 14px rgba(0,0,0,0.14),
        inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

.arpe-player.is-playing .arpe-play {
    background: rgba(255,255,255,0.16) !important;
    color: var(--arpe-accent);
}

.arpe-title {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.arpe-subtitle,
.arpe-time,
.arpe-listeners,
.arpe-volume-btn {
    color: rgba(255,255,255,0.88) !important;
}

.arpe-listeners svg,
.arpe-volume-btn svg {
    fill: currentColor !important;
}

.arpe-progress {
    background: rgba(255,255,255,0.22) !important;
}

.arpe-volume {
    background: linear-gradient(
        to right,
        var(--arpe-accent) 0%,
        var(--arpe-accent) var(--arpe-volume-percent, 80%),
        rgba(255,255,255,.24) var(--arpe-volume-percent, 80%),
        rgba(255,255,255,.24) 100%
    ) !important;
}

.arpe-bottom-line {
    background: rgba(255,255,255,0.18) !important;
    border-top: 1px solid rgba(255,255,255,0.18) !important;
}

.arpe-bottom-fill {
    background: linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.95)) !important;
}

.arpe-station-badge {
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

@media (max-width: 620px) {
    .arpe-player {
        background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07)) !important;
        backdrop-filter: blur(14px) saturate(145%);
        -webkit-backdrop-filter: blur(14px) saturate(145%);
    }
}


/* ===== V8: reproductor abajo; subir solo Play y barra ===== */

/* Mantener el reproductor fijo ABAJO */
.arpe-fixed {
    top: auto !important;
    bottom: 14px !important;
}

/* Versión sin bordes/márgenes */
.arpe-square,
.arpe-fixed.arpe-square {
    top: auto !important;
    bottom: 0 !important;
}

/* Subir únicamente el botón Play dentro del reproductor */
.arpe-play {
    transform: translateY(-5px);
}

.arpe-play:hover {
    transform: translateY(-5px) scale(1.04);
}

/* Subir la barra/progreso central dentro del reproductor */
.arpe-center {
    transform: translateY(-5px);
}

/* En móvil mantenerlo abajo y subir suavemente los controles */
@media (max-width: 620px) {
    .arpe-fixed {
        top: auto !important;
        bottom: 6px !important;
    }

    .arpe-play {
        transform: translateY(-3px);
    }

    .arpe-play:hover {
        transform: translateY(-3px) scale(1.04);
    }

    .arpe-center {
        transform: translateY(-3px);
    }
}


/* ===== V9: botón Play/Pause negro ===== */
.arpe-play {
    background: rgba(0, 0, 0, 0.92) !important;
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.95) !important;
    box-shadow:
        0 6px 18px rgba(0,0,0,0.22),
        inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.arpe-play:hover {
    background: rgba(0, 0, 0, 0.98) !important;
    color: #ffffff !important;
}

.arpe-player.is-playing .arpe-play {
    background: rgba(0, 0, 0, 0.98) !important;
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 1) !important;
}


/* ===== V10: rayitas del ecualizador más arriba ===== */
.arpe-equalizer {
    left: 28px !important;
    right: auto !important;
    bottom: 22px !important;
    top: auto !important;
    height: 16px !important;
    gap: 3px !important;
}

.arpe-equalizer i {
    width: 3px !important;
    border-radius: 1px;
}

@media (max-width: 620px) {
    .arpe-equalizer {
        left: 18px !important;
        bottom: 18px !important;
        height: 14px !important;
    }
}


/* ===== V11: mover rayitas al costado de los contadores ===== */
.arpe-equalizer {
    left: auto !important;
    right: 170px !important;
    bottom: 50% !important;
    top: auto !important;
    transform: translateY(50%) !important;
    height: 16px !important;
    gap: 3px !important;
}

.arpe-equalizer i {
    width: 3px !important;
    border-radius: 1px;
}

@media (max-width: 900px) {
    .arpe-equalizer {
        right: 145px !important;
    }
}

@media (max-width: 620px) {
    .arpe-equalizer {
        right: 12px !important;
        bottom: 50% !important;
        transform: translateY(50%) !important;
        height: 14px !important;
    }
}


/* ===== V12: altura fija al reproducir ===== */

/*
 * El fondo glass usa .arpe-player > * { position: relative; }
 * Esa regla hacía que el ecualizador entrara en el grid al aparecer.
 * Lo forzamos nuevamente a absolute para que no cambie la altura.
 */
.arpe-player > .arpe-equalizer {
    position: absolute !important;
    left: auto !important;
    right: 170px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    z-index: 3 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;
}

/* Evitar que el contenido cambie la altura general */
.arpe-player {
    min-height: 84px;
}

.arpe-left,
.arpe-center,
.arpe-right {
    align-self: center;
}

/* Mantener los textos en una sola línea para que no agranden el reproductor */
.arpe-title,
.arpe-subtitle {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Responsive */
@media (max-width: 900px) {
    .arpe-player > .arpe-equalizer {
        right: 145px !important;
    }
}

@media (max-width: 620px) {
    .arpe-player > .arpe-equalizer {
        right: 12px !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
    }
}


/* ===== V13: separar ecualizador y quitar cuadrado ===== */

/* mover un poco el ecualizador para que no quede pegado al contador */
.arpe-player > .arpe-equalizer {
    right: 132px !important;
}

/* quitar el cuadrado morado/slider de volumen */
.arpe-volume {
    display: none !important;
}

/* por limpieza también ocultamos el botón de volumen */
.arpe-volume-btn {
    display: none !important;
}

/* reajuste responsive */
@media (max-width: 900px) {
    .arpe-player > .arpe-equalizer {
        right: 118px !important;
    }
}

@media (max-width: 620px) {
    .arpe-player > .arpe-equalizer {
        right: 12px !important;
    }
}
