/* Общие стили для учебного портала */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Шапка сайта */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
}

.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

.user-info {
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
}

.btn-logout {
    background-color: rgba(255,255,255,0.2);
}

.btn-logout:hover {
    background-color: rgba(255,255,255,0.3);
}

/* Основной контент */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-align: center;
}

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

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

.btn-secondary {
    background-color: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background-color: #38a169;
}

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

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

.btn-small {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #667eea;
    color: white;
    margin: 0.2rem;
}

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

.btn-danger {
    background-color: #f56565;
}

.btn-danger:hover {
    background-color: #e53e3e;
}

/* Главная страница */
.hero-section {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-section h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-section h3 {
    color: #764ba2;
    font-size: 1.5rem;
}

.course-description {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.course-description h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.course-description h3 {
    color: #764ba2;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.course-description ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.course-description li {
    margin-bottom: 0.5rem;
}

.quick-actions {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.features {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.feature-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* Формы авторизации */
.auth-form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-form-container h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Уведомления */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #48bb78;
}

.alert-error {
    background-color: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #f56565;
}

.alert-info {
    background-color: #bee3f8;
    color: #2c5282;
    border-left: 4px solid #4299e1;
}

/* Темы курса */
.topics-list {
    display: grid;
    gap: 1.5rem;
}

.topic-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.topic-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.topic-description {
    color: #666;
    margin-bottom: 1rem;
}

.topic-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Просмотр темы */
.topic-view {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.topic-content {
    margin: 2rem 0;
    line-height: 1.8;
}

.topic-content h2,
.topic-content h3 {
    color: #667eea;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.topic-content pre {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    border-left: 4px solid #667eea;
    margin: 1rem 0;
}

.topic-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.topic-content ul,
.topic-content ol {
    margin-left: 2rem;
    margin-top: 1rem;
}

/* Тесты */
.test-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.question-block {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.question-block:last-child {
    border-bottom: none;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #333;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.radio-option:hover {
    background: #edf2f7;
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem;
    cursor: pointer;
}

.test-submit {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Результаты теста */
.test-result {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.result-summary {
    margin: 2rem 0;
}

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

.result-score {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 2.5rem;
    font-weight: bold;
}

.score-separator {
    font-size: 1.5rem;
}

.result-percentage {
    font-size: 3rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.result-message {
    margin: 1.5rem 0;
}

.success-message {
    color: #22543d;
    font-weight: 500;
}

.warning-message {
    color: #744210;
    font-weight: 500;
}

.error-message {
    color: #742a2a;
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Кабинет ученика */
.user-greeting {
    font-size: 1.2rem;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.cabinet-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.cabinet-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.progress-table table {
    width: 100%;
    border-collapse: collapse;
}

.progress-table th,
.progress-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.progress-table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #667eea;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-not-started {
    background-color: #fed7d7;
    color: #742a2a;
}

.status-in-progress {
    background-color: #feebc8;
    color: #744210;
}

.status-completed {
    background-color: #c6f6d5;
    color: #22543d;
}

/* Кабинет учителя */
.stats-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 1rem;
    margin-top: 0.5rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.students-table table,
.results-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.students-table th,
.students-table td,
.results-table th,
.results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.students-table th,
.results-table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #667eea;
}

.result-excellent {
    color: #22543d;
    font-weight: 600;
}

.result-good {
    color: #744210;
    font-weight: 600;
}

.result-poor {
    color: #742a2a;
    font-weight: 600;
}

/* Административные формы */
.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

.admin-form textarea {
    font-family: inherit;
    resize: vertical;
}

.admin-form small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.topics-admin-list,
.questions-admin-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.topic-admin-item,
.question-admin-item {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.topic-admin-item h4,
.question-admin-item h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.topic-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.question-text {
    margin: 1rem 0;
    font-weight: 500;
}

.question-options {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.question-options p {
    margin: 0.5rem 0;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Обратная связь */
.feedback-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feedback-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feedback-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.feedback-class {
    color: #666;
    font-size: 0.9rem;
}

.feedback-date {
    margin-left: auto;
    color: #999;
    font-size: 0.85rem;
}

.feedback-message {
    line-height: 1.8;
    color: #333;
}

.feedback-actions {
    margin-top: 1.5rem;
}

/* Методические рекомендации */
.methodology-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Страница "О проекте" */
.about-page {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.about-content {
    margin: 2rem 0;
    line-height: 1.8;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: justify;
}

.about-image {
    text-align: center;
    margin: 2rem 0;
}

.project-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-actions {
    margin-top: 2rem;
}

.methodology-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.methodology-section h4 {
    color: #764ba2;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.methodology-section ul {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.methodology-section li {
    margin-bottom: 0.5rem;
}

.methodology-actions {
    margin-top: 2rem;
}

/* Подвал */
.site-footer {
    background-color: #2d3748;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    margin: 0.5rem 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        margin-top: 1rem;
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-table,
    .students-table,
    .results-table {
        overflow-x: auto;
    }
    
    .test-submit,
    .result-actions {
        flex-direction: column;
    }
    
    .test-submit .btn,
    .result-actions .btn {
        width: 100%;
    }
}

