/* Estilos específicos para Tiempo Real */

.realtime-container {
    max-width: 1400px;
}

.models-grid-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.models-grid-section h2 {
    color: var(--dark);
    margin-bottom: 25px;
    font-size: 1.5em;
}

/* Mejorar Grid */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    animation: fadeIn 0.5s;
}

.model-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(155, 89, 182, 0.15);
    border-color: var(--primary-color);
}

.model-card[data-status="public"] {
    border-left: 4px solid var(--online);
}

.model-card[data-status="private"] {
    border-left: 4px solid var(--warning-color);
}

.model-card[data-status="away"] {
    border-left: 4px solid var(--warning-color);
}

.model-card[data-status="offline"] {
    border-left: 4px solid var(--offline);
    opacity: 0.85;
}

.model-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(155,89,182,0.05), rgba(52,152,219,0.05));
    border-bottom: 1px solid var(--border);
}

.model-card-header h3 {
    font-size: 1.1em;
    margin: 0;
    color: var(--dark);
    word-break: break-word;
}

.model-card-avatar {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

.model-card:hover .model-card-avatar {
    transform: scale(1.05);
}

.model-card-info {
    padding: 15px;
    background: white;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.9em;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

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

.info-row .value {
    color: var(--text);
    text-align: right;
    flex: 1;
    margin-left: 10px;
}

.model-card-actions {
    display: flex;
    gap: 5px;
    padding: 12px;
    background: #f8f9fa;
    border-top: 1px solid var(--border);
    justify-content: space-around;
}

.btn-icon {
    background: white;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95em;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-icon.btn-danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

/* Activity Section */
.activity-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-top: 30px;
}

.activity-section h2 {
    color: var(--dark);
    margin-bottom: 20px;
}

#activityChart {
    min-height: 400px;
}

/* Status Indicators con animación */
.status-badge {
    position: relative;
    animation: pulse 2s infinite;
}

.status-public::before,
.status-online::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--online);
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.status-offline::before {
    animation: none;
}

/* Loading States */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Empty State Styling */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(155,89,182,0.05), rgba(52,152,219,0.05));
    border-radius: 10px;
    border: 2px dashed var(--border);
}

.empty-state p {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 20px;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .models-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    .realtime-header {
        flex-direction: column;
    }

    .header-controls {
        width: 100%;
        flex-direction: column;
    }

    .header-controls .btn {
        width: 100%;
    }

    .filters-section {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .model-card-actions {
        flex-direction: column;
    }

    .btn-icon {
        width: 100%;
    }
}

/* Animaciones de entrada */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    animation: slideInUp 0.4s ease-out forwards;
}

.model-card:nth-child(1) { animation-delay: 0.05s; }
.model-card:nth-child(2) { animation-delay: 0.1s; }
.model-card:nth-child(3) { animation-delay: 0.15s; }
.model-card:nth-child(4) { animation-delay: 0.2s; }
.model-card:nth-child(5) { animation-delay: 0.25s; }
.model-card:nth-child(n+6) { animation-delay: 0.3s; }

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Estilos para notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
