/* ==================== СТРАНИЦА AI TEST ГЕНЕРАТОР ==================== */
.ai-test-page {
    min-height: 100vh;
}

.ai-test-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.ai-test-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================== СОЗДАНИЕ ТЕСТА ==================== */
.test-creator {
    background: white;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

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

.creator-header i {
    font-size: 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.creator-title {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.creator-description {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.btn-view-all-results {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.3);
}

.btn-view-all-results:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 172, 193, 0.4);
}

/* Форма */
.generate-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-group label i {
    color: #667eea;
}

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

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Кнопка генерации */
.btn-generate {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    margin-top: 30px;
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Индикатор загрузки */
.loading-indicator {
    text-align: center;
    padding: 40px;
    margin-top: 30px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
}

/* ==================== СПИСОК ТЕСТОВ ==================== */
.tests-list-section {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

.tests-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.test-list-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.test-list-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.test-list-info h4 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.test-list-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.test-list-meta i {
    color: #667eea;
}

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

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

.btn-edit {
    background: #667eea;
    color: white;
}

.btn-edit:hover {
    background: #5568d3;
}

.btn-take {
    background: #43e97b;
    color: white;
}

.btn-take:hover {
    background: #2ecc71;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
}

.btn-delete:hover {
    background: #c0392b;
}

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

.btn-results:hover {
    background: linear-gradient(135deg, #0097a7 0%, #7b1fa2 100%);
}

.no-tests {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

/* ==================== РЕДАКТОР ТЕСТА ==================== */
.test-editor {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

.editor-title {
    font-size: 2.5rem;
    color: #2c3e50;
}

.btn-back {
    padding: 12px 24px;
    background: #e9ecef;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #667eea;
    color: white;
}

/* Карточки вопросов для редактирования */
.questions-editor {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.question-edit-card {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    border-left: 5px solid #667eea;
}

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

.question-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.btn-save-question {
    padding: 10px 20px;
    background: #43e97b;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-save-question:hover {
    background: #2ecc71;
    transform: translateY(-2px);
}

.question-text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    resize: vertical;
    font-family: inherit;
}

.question-text-input:focus {
    outline: none;
    border-color: #667eea;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-item label {
    font-weight: 700;
    color: #667eea;
    min-width: 25px;
}

.option-item input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

.option-item input:focus {
    outline: none;
    border-color: #667eea;
}

.correct-answer-select {
    display: flex;
    align-items: center;
    gap: 15px;
}

.correct-answer-select label {
    font-weight: 600;
    color: #2c3e50;
}

.correct-answer-select select {
    padding: 10px 20px;
    border: 2px solid #43e97b;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #43e97b;
    background: white;
    cursor: pointer;
}

.editor-actions {
    text-align: center;
}

/* ==================== ПРОХОЖДЕНИЕ ТЕСТА ==================== */
.test-taking {
    background: white;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.test-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #f0f0f0;
}

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

.test-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.test-info i {
    color: #667eea;
}

/* Информация об ученике */
.student-info-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Контейнер вопросов */
.questions-container {
    position: relative;
    min-height: 400px;
}

.test-question-card {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    border-left: 5px solid #667eea;
    display: none;
    animation: questionSlide 0.4s ease;
}

.test-question-card.active {
    display: block;
}

@keyframes questionSlide {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

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

/* Варианты ответов */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    cursor: pointer;
    display: block;
}

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

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

.option-label input[type="radio"]:checked + .option-box {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.option-label:hover .option-box {
    border-color: #667eea;
    transform: translateX(5px);
}

.option-letter {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.option-label input[type="radio"]:checked + .option-box .option-letter {
    transform: scale(1.1);
}

.option-text {
    flex: 1;
    font-size: 1.05rem;
    color: #2c3e50;
}

/* Навигация по вопросам */
.questions-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.question-progress {
    text-align: center;
    flex: 1;
}

.progress-text {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.btn-nav {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

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

.btn-nav:disabled:hover {
    transform: none;
}

/* Кнопка отправки */
.btn-submit-test {
    width: 100%;
    padding: 20px 30px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
    margin-top: 30px;
}

.btn-submit-test.show {
    display: flex;
}

.btn-submit-test:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(67, 233, 123, 0.4);
}

/* ==================== ПРОСМОТР РЕЗУЛЬТАТОВ ТЕСТА ==================== */
.test-results-view {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

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

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

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

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

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

/* Статистика теста */
.test-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.test-stat-card {
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 172, 193, 0.3);
    transition: all 0.3s ease;
}

.test-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 172, 193, 0.4);
}

.test-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.test-stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 8px;
}

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

/* Таблица результатов */
.results-table-wrapper {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

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

.results-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.results-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.results-table tbody tr:hover {
    background: rgba(0, 172, 193, 0.05);
}

.results-table tbody td {
    padding: 15px 12px;
}

.col-num {
    text-align: center;
    font-weight: 700;
    color: #00acc1;
}

.col-name {
    font-weight: 600;
    color: #2c3e50;
}

.col-class {
    color: #7f8c8d;
}

.col-score {
    font-weight: 600;
    color: #2c3e50;
}

.col-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.col-view {
    text-align: center;
}

.btn-view-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00acc1 0%, #8e24aa 100%);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-detail:hover {
    transform: scale(1.2);
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.4);
}

/* Нет результатов */
.no-results-yet {
    text-align: center;
    padding: 80px 20px;
}

.no-results-yet i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results-yet p {
    font-size: 1.4rem;
    color: #999;
    margin-bottom: 30px;
}

.btn-take-test {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(67, 233, 123, 0.3);
}

.btn-take-test:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(67, 233, 123, 0.4);
}

/* ==================== РЕЗУЛЬТАТЫ ПОСЛЕ СДАЧИ ==================== */
.test-result {
    background: white;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-header {
    margin-bottom: 40px;
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 20px;
}

.result-title {
    font-size: 2.5rem;
    color: #2c3e50;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
}

.stat-value {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
}

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

.result-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.result-info p {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #2c3e50;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2rem;
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 768px) {
    .test-creator,
    .test-editor,
    .test-taking,
    .test-result,
    .test-results-view {
        padding: 30px 20px;
    }
    
    .creator-title,
    .editor-title,
    .test-title,
    .results-view-title {
        font-size: 2rem;
    }
    
    .test-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-view-header .btn-back {
        position: static;
        margin-bottom: 20px;
    }
    
    .results-table-wrapper {
        overflow-x: auto;
    }
    
    .results-table {
        min-width: 650px;
    }
    
    .form-row,
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .test-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .creator-header i {
        font-size: 3rem;
    }
    
    .creator-title {
        font-size: 1.8rem;
    }
    
    .test-list-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .test-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .test-stat-value {
        font-size: 2rem;
    }
}

