:root {
    --primary: #0056b3;
    --primary-dark: #003d82;
    --success: #28a745;
    --danger: #d32f2f;
    --gray: #f4f7f6;
    --border-color: #ddd;
}

* {
    box-sizing: border-box;
}

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

.container {
    max-width: 900px;
    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;
    padding-bottom: 15px;
}

header h1 {
    color: var(--primary);
    margin-bottom: 5px;
}

header h2 {
    color: #555;
    font-size: 1.2rem;
    margin: 5px 0;
}

header p {
    margin: 3px 0;
    color: #666;
}

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

.data-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.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;
    font-size: 1rem;
}

.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;
    margin-top: 10px;
}

.btn-start:hover {
    background: var(--primary-dark);
}

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

.btn-primary:hover {
    background: #218838;
}

.section-title {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.section-desc {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.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: space-between;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.match-group select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: white;
    font-size: 0.9rem;
    min-width: 200px;
    cursor: pointer;
}

.hidden {
    display: none;
}

/* ============ DRAG & DROP ============ */
.bank-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary);
    margin: 25px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.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);
}

.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);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.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);
}

.draggable-word.dragging {
    opacity: 0.4;
    cursor: grabbing;
    transform: scale(0.95);
}

.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);
}

.drop-zone-inline {
    display: inline-block;
    min-width: 150px;
    padding: 8px 16px;
    border: 2px dashed var(--primary);
    border-radius: 8px;
    background: #eef2ff;
    text-align: center;
    vertical-align: middle;
    transition: all 0.3s ease;
    margin: 0 4px;
}

.drop-zone-inline.drag-over {
    background: #c7d2fe;
    border-color: var(--primary-dark);
    border-style: solid;
    transform: scale(1.05);
}

.drop-zone-inline.filled {
    border-style: solid;
    background: #d1fae5;
    border-color: var(--success);
}

.drop-hint-inline {
    color: #64748b;
    font-style: italic;
    font-size: 0.9rem;
}

.dropped-word-inline {
    color: var(--success);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.remove-word-inline {
    cursor: pointer;
    color: var(--danger);
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.1);
    transition: all 0.2s;
}

.remove-word-inline:hover {
    background: var(--danger);
    color: white;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .match-group label {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .match-group select {
        width: 100%;
    }
    
    .draggable-word {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .drop-zone-inline {
        min-width: 120px;
    }
}

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