/* ===== СТРАНИЦА ДОМАШНИХ ЗАДАНИЙ ===== */
.homework-page {
    min-height: 100vh;
    background: #eef2f7;
}

.page-header {
    background: #ffffff;
    padding: 30px 0;
    margin: 20px 20px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
}

/* ===== ПРЕМИАЛЬНАЯ КНОПКА НАЗАД ===== */
.back-btn {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e94560;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px 12px 20px;
    border-radius: 12px;
    background: transparent;
    border: 2px solid #e94560;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #e94560;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
}

.back-btn:hover::before {
    width: 100%;
}

.back-btn:hover {
    color: #fff;
    border-color: #e94560;
    transform: translateY(-50%) translateX(-4px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.3);
}

.back-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.page-subtitle {
    font-size: 16px;
    color: #636e72;
    margin-top: 8px;
    font-weight: 500;
}

/* ===== ВЫБОР КЛАССА ===== */
.class-selector {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
}

.class-group {
    background: #fff;
    border-radius: 20px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.class-group:hover {
    border-color: #e94560;
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(233, 69, 96, 0.12);
}

.class-number {
    font-size: 42px;
    font-weight: 900;
    color: #1a1a2e;
    line-height: 1;
    margin: 0 0 2px;
}

.class-label {
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin: 0 0 12px;
}

.class-letters {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.letter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #636e72;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-btn:hover {
    border-color: #e94560;
    color: #e94560;
    background: rgba(233, 69, 96, 0.05);
}

.letter-btn.active {
    background: #e94560;
    border-color: #e94560;
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.35);
    transform: scale(1.1);
}

/* ===== ТЕКУЩИЙ КЛАСС ===== */
.current-class {
    text-align: center;
    margin: 30px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.current-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e94560, #ff6b81);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.3);
}

.current-class h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

/* ===== КАРТОЧКА ЗАДАНИЯ ===== */
.homework-content {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.homework-card {
    background: #fff;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.homework-header {
    display: flex;
    justify-content: space-between;
    padding: 20px 25px;
    background: #fafbfc;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.homework-date,
.homework-deadline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #636e72;
    font-weight: 500;
}

.date-icon,
.deadline-icon {
    font-size: 18px;
}

.homework-deadline {
    color: #e94560;
    font-weight: 600;
}

.homework-body {
    padding: 25px;
}

.homework-section {
    margin-bottom: 20px;
}

.homework-section:last-child {
    margin-bottom: 0;
}

.homework-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.homework-section p {
    font-size: 15px;
    color: #2d3436;
    line-height: 1.8;
    margin: 0 0 4px;
}

.homework-files {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f5f7fb;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    transition: all 0.3s ease;
}

.file-link:hover {
    background: #e94560;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.2);
}

.file-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ===== НЕТ ЗАДАНИЯ ===== */
.homework-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.homework-empty h3 {
    font-size: 20px;
    font-weight: 700;
    color: #636e72;
    margin: 0 0 8px;
}

.homework-empty p {
    font-size: 15px;
    color: #999;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1100px) {
    .class-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .class-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .page-header {
        padding: 25px 20px;
    }
    .back-btn {
        position: static;
        transform: none;
        margin-bottom: 15px;
        justify-content: center;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
    .back-btn:hover {
        transform: translateX(-4px) !important;
    }
    .back-btn:active {
        transform: scale(0.95) !important;
    }
    .class-number {
        font-size: 32px;
    }
}

@media (max-width: 500px) {
    .class-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-header h1 {
        font-size: 28px;
    }
    .homework-header {
        flex-direction: column;
    }
    .current-badge {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}