@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
}

:root {
    --bg-dark: #00050a;
    --bg-blue: #020d2a;
    --cyan: #00e5ff;
    --purple: #7000ff;
    --magenta: #ff00e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-dark);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ── Contenedor principal ──────────────────────────── */
.player-container {
    position: relative;
    width: 100%;
    height: 100vh; /* Ocupa toda la pantalla inicial */
    max-width: 430px;
    max-height: 932px;
    background-image: url('assets/bg.png');
    background-size: cover;
    background-position: center top;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0; /* Evita que se encoja */
}

.player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly; /* Mejor distribución */
    padding: 2rem 1.5rem 1.5rem;
}

/* ── Logo header ───────────────────────────────────── */
.logo-header {
    width: 100%;
    text-align: center;
}

.main-logo {
    max-width: 300px;
    width: 85%;
    height: auto;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

/* ── Dial + Frecuencia ─────────────────────────────── */
.dial-section {
    text-align: center;
    width: 100%;
}

.dial-image {
    max-width: 260px;
    width: 75%;
    height: auto;
    display: block;
    margin: 0 auto 0.4rem;
}

.acarigua-image {
    max-width: 180px;
    width: 50%;
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 0.9;
}

/* ── Waveform ──────────────────────────────────────── */
.visualizer-section {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waveform-container {
    width: 100%;
    height: 100%;
}

.waveform-svg {
    width: 100%;
    height: 100%;
}

.wave {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: waveFlow 3.5s linear infinite;
    animation-play-state: paused;
}

.wave-2 {
    animation-duration: 4.5s;
    animation-delay: -1.5s;
}

.wave-3 {
    animation-duration: 5s;
    animation-delay: -3s;
}

@keyframes waveFlow {
    from { stroke-dashoffset: 1200; }
    to   { stroke-dashoffset: 0; }
}

/* ── Slogan ────────────────────────────────────────── */
.slogan-section {
    text-align: center;
    width: 100%;
}

.slogan-image {
    max-width: 280px;
    width: 80%;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

/* ── Stats Section ─────────────────────────────────── */
.stats-section {
    text-align: center;
    margin: 0.5rem 0;
}

.stats-container {
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(4px);
}

.count-value {
    display: none; /* Oculto por defecto hasta confirmar señal */
    font-size: 2.2rem; /* Aumentado de 1.6rem a 2.2rem para más impacto */
    font-weight: 900;
    color: #ffff00; /* Amarillo vibrante */
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.count-label {
    display: none; /* Oculto por defecto hasta confirmar señal */
    font-size: 0.6rem;
    color: rgba(255, 255, 0, 0.7); /* Amarillo con opacidad */
    letter-spacing: 1.5px;
    margin-top: 4px;
    font-weight: 600;
}

.stats-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5px;
    font-weight: 500;
    text-transform: capitalize;
}

.verified-badge {
    display: none; /* Oculto por defecto */
    margin-top: 12px;
    background: rgba(0, 255, 127, 0.05);
    border: 1px solid rgba(0, 255, 127, 0.2);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.5rem;
    color: #00ff7f;
    letter-spacing: 1.2px;
    font-weight: 800;
    text-transform: uppercase;
    align-items: center;
    gap: 5px;
    width: fit-content;
}

.badge-icon {
    font-size: 0.7rem;
}

.location-btn {
    margin-top: 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.location-btn.verified {
    background: rgba(0, 255, 127, 0.15);
    border-color: #00ff7f;
    color: #00ff7f;
    pointer-events: none;
}

.location-status {
    margin-top: 8px;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* ── Off-air Banner ────────────────────────────────── */
.offair-message {
    display: none;
    text-align: center;
    padding: 0.45rem 1.2rem;
    border-radius: 8px;
    background: rgba(255, 30, 60, 0.15);
    border: 1px solid rgba(255, 30, 60, 0.4);
    font-size: 0.75rem;
    color: #ff4060;
    letter-spacing: 0.4px;
    animation: fadeIn 0.4s ease;
}

.offair-message.visible {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Botón Play/Pause ──────────────────────────────── */
.controls-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button:hover {
    transform: scale(1.08);
}

.play-button:active {
    transform: scale(0.93);
}

.play-icon {
    width: 110px;
    height: 110px;
    object-fit: contain;
    transition: opacity 0.15s ease;
}

/* Glow cuando está reproduciendo */
.play-button.is-playing {
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.7)) drop-shadow(0 0 40px rgba(112, 0, 255, 0.4));
}

/* Spinner de carga */
.play-button.is-loading::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--cyan);
    animation: spin 0.75s linear infinite;
}

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

/* ── Slider de Volumen ─────────────────────────────── */
.volume-section {
    width: 100%;
    padding: 0 1.5rem;
}

.volume-container {
    width: 100%;
}

.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 20px;
    background: linear-gradient(to right, var(--cyan) 70%, rgba(255,255,255,0.15) 70%);
    outline: none;
    cursor: pointer;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #a0f0ff, var(--cyan));
    cursor: pointer;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0,229,255,0.4);
    transition: box-shadow 0.2s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 16px var(--cyan), 0 0 30px rgba(0,229,255,0.6);
}

.custom-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 10px var(--cyan);
}

.custom-slider::-moz-range-track {
    height: 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
}

/* ── Footer Logos ──────────────────────────────────── */
.footer-logos {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
}

.footer-logo {
    max-height: 28px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.logo-mipana {
    max-height: 44px;
}


/* ── Responsive ────────────────────────────────────── */
@media (max-height: 700px) {
    .player-content   { padding: 1.2rem 1.5rem 1rem; }
    .main-logo        { max-width: 220px; }
    .visualizer-section { height: 100px; }
    .play-icon        { width: 88px; height: 88px; }
    .dial-image       { max-width: 200px; }
}

@media (max-height: 600px) {
    .visualizer-section { height: 70px; }
}

/* ── Active Station Info ───────────────────────────── */
.active-station-info {
    text-align: center;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.freq-text {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--cyan);
    line-height: 1;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    font-style: normal;
}

.city-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

/* ── Selector de Canales (Glassmorphism) ───────────── */
.channel-selector {
    width: 100%;
    margin: 0.5rem 0;
}

.section-title {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.channel-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.channel-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.channel-card.active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--cyan);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
    transform: scale(1.03);
}

.channel-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #444;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: background 0.3s;
}

.channel-card.active .live-indicator {
    background: #ff0055;
    box-shadow: 0 0 8px #ff0055;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 0, 85, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 0, 85, 0); }
}

.channel-freq {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}

.channel-card.active .channel-freq {
    color: var(--cyan);
}

.channel-name {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.channel-card.active .channel-name {
    color: rgba(255, 255, 255, 0.9);
}

/* ── YouTube Integración ───────────────────────────── */
.youtube-section {
    width: 100%;
    margin-top: 0.5rem;
}

.youtube-card {
    display: flex;
    align-items: center;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    padding: 10px 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 12px;
}

.youtube-card:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.yt-icon {
    background: #ff0000;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding-left: 2px; /* Centrar triangulo opticalmente */
}

.yt-text {
    display: flex;
    flex-direction: column;
}

.yt-title {
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.yt-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
}
