/* Configuración general */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Encabezado */
header {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease;
}

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

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.status-indicator.offline {
    background: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.header-text h1 {
    font-size: 2.5em;
    color: #667eea;
    margin: 0;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-top: 5px;
}

/* Banners de estado */
.status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.online-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.offline-banner {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.online-icon, .offline-icon {
    font-size: 1.3em;
}

/* Barra de información */
.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
    gap: 20px;
}

.info-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1em;
}

/* Contenedor de radios */
#contenedor-radios {
    /* Sin transiciones para evitar parpadeo */
}

.radio-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tarjetas de radio */
.radio-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.radio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.radio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.radio-card h2 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.radio-card h2::before {
    content: '📡';
    font-size: 0.8em;
}

/* Icono de advertencia para radios antiguas */
.warning-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    font-size: 1.2em;
    margin-left: auto;
}

.warning-icon::before {
    content: '⚠️';
}

.warning-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: -45px;
    right: 0;
    background: #ef4444;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.7em;
    white-space: nowrap;
    z-index: 10;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.warning-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ef4444;
}

.warning-icon:hover .warning-tooltip {
    visibility: visible;
    opacity: 1;
}

.timestamp {
    color: #999;
    font-size: 0.95em;
    font-style: italic;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timestamp::before {
    content: '🕐';
    font-size: 1.1em;
}

.radio-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-row strong {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-row span {
    color: #333;
    font-weight: 600;
    font-size: 1.05em;
}

/* TG Badge especial */
.tg-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1em;
}

.tg-badge::before {
    content: '📢';
    font-size: 1.1em;
}

/* Loading spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading p {
    color: #666;
    font-size: 1.1em;
}

/* Mensajes de error */
.error-message {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 15px;
    color: #ef4444;
    font-size: 1.2em;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.offline-message {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 15px;
    color: #f59e0b;
    font-size: 1.2em;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: white;
    font-size: 0.95em;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header-text h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .radio-list {
        grid-template-columns: 1fr;
    }
    
    .info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    header {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.5em;
    }
    
    .radio-card {
        padding: 20px;
    }
}