:root {
    --primary: #0056b3;
    --success: #28a745;
    --gray: #f4f7f6;
    --border-color: #ddd;
}

body { 
    font-family: 'Segoe UI', sans-serif; 
    background: #cbd3da; 
    padding: 20px; 
}

.container { 
    max-width: 850px; 
    background: white; 
    margin: auto; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
}

header { 
    border-bottom: 4px solid var(--primary); 
    margin-bottom: 25px; 
    text-align: center; 
}

.data-section { 
    background: var(--gray); 
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    border: 1px solid var(--border-color);
}

.input-row { 
    display: flex; 
    gap: 20px; 
    margin-bottom: 15px; 
}

.input-group { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

label { 
    font-size: 0.9rem; 
    font-weight: bold; 
    margin-bottom: 5px; 
    color: #555; 
}

input[type="text"] { 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
}

.btn-start {
    background: var(--primary);
    color: white;
    padding: 12px;
    border: none;
    width: 100%;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
}

.btn-start:hover { 
    opacity: 0.9; 
}

.btn-primary { 
    background: var(--success); 
    color: white; 
    width: 100%; 
    padding: 15px; 
    border: none; 
    margin-top: 20px; 
    border-radius: 5px; 
    cursor: pointer; 
    font-size: 1rem; 
}

.question {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.question p {
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.question label {
    display: block; 
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: normal; 
}

.question label:hover {
    background-color: #f0f4f8;
    border-color: var(--primary);
}

.question input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.match-group label {
    display: flex;
    justify-content: baseline;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 5px 0;
}

.hidden { 
    display: none; 
}

.btn-pdf, .btn-print {
    padding: 15px 25px; 
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    color: white;
}

.btn-pdf:hover, .btn-print:hover {
    transform: scale(1.05); 
}

@media print {
    .btn-pdf, .btn-print, .btn-primary, .btn-start, #setup, header p, .logos {
        display: none !important;
    }
    body { background: white; padding: 0; }
    .container { box-shadow: none; border: none; max-width: 100%; }
    .results-card { border: none !important; box-shadow: none !important; }
}


@media (max-width: 768px) {
    .draggable-word {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    .drop-zone {
        padding: 20px;
    }
}

/* ============ DRAG & DROP MEJORADO ============ */

/* Título del banco */
.bank-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Contenedor del banco de palabras */
.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
    border-radius: 12px;
    border: 2px dashed #94a3b8;
    min-height: 100px;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

/* Cada palabra como "chip" interactivo */
.draggable-word {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 12px 22px;
    border-radius: 25px;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    cursor: grab;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 3px 8px rgba(0, 86, 179, 0.15), 
                            0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

/* Efecto brillo al pasar el ratón */
.draggable-word::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.5s;
}

.draggable-word:hover::before {
    left: 100%;
}

.draggable-word:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #0077cc 100%);
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.35), 
                            0 3px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-dark);
}

/* Estado mientras se arrastra */
.draggable-word.dragging {
    opacity: 0.4;
    cursor: grabbing;
    transform: scale(0.95);
}

/* Estado cuando ya está usada */
.draggable-word.used {
    opacity: 0.25;
    cursor: not-allowed;
    text-decoration: line-through;
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #6b7280;
    box-shadow: none;
    transform: scale(0.95);
}

/* Zona de destino (drop zone) */
.drop-zone {
    margin: 20px 0;
    padding: 20px 30px;
    border: 3px dashed var(--primary);
    border-radius: 16px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Efecto cuando se arrastra una palabra sobre la zona */
.drop-zone.drag-over {
    background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
    border-color: var(--primary-dark);
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.2);
}

/* Texto de ayuda dentro de la zona vacía */
.drop-hint {
    color: #64748b;
    font-style: italic;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drop-hint::before {
    content: '🎯';
    font-size: 1.3rem;
    font-style: normal;
}

/* Palabra colocada en la zona */
.dropped-word {
    background: linear-gradient(135deg, var(--success) 0%, #20c997 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    letter-spacing: 0.3px;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Botón para quitar la palabra */
.remove-word {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.remove-word:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: rotate(90deg) scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .draggable-word {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    .drop-zone {
        padding: 15px 20px;
    }
    .word-bank {
        gap: 8px;
        padding: 15px;
    }
}