/**
 * Estilos para el Reproductor de Radio
 * 
 * Este archivo contiene todos los estilos para el reproductor de radio.
 * Estos son exactamente los mismos estilos del diseño original.
 */

:root {
    --color-primary: #4a6cf7; /* Color principal */
    --color-secondary: #f8f9fa; /* Color secundario */
    --color-text: #212529; /* Color de texto */
    --color-accent: #ff6b6b; /* Color de acento */
    --color-background: #ffffff; /* Color de fondo */
    --color-card: #ffffff; /* Color de tarjetas */
    --color-shadow: rgba(0, 0, 0, 0.08); /* Sombras */
    --border-radius: 12px; /* Radio de bordes */
    --transition-speed: 0.3s; /* Velocidad de transiciones */
    --padding-container: 20px; /* Padding contenedor */
}

/* Reset y estilos base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f9fafb;
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--color-text);
}

.stations-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .stations-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card de estación */
.station-card {
    background: var(--color-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 20px var(--color-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.station-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.station-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary) 70%, #7789ff);
    color: white;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.station-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.2) 0%, transparent 60%);
}

.station-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.station-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.station-frequency {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.station-status {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4caf50;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

.station-logo {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    background-color: white;
    padding: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Cuerpo del reproductor */
.player-body {
    padding: 20px;
}

.player-controls {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.play-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-speed);
    flex-shrink: 0;
    position: relative;
}

.play-btn:hover {
    background: var(--color-accent);
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.98);
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.player-info {
    flex-grow: 1;
}

.now-playing-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 3px;
}

.track-title {
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}

.track-artist {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Barra de progreso */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    height: 4px;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    width: 0%;
    transition: width 1s linear;
    border-radius: 4px;
}

/* Controles secundarios */
.secondary-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    flex: 1;
}

.volume-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    opacity: 0.7;
    cursor: pointer;
}

.volume-icon:hover {
    opacity: 1;
}

.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--color-accent);
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--color-accent);
}

.extra-controls {
    display: flex;
    gap: 12px;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    opacity: 1;
}

.control-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--color-text);
}

/* Animaciones */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.loading .spinner {
    display: block;
}

.loading .play-icon,
.loading .pause-icon {
    display: none;
}

/* Pie de página */
.footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #121212;
        --color-card: #1e1e1e;
        --color-text: #e0e0e0;
        --color-shadow: rgba(0, 0, 0, 0.25);
    }
    
    body {
        background-color: var(--color-background);
    }
    
    .station-header {
        background: linear-gradient(135deg, var(--color-primary), #424bac);
    }
    
    .volume-slider {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .progress-bar {
        background-color: rgba(255, 255, 255, 0.08);
    }
    
    .control-btn svg {
        fill: var(--color-text);
    }
}

/* Animación de radiación para el botón de play */
.play-btn {
    position: relative;
}

.play-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--color-primary);
    z-index: -1;
    opacity: 0.6;
    transform: scale(0);
    transition: transform 0.5s ease-out;
}

.play-btn.playing::after {
    animation: radiateWaves 2s infinite;
}

@keyframes radiateWaves {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Estilo para la visualización de volumen */
.volume-level {
    display: inline-block;
    width: 30px;
    text-align: right;
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Tooltip para botones */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Tema claro forzado si es necesario */
.light-theme {
    --color-background: #f9fafb;
    --color-card: #ffffff;
    --color-text: #212529;
    --color-shadow: rgba(0, 0, 0, 0.08);
}

/* Notificaciones */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.error {
    background-color: #e74c3c;
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

/* Responsive y ajustes adicionales */
@media (max-width: 576px) {
    .station-name {
        font-size: 1.2rem;
    }
    
    .play-btn {
        width: 48px;
        height: 48px;
    }
    
    .station-logo {
        width: 50px;
        height: 50px;
        right: 15px;
    }
    
    .player-body {
        padding: 15px;
    }
    
    .extra-controls {
        gap: 8px;
    }
}

/* Estilos para pantallas grandes con 3 columnas */
@media (min-width: 1200px) {
    .stations-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Estilos para el panel de administración */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    margin-bottom: 30px;
    text-align: center;
}

.admin-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.admin-description {
    color: #666;
    margin-bottom: 20px;
}

.admin-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stations-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.stations-table th,
.stations-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stations-table th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 500;
}

.stations-table tr:last-child td {
    border-bottom: none;
}

.stations-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.stations-table tr:hover {
    background-color: #f0f0f0;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #3a58d6;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #d35400;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
}

.status-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    animation: fadeOut 5s forwards;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Formulario */
.form-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--color-primary);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive para admin */
@media (max-width: 768px) {
    .stations-table {
        display: block;
        overflow-x: auto;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}