/* ============= CONTAINER PRINCIPAL ============= */
.carga-coleccion-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

/* ============= HEADER ============= */
.coleccion-header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 15px;
}

.coleccion-header h1 {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: bold;
}

.coleccion-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* ============= STATS ============= */
.stats-coleccion {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stat-item.tengo {
    border-top: 4px solid #4caf50;
}

.stat-item.falta {
    border-top: 4px solid #ff9800;
}

.stat-item .numero {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-item .label {
    display: block;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============= PROGRESO CIRCULAR ============= */
.progreso-stat {
    padding: 0 !important;
}

.progress-circular {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-progress {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 6;
}

.progress-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

/* ============= CONTROLES ============= */
.controles-coleccion {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filtros {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 15px;
    margin-bottom: 15px;
}

.input-buscar,
.select-filtro {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.input-buscar:focus,
.select-filtro:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.acciones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-tengo {
    background: #4caf50;
    color: white;
}

.btn-tengo:hover {
    background: #45a049;
    transform: scale(1.02);
}

.btn-falta {
    background: #ff9800;
    color: white;
}

.btn-falta:hover {
    background: #e68900;
    transform: scale(1.02);
}

.btn-desmarcar {
    background: #999;
    color: white;
}

.btn-desmarcar:hover {
    background: #777;
    transform: scale(1.02);
}

.btn-exportar {
    background: #2196f3;
    color: white;
}

.btn-exportar:hover {
    background: #1976d2;
    transform: scale(1.02);
}

.btn-cargar {
    background: #667eea;
    color: white;
    min-width: 150px;
}

.btn-cargar:hover {
    background: #764ba2;
    transform: scale(1.02);
}

/* ============= GRID DE FIGURITAS ============= */
.figuritas-grid-coleccion {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.figuritas-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.figu-item {
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.figu-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.figu-item.tengo {
    background: #f1f8e9;
    border-color: #4caf50;
}

.figu-item.falta {
    background: #fff3e0;
    border-color: #ff9800;
}

.figu-item.sin-marcar {
    background: #f5f5f5;
    border-color: #ccc;
}

.figu-estado-icon {
    font-size: 20px;
    margin-bottom: 5px;
    height: 24px;
}

.figu-codigo {
    font-weight: bold;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
    word-break: break-word;
}

.figu-nombre {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.figu-botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.btn-tengo-mini,
.btn-falta-mini {
    padding: 4px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: white;
    transition: all 0.2s ease;
}

.btn-tengo-mini {
    background: #4caf50;
}

.btn-tengo-mini:hover {
    background: #45a049;
    transform: scale(1.1);
}

.btn-falta-mini {
    background: #ff9800;
}

.btn-falta-mini:hover {
    background: #e68900;
    transform: scale(1.1);
}

/* ============= LOADING ============= */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* ============= PROGRESO POR PAÍS ============= */
.progreso-por-pais {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progreso-por-pais h2 {
    color: #333;
    margin-top: 0;
}

.tabla-progreso {
    width: 100%;
    border-collapse: collapse;
}

.tabla-progreso th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.tabla-progreso td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.tabla-progreso tr:hover {
    background: #f9f9f9;
}

.tabla-progreso tr.completo {
    background: #f1f8e9;
}

.tabla-progreso tr.avanzado {
    background: #f0f4c3;
}

.tabla-progreso tr.intermedio {
    background: #fff9c4;
}

.tabla-progreso tr.inicial {
    background: #ffe0b2;
}

.progress-bar-mini {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar-mini .progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
    .figuritas-row {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .acciones {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-coleccion {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .carga-coleccion-container {
        padding: 10px;
    }
    
    .coleccion-header {
        padding: 20px;
    }
    
    .coleccion-header h1 {
        font-size: 24px;
    }
    
    .filtros {
        grid-template-columns: 1fr;
    }
    
    .acciones {
        grid-template-columns: 1fr;
    }
    
    .figuritas-row {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
    
    .figu-codigo {
        font-size: 12px;
    }
    
    .progress-circular {
        width: 120px;
        height: 120px;
    }
    
    .progress-text {
        font-size: 24px;
    }
}

/* ============= ANIMACIONES ============= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.figu-item {
    animation: fadeIn 0.3s ease;
}

/* ============= SCROLLBAR ============= */
.figuritas-grid-coleccion::-webkit-scrollbar {
    width: 8px;
}

.figuritas-grid-coleccion::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.figuritas-grid-coleccion::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.figuritas-grid-coleccion::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}