:root {
    --bg-color: #fafafa;
    --text-color: #1a202c;
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --icon-color: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --progress-bg: #e2e8f0;
    --card-bg: #ffffff;
    --bg2-color: #fbfbfb;
    --font-heading: 'Open Sans', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
}
.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
}
.circle-progress {
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}
.circle-bg {
    stroke: #e0e0e0;
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-text span {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.progress-text small {
    font-size: 0.75rem;
    color: var(--icon-color);
}

.progress-dot {
    width: 12px;
    height: 12px;
    background: var(--icon-color);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --primary-color: #7c4dff;
        --secondary-color: #b388ff;
        --icon-color: #9e9e9e;
        --border-color: #373737;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --progress-bg: #2d2d2d;
        --card-bg: #1e1e1e;
        --bg2-color: #212121;
    }
}

/* Базовые стили */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 400;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}


h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-style: normal;
    font-weight: 500;
}

a{
    text-decoration: none;
    color:var(--text-color);
}

.school-subjects {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Заголовок */
.school-header {
    text-align: center;
    margin-bottom: 3rem;
}

.school-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.school-header-line {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* Сетка карточек */
.school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

/* Карточка предмета */
.school-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.2s ease;
}

.school-card:hover {
    transform: translateY(-3px);
}

/* Иконки */
.icon-book,
.icon-date,
.icon-clock,
.icon-empty {
    width: 20px;
    height: 20px;
    fill: var(--icon-color);
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Верхняя часть карточки */
.school-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.school-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.school-card-badge {
    display: flex;
    align-items: center;
    background: rgba(79, 70, 229, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

.school-card-badge span {
    margin-left: 0.5rem;
}

/* Прогресс бар */
.school-progress {
    margin: 1rem 0;
}

.school-progress-bar {
    height: 6px;
    background: var(--progress-bg);
    border-radius: 3px;
    overflow: hidden;
}

.school-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--progress);
    background: var(--primary-color);
    transition: width 0.6s ease;
}

.school-progress-text {
    font-size: 0.875rem;
    color: var(--icon-color);
    display: block;
    margin-top: 0.5rem;
}

/* Нижняя часть карточки */
.school-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.school-date {
    display: flex;
    align-items: center;
    color: var(--icon-color);
}

.school-days {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary-color);
}

.school-days-warning {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Состояние пустого списка */
.school-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.school-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--icon-color);
}

.school-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.school-empty p {
    color: var(--icon-color);
    margin-bottom: 1.5rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .school-title {
        font-size: 1.75rem;
    }
    
    .school-grid {
        grid-template-columns: 1fr;
    }
    
    .school-card {
        padding: 1.25rem;
    }
}

/* Новые стили */
.subject-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Шапка предмета */
.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.subject-header-content {
    flex: 1;
}

.subject-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.subject-meta {
    display: flex;
    gap: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    color: var(--icon-color);
    font-size: 0.95rem;
}

.meta-icon {
    width: 20px;
    height: 20px;
    fill: var(--icon-color);
    margin-right: 0.75rem;
}

/* Список заданий */
.assignments-section {
    margin-top: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.title-icon {
    width: 28px;
    height: 28px;
    fill: var(--primary-color);
    margin-right: 1rem;
}

.assignment-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--shadow-color);
    margin-bottom: 10px;
}
/* Обновленные стили для карточек заданий */
.assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

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

/* Стили для контента внутри карточки */
.assignment-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.task-image {
    margin: 2rem 0;
    text-align: center;
    background: var(--bg2-color);
    border-radius: 12px;
}

.task-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quiz-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: center;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg2-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}



.quiz-feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.quiz-feedback:not(:empty) {
    background: var(--bg2-color);
    border: 2px solid transparent;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .quiz-controls {
        grid-template-columns: 1fr;
    }
    .task-image {
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .assignment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideIn 0.6s ease forwards;
}
.assignment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.assignment-card.completed {
    border-left: 4px solid var(--primary-color);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.assignment-number {
    font-size: 0.9rem;
    color: var(--icon-color);
}

.assignment-status {
    width: 24px;
    height: 24px;
}

.status-icon {
    width: 100%;
    height: 100%;
    fill: var(--primary-color);
}

.assignment-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.assignment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-badge {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.deadline {
    display: flex;
    align-items: center;
    color: var(--icon-color);
    font-size: 0.85rem;
}

.deadline svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    margin-right: 0.5rem;
}

/* Анимации */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .subject-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .subject-meta {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .assignments-grid {
        grid-template-columns: 1fr;
    }
}


.task-resources {
    margin-top: 2rem;
}

.task-image img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.task-pdf {
    margin-top: 1rem;
}

.task-video iframe {
    width: 100%;
    height: 315px;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}


/* Прозрачная кнопка */
.quiz-hint {
    background: transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
/* Общий стиль для кнопки */
#toggle-task-btn {
    margin-top: 1rem;
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
}
.btn-check{
    padding:  rem;
    margin-top: 1rem;
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0000;
    color: var(--primary-color);
}
.form-control{
    width: fit-content;
    min-width: 300px;
    background-color: var(--card-bg);
    border: none;
    font-size: 14px;
    padding: 10px;
    color: var(--text-color)
}
/* ==================== NAVBAR ==================== */
.navbar {
    background: var(--card-bg);
    box-shadow: 0 2px 8px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.navbar-logo {
    width: 28px;
    height: 28px;
    fill: var(--primary-color);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.navbar-link {
    font-size: 1rem;
    color: var(--text-color);
    transition: color 0.2s;
    font-weight: 500;
}

.navbar-link:hover {
    color: var(--primary-color);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.navbar-username {
    font-size: 0.95rem;
    color: var(--text-color);
}

/* ==================== КНОПКИ ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary-color);
    color: white !important;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white !important;
}

.btn-full {
    width: 100%;
    padding: 0.85rem;
}

/* ==================== AUTH (LOGIN/REGISTER) ==================== */
.auth-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 24px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--icon-color);
    font-size: 0.95rem;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg2-color);
    color: var(--text-color);
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
}

.form-help {
    color: var(--icon-color);
    font-size: 0.8rem;
    line-height: 1.4;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--icon-color);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary-color) !important;
    font-weight: 600;
}

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

/* ==================== MESSAGES ==================== */
.messages-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.message {
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.message-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-left: 4px solid #22c55e;
}

.message-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-left: 4px solid #ef4444;
}

/* ==================== PROFILE ==================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.profile-avatar-big {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    margin: 0 0 0.4rem 0;
    color: var(--text-color);
}

.profile-email {
    color: var(--icon-color);
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
}

.profile-stats-row {
    display: flex;
    gap: 2.5rem;
}

.profile-stat {
    display: flex;
    flex-direction: column;
}

.profile-stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.profile-stat-label {
    font-size: 0.85rem;
    color: var(--icon-color);
    margin-top: 0.25rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 1.5rem 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    color: var(--icon-color);
    font-size: 0.9rem;
}

/* ==================== АДАПТИВ ==================== */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    .navbar-username {
        display: none;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .profile-stats-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    .auth-card {
        padding: 1.5rem;
    }
}

/* ==================== КНОПКА ВЫХОДА В ПРОФИЛЕ ==================== */
.profile-actions {
    align-self: flex-start;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    background: transparent;
    color: var(--icon-color) !important;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444 !important;
    border-color: #ef4444;
    transform: translateY(-1px);
}

.btn-logout-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.25s ease;
}

.btn-logout:hover .btn-logout-icon {
    transform: translateX(2px);
}

/* Адаптив для шапки профиля */
@media (max-width: 768px) {
    .profile-actions {
        align-self: center;
        margin-top: 1rem;
    }
    .btn-logout {
        width: 100%;
        justify-content: center;
    }
}