* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --light-text: #e0e0e0;
    --accent-color: #FFD93D;
    --success-color: #6BCB77;
    --danger-color: #FF6B6B;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, #1a2a3a 100%);
    color: var(--light-text);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(78, 205, 196, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.03);
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

@media (max-width: 600px) {
    .site-logo { width: 42px; height: 42px; }
    .header h1 { font-size: 1.4em; }
}

.header h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* User Info */
.user-info {
    background: rgba(107, 203, 119, 0.1);
    border: 1px solid rgba(107, 203, 119, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--success-color);
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), #FF8E8E);
    color: white;
}

.btn-signup {
    background: linear-gradient(135deg, var(--secondary-color), #5DDBCA);
    color: white;
}

.btn-logout {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    color: white !important;
    display: none !important;
}

.btn-logout.show {
    display: inline-block !important;
}

.btn-add-radio {
    background: linear-gradient(135deg, var(--accent-color), #FFE66D);
    color: #333;
    font-size: 1.1em;
    width: 100%;
    padding: 15px;
    margin-bottom: 30px;
}

/* Botón pequeño reutilizable */
.btn-small {
    padding: 6px 10px;
    font-size: 0.85em;
    border-radius: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Si se quiere versión pequeña del addRadio (anular width:100%) */
.btn-add-radio.btn-small {
    width: auto;
    padding: 8px 12px;
    font-size: 0.95em;
    margin-bottom: 0;
}

.btn-save {
    background: linear-gradient(135deg, var(--success-color), #7FDD8F);
    color: white;
    flex: 1;
}

.btn-cancel {
    background: linear-gradient(135deg, #666, #888);
    color: white;
    flex: 1;
}

.btn-save:hover, .btn-cancel:hover {
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-auth {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 1.8em;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--light-text);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-color);
}

/* Formulario */
.radio-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light-text);
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.form-group input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

.form-group small {
    margin-top: 5px;
    font-size: 0.85em;
    color: rgba(224, 224, 224, 0.6);
}

.form-group select {
    min-height: 120px;
}

.form-group select option {
    background: var(--dark-bg);
    color: var(--light-text);
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Grid de Radios */
.radios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.radio-card {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08) 0%, rgba(78, 205, 196, 0.08) 100%);
    border: 1px solid rgba(255, 107, 107, 0.15);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
}

.radio-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 107, 107, 0.3);
    margin: 0 auto 12px auto;
}

.radio-logo.default {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
}

/* Vista previa de logo en formularios */
.logo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 8px auto 0 auto;
    border: 2px solid rgba(255,255,255,0.08);
}

.radio-card h3 {
    color: var(--accent-color);
    margin: 0;
    font-size: 1.1em;
    line-height: 1.3;
    text-align: center;
}

.radio-countries {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.8em;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

.country-badge {
    background: rgba(78, 205, 196, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
}

.radio-player {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 25px;
    overflow: hidden;
    margin: 0;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.radio-player audio {
    width: 100%;
    height: 40px;
    background: transparent;
    border-radius: 20px;
}

.social-links {
    display: flex;
    gap: 6px;
    margin: 0;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 107, 107, 0.2);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95em;
}

.social-link:hover {
    background: rgba(255, 107, 107, 0.4);
    transform: scale(1.08);
}

.social-link.facebook { background: rgba(59, 89, 152, 0.25); color: #3B5998; }
.social-link.whatsapp { background: rgba(37, 211, 102, 0.25); color: #25D366; }
.social-link.youtube { background: rgba(255, 0, 0, 0.25); color: #FF0000; }
.social-link.website { background: rgba(78, 205, 196, 0.25); color: var(--secondary-color); }

.radio-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.radio-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.85em;
}

.btn-edit {
    background: linear-gradient(135deg, var(--secondary-color), #5DDBCA);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, var(--danger-color), #FF8E8E);
    color: white;
}

.btn-edit:hover, .btn-delete:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Empty Message */
.empty-message {
    text-align: center;
    padding: 40px;
    background: rgba(255, 107, 107, 0.1);
    border: 2px dashed rgba(255, 107, 107, 0.3);
    border-radius: 15px;
    color: rgba(224, 224, 224, 0.7);
    font-size: 1.1em;
}

.add-radio-section {
    margin-bottom: 30px;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .auth-buttons {
        width: 100%;
        flex-direction: column;
    }

    /* Mejorar espaciado y alineación de botones en móviles */
    .auth-buttons {
        gap: 10px;
        align-items: center;
        justify-content: center;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .radios-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 90%;
    }

    .radio-card {
        padding: 15px;
    }
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.radio-card {
    animation: slideIn 0.3s ease-out;
}

/* Estados de autenticación */
.authenticated .btn-logout {
    display: inline-block;
}

.authenticated .btn-login,
.authenticated .btn-signup {
    display: none;
}

.not-authenticated .btn-logout {
    display: none;
}
