/* ==================== ГРУППОВАЯ ВИКТОРИНА ==================== */
.quiz-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%);
    padding: 40px 20px;
}

.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ==================== СОЗДАНИЕ ВИКТОРИНЫ ==================== */
.quiz-creator {
    padding: 50px;
}

.creator-header {
    text-align: center;
    margin-bottom: 50px;
}

.creator-header i {
    font-size: 4rem;
    color: #00acc1;
    margin-bottom: 20px;
}

.creator-title {
    font-size: 3rem;
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 15px;
}

.creator-description {
    font-size: 1.3rem;
    color: #666;
}

.generate-form {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 50px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.form-group label i {
    color: #00acc1;
    font-size: 1.2rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-generate {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 172, 193, 0.3);
}

.btn-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    position: absolute;
    right: 20px;
}

/* ==================== СПИСОК КОМПЛЕКТОВ ==================== */
.quiz-sets-list {
    margin-top: 50px;
}

.list-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.quiz-set-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
}

.quiz-set-card:hover {
    border-color: #00acc1;
    box-shadow: 0 10px 30px rgba(0, 172, 193, 0.1);
    transform: translateY(-5px);
}

.set-header {
    margin-bottom: 20px;
}

.set-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.set-meta {
    display: flex;
    gap: 20px;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.set-meta i {
    margin-right: 5px;
    color: #00acc1;
}

.set-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-manage {
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
}

.btn-preview {
    background: #28a745;
    color: white;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.no-sets {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-sets i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-sets p {
    font-size: 1.3rem;
}

/* ==================== УПРАВЛЕНИЕ ВИКТОРИНОЙ ==================== */
.quiz-manager {
    padding: 50px;
}

.manager-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.manager-header .btn-back {
    position: absolute;
    left: 0;
    top: 0;
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.manager-header .btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.manager-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.manager-description {
    font-size: 1.2rem;
    color: #666;
}

/* Секция классов */
.classes-section {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
}

.classes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.class-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.class-card:hover {
    border-color: #00acc1;
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.1);
    transform: translateY(-2px);
}

.class-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.class-name {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.class-actions {
    display: flex;
    gap: 10px;
}

.btn-manage-students {
    padding: 8px 15px;
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-manage-students:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.3);
}

.btn-delete-class {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-delete-class:hover {
    background: #c82333;
    transform: scale(1.1);
}

.class-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.students-count {
    color: #7f8c8d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.class-description {
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
}

.no-classes {
    text-align: center;
    padding: 40px;
    color: #999;
    grid-column: 1 / -1;
}

.no-classes i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

/* Секция учеников */
.students-section {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
}

.section-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-back-to-classes {
    padding: 10px 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-back-to-classes:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

.btn-add-class,
.btn-add-student {
    padding: 12px 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-add-class:hover,
.btn-add-student:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-save,
.btn-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-save {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.add-class-form,
.add-student-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.add-class-form input,
.add-student-form input,
.add-class-form select,
.add-student-form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.add-class-form input:focus,
.add-student-form input:focus,
.add-class-form select:focus,
.add-student-form select:focus {
    outline: none;
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

.add-class-form .form-row,
.add-student-form .form-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 15px;
    align-items: end;
}

.students-list {
    max-height: 400px;
    overflow-y: auto;
}

.class-group {
    margin-bottom: 30px;
}

.class-title {
    font-size: 1.3rem;
    color: #00acc1;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.student-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.student-card:hover {
    border-color: #00acc1;
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.1);
}

.student-info {
    display: flex;
    flex-direction: column;
}

.student-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.student-class {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.btn-remove-student {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-student:hover {
    background: #c82333;
    transform: scale(1.1);
}

.no-students {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-students i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

/* Секция сессии */
.session-section {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
}

.session-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
}

.session-section input,
.session-section select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.session-section input:focus,
.session-section select:focus {
    outline: none;
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

.session-section label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.session-section .form-group {
    margin-bottom: 20px;
}

.session-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.distribution-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.radio-option:hover {
    border-color: #00acc1;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #00acc1;
    background: #00acc1;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-text {
    display: flex;
    flex-direction: column;
}

.radio-text strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

.radio-text small {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.btn-start-session {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-start-session:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
}

/* ==================== ПРОСМОТР ВОПРОСОВ ==================== */
.quiz-preview {
    padding: 50px;
}

.preview-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.preview-header .btn-back {
    position: absolute;
    left: 0;
    top: 0;
}

.preview-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.preview-meta {
    font-size: 1.2rem;
    color: #7f8c8d;
}

.preview-meta i {
    color: #00acc1;
    margin-right: 8px;
}

.questions-preview-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-preview-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.question-preview-card:hover {
    border-color: #00acc1;
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.1);
}

.question-preview-number {
    display: inline-block;
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.question-preview-text {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.6;
}

.question-preview-answer {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px 20px;
    border-radius: 8px;
    color: #155724;
    font-size: 1.1rem;
}

.question-preview-answer strong {
    margin-right: 10px;
}

/* ==================== PREVIEW РАСПРЕДЕЛЕНИЯ В ФОРМЕ ==================== */
.preview-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.preview-group {
    background: white;
    border: 2px solid var(--group-color);
    border-radius: 15px;
    overflow: hidden;
}

.preview-group-header {
    background: var(--group-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.preview-group-members {
    padding: 15px;
    background: #f8f9fa;
    max-height: 300px;
    overflow-y: auto;
}

.preview-student {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.preview-student i {
    color: var(--group-color, #00acc1);
    font-size: 0.9rem;
}

.btn-reshuffle {
    padding: 12px 25px;
    background: linear-gradient(135deg, #ffc107 0%, #ff6f00 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-reshuffle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-reshuffle i {
    font-size: 1.1rem;
}

/* ==================== РАСПРЕДЕЛЕНИЕ ПО ГРУППАМ ==================== */
.distribution-page {
    padding: 50px;
}

.distribution-header {
    text-align: center;
    margin-bottom: 40px;
}

.distribution-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.distribution-description {
    font-size: 1.2rem;
    color: #7f8c8d;
}

.groups-distribution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.distribution-group {
    background: white;
    border: 3px solid var(--group-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.distribution-group-header {
    background: var(--group-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.distribution-group-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.members-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.distribution-members {
    padding: 20px;
    min-height: 200px;
    background: #f8f9fa;
}

.distribution-members.droppable {
    border: 2px dashed transparent;
    transition: all 0.3s ease;
}

.distribution-members.droppable.drag-over {
    border-color: var(--group-color);
    background: rgba(0, 172, 193, 0.05);
}

.distribution-student {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.distribution-student.draggable {
    cursor: move;
}

.distribution-student.draggable:hover {
    border-color: #00acc1;
    box-shadow: 0 3px 10px rgba(0, 172, 193, 0.2);
    transform: translateY(-2px);
}

.distribution-student.dragging {
    opacity: 0.5;
}

.distribution-student i {
    color: #00acc1;
    font-size: 1.1rem;
}

.distribution-student span {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.empty-group {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
}

.empty-group i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #ddd;
}

.empty-group p {
    font-size: 0.95rem;
}

.distribution-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
}

/* ==================== АКТИВНАЯ ВИКТОРИНА ==================== */
.active-quiz {
    padding: 50px;
}

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.quiz-header .btn-back {
    position: absolute;
    left: 0;
    top: 0;
}

.quiz-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.quiz-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.quiz-meta i {
    color: #00acc1;
    margin-right: 8px;
}

/* Таблица групп */
.groups-scoreboard {
    margin-bottom: 50px;
}

.groups-scoreboard h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.group-card,
.group-card-full {
    background: white;
    border: 3px solid var(--group-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.group-card:hover,
.group-card-full:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.group-score-header {
    background: var(--group-color);
    color: white;
    padding: 25px;
    text-align: center;
}

.group-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.group-score {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.group-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.group-members-list {
    padding: 20px;
    background: #f8f9fa;
}

.members-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.member-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #2c3e50;
}

.member-item i {
    color: var(--group-color);
    font-size: 0.85rem;
}

/* Карточки вопросов */
.questions-cards {
    margin-bottom: 30px;
}

.questions-cards h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.question-card {
    background: white;
    border: 3px solid #00acc1;
    border-radius: 20px;
    min-height: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.question-card.closed {
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
}

.question-card.closed:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 172, 193, 0.4);
}

.question-card.opened {
    background: white;
    color: #2c3e50;
}

.card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    min-height: 200px;
}

.card-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.card-front i {
    font-size: 3rem;
    opacity: 0.8;
}

.card-back {
    padding: 25px;
}

.card-question {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 500;
}

.btn-show-answer {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ffc107 0%, #ff6f00 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-show-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.card-answer {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px 20px;
    border-radius: 8px;
    color: #155724;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.card-answer strong {
    margin-right: 10px;
}

.card-points p {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.points-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-award-point {
    padding: 12px;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-award-point:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-award-point:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-award-point.awarded {
    position: relative;
}

.btn-award-point.awarded::after {
    content: '✓';
    position: absolute;
    right: 15px;
    font-size: 1.5rem;
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 768px) {
    .quiz-page {
        padding: 20px 10px;
    }
    
    .quiz-container {
        border-radius: 15px;
    }
    
    .quiz-creator,
    .quiz-manager,
    .quiz-preview,
    .active-quiz,
    .distribution-page {
        padding: 30px 20px;
    }
    
    .groups-distribution {
        grid-template-columns: 1fr;
    }
    
    .distribution-actions {
        flex-direction: column;
    }
    
    .quiz-header .btn-back {
        position: static;
        margin-bottom: 20px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .preview-header .btn-back {
        position: static;
        margin-bottom: 20px;
    }
    
    .creator-title,
    .manager-title,
    .preview-title {
        font-size: 2rem;
    }
    
    .question-preview-text {
        font-size: 1.1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .sets-grid {
        grid-template-columns: 1fr;
    }
    
    .students-grid {
        grid-template-columns: 1fr;
    }
    
    .manager-header .btn-back {
        position: static;
        margin-bottom: 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .add-class-form .form-row,
    .add-student-form .form-row,
    .session-section .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-save,
    .btn-cancel {
        width: 100%;
    }
    
    #groupsCountGroup {
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .creator-title,
    .manager-title,
    .quiz-title {
        font-size: 1.8rem;
    }
    
    .set-actions {
        flex-direction: column;
    }
    
    .btn-sm {
        justify-content: center;
    }
    
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}
