:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #0d6efd;
    font-weight: 600;
}

.stat-card {
    border-left: 4px solid;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.stat-primary {
    border-left-color: var(--primary-color);
}

.stat-card.stat-success {
    border-left-color: var(--success-color);
}

.stat-card.stat-warning {
    border-left-color: var(--warning-color);
}

.stat-card.stat-info {
    border-left-color: var(--info-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #212529;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
}

.question-card {
    border-left: 4px solid #0d6efd;
    margin-bottom: 1rem;
}

.question-type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.answer-option {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.answer-option:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
}

.answer-option.selected {
    background-color: #e7f1ff;
    border-color: #0d6efd;
    font-weight: 500;
}

.answer-option.correct {
    background-color: #d1e7dd;
    border-color: #198754;
}

.answer-option.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.progress-bar-custom {
    height: 30px;
    font-size: 1rem;
    line-height: 30px;
}

.worksheet-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.worksheet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.badge-role {
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
}

.table-actions {
    white-space: nowrap;
}

.btn-icon {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.modal-header {
    background-color: #0d6efd;
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

.alert-dismissible {
    padding-right: 3rem;
}

.form-floating > label {
    color: #6c757d;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-brand i {
    font-size: 1.5rem;
    vertical-align: middle;
}

footer {
    margin-top: auto;
}

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.question-builder {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.option-input-group {
    margin-bottom: 0.5rem;
}

.draggable {
    cursor: move;
}

.pair-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

.result-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.result-summary h2 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.result-details {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.result-details .detail-item {
    text-align: center;
}

.result-details .detail-value {
    font-size: 1.5rem;
    font-weight: bold;
}
