/* ==================== VARIABLES GLOBALES ==================== */
:root {
    --primary: #2563eb;
    --secondary: #10b981;
    --error: #ef4444;
    --background: #f8fafc;
    --text: #1e293b;
    --shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

.dark-mode {
    --background: #1a1a1a;
    --text: #e5e7eb;
    --primary: #3b82f6;
    --secondary: #10b981;
}

/* ==================== ESTILOS BASE ==================== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--text);
    transition: var(--transition);
}

#validadorWhatsApp {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 200px;
}

/* ==================== CONTENEDOR PRINCIPAL ==================== */
.container {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin: 2rem auto;
    position: relative;
}

/* ==================== PANEL DE ESTADÍSTICAS ==================== */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    background: rgba(234, 242, 255, 0.3);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* ==================== FORMULARIO Y CONTROLES ==================== */
.upload-section {
    border: 2px dashed rgba(203, 215, 226, 0.5);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    transition: var(--transition);
}

.upload-section:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.03);
}

.delay-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.delay-controls input {
    width: 100px;
    padding: 0.8rem;
    border: 2px solid rgba(203, 215, 226, 0.5);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

/* ==================== BOTONES ==================== */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 2rem 0;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #0282C8, #0369a1);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* ==================== TABLA DE RESULTADOS ==================== */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--background);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(209, 217, 227, 0.3);
}

.results-table th {
    background-color: rgba(248, 250, 252, 0.9);
    font-weight: 700;
}

.thumbnail-cell {
    width: 120px;
    text-align: center;
}

.profile-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.profile-thumbnail:hover {
    transform: scale(2.5);
    z-index: 100;
    position: relative;
}

/* ==================== PAGINACIÓN ==================== */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
}

.pagination-btn {
    min-width: 100px;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
}

/* ==================== FOOTER PROFESIONAL ==================== */
.wp-validador-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
    backdrop-filter: blur(8px);
    z-index: 9999;
}

.dark-mode .wp-validador-footer {
    background: rgba(16, 24, 39, 0.97);
    border-color: #374151;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .stats-panel {
        grid-template-columns: 1fr;
    }

    .results-table {
        display: block;
        overflow-x: auto;
    }

    .profile-thumbnail {
        width: 60px;
        height: 60px;
    }

    .wp-validador-footer {
        position: static;
        margin-top: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ==================== ANIMACIONES ==================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    animation: spin 1s linear infinite;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
}

/* ==================== UTILIDADES ==================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center !important;
}

.mt-2 {
    margin-top: 2rem !important;
}