/* Variables globales para fácil mantenimiento de marca */
:root {
    --bg-color: #080d14;
    --surface-color: rgba(21, 31, 43, 0.5);
    --border-color: rgba(255, 255, 255, 0.05);
    --accent-color: #0076f5;
    --accent-gradient: linear-gradient(135deg, #0076f5 0%, #00c6ff 100%);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --glow: rgba(0, 118, 245, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    position: relative;
}

/* Orbes de luz ambiental de fondo optimizados por hardware */
.ambient-glow-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 118, 245, 0.12) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    animation: pulse-slow 8s infinite ease-in-out;
    z-index: 0;
}

.ambient-glow-2 {
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 198, 255, 0.08) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    animation: pulse-slow 8s infinite ease-in-out;
    animation-delay: 4s;
    z-index: 0;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

/* Header / Navbar optimizado para menor separación vertical */
header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    transition: padding 0.3s ease;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Contenedor optimizado para logos rectangulares */
.brand-logo-wrapper {
    width: 200px;
    height: 75px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-text-container {
    display: flex;
    flex-direction: column;
}

.brand-sub {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 60%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Estado de Directo Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(13, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    transition: all 0.3s ease;
}

.status-text {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #cbd5e1;
    text-transform: uppercase;
}

/* Main Container con espaciado superior ajustado */
main {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px 24px 16px;
    z-index: 10;
}

/* Tarjeta del Reproductor más integrada y estilizada */
.player-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 36px;
    padding: 38px 32px 32px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, margin-top 0.3s ease;
}

.player-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 118, 245, 0.05);
}

.player-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 118, 245, 0.08), transparent);
    pointer-events: none;
    border-radius: 36px;
}

/* Disco de vinilo y visualizador */
.visualizer-wrapper {
    position: relative;
    width: 210px;
    height: 210px;
    margin: 0 auto 28px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glow-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.5s ease;
}

.vinyl-disc {
    position: absolute;
    width: 94%;
    height: 94%;
    border-radius: 50%;
    background: radial-gradient(circle, #1e2d3d 0%, #090e14 70%, #111a24 100%);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #111a24;
    transition: all 0.5s ease;
}

/* Surcos de sonido analógicos */
.groove-1 { position: absolute; inset: 16px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.04); }
.groove-2 { position: absolute; inset: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.03); }
.groove-3 { position: absolute; inset: 48px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.02); }

.center-label {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid #111a24;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.visualizer-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.65;
}

.center-pulsator {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.2);
}

.center-pulsator svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
    animation: pulse-icon 2s infinite ease-in-out;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 15s linear infinite;
}

/* Metadatos */
.meta-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #00c6ff;
    background-color: rgba(0, 198, 255, 0.08);
    padding: 6px 16px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.station-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.station-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 28px;
}

/* Botón de control central */
.controls-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.play-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px var(--glow);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}

.play-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 30px rgba(0, 118, 245, 0.5);
}

.play-btn:active {
    transform: scale(0.96);
}

.play-btn svg {
    width: 30px;
    height: 30px;
    fill: #ffffff;
    transition: transform 0.2s ease;
}

.play-btn svg.play-icon {
    margin-left: 4px;
}

.hidden {
    display: none !important;
}

/* Control de volumen unificado */
.volume-bar {
    width: 100%;
    max-width: 220px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 8px 16px;
    border-radius: 14px;
}

.volume-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.volume-btn:hover {
    color: #ffffff;
}

.volume-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    transition: transform 0.1s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #00c6ff;
}

/* Enlaces auxiliares y footer */
.aux-links {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.aux-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.75rem;
    font-family: inherit;
    transition: color 0.2s ease;
}

.aux-btn:hover {
    color: #ffffff;
}

.aux-btn-feature {
    justify-content: center;
    min-height: 42px;
    padding: 11px 18px;
    border-radius: 14px;
    background-color: rgba(0, 118, 245, 0.08);
    border: 1px solid rgba(0, 198, 255, 0.12);
    color: #cbd5e1;
    font-weight: 700;
}

.aux-btn-feature:hover {
    color: #ffffff;
    border-color: rgba(0, 198, 255, 0.28);
    background-color: rgba(0, 118, 245, 0.14);
}

.aux-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.separator {
    width: 1px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.05);
}

footer {
    width: 100%;
    text-align: center;
    padding: 16px 16px;
    font-size: 0.75rem;
    color: #475569;
    z-index: 10;
}

/* Toast de enlace copiado */
.toast-notification {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 10px);
    background-color: #090e14;
    border: 1px solid #1e293b;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #00c6ff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Estilo dinámico de estados de conexión del directo */
.dot-amber { background-color: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); animation: pulse-dot 1.5s infinite; }
.dot-emerald { background-color: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); animation: pulse-dot 1.8s infinite; }
.dot-rose { background-color: #f43f5e; box-shadow: 0 0 10px rgba(244, 63, 94, 0.5); }

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* MEDIA QUERIES DE AJUSTE DE PROPORCIÓN */

/* Ajustes específicos para pantallas de escritorio o pantallas altas */
@media (min-height: 700px) {
    header {
        padding: 24px 32px 12px 32px;
    }
    main {
        padding-top: 4px;
    }
    .player-card {
        margin-top: -30px;
    }
}

@media (min-height: 850px) {
    .player-card {
        margin-top: -60px;
    }
}

/* Ajustes responsivos para Mobile */
@media (max-width: 768px) {
    header {
        padding: 12px 16px;
    }
    .brand-logo-wrapper {
        width: 120px;
        height: 42px;
    }
    .brand-title {
        font-size: 1rem;
    }
    main {
        padding: 8px 12px 16px 12px;
    }
    .player-card {
        padding: 32px 24px 24px 24px;
        margin-top: 0 !important;
    }
    .visualizer-wrapper {
        width: 190px;
        height: 190px;
        margin-bottom: 24px;
    }
    .station-title {
        font-size: 1.35rem;
    }
}
