/* Красно-синяя палитра и стили для student_page.html */
:root {
    --primary-red: #e53935;
    --primary-blue: #1e88e5;
    --accent-blue: #1976d2;
    --accent-red: #c62828;
    --background: #f5f7fa;
    --card-bg: #fff;
    --text-main: #222;
    --text-muted: #607d8b;
    --shadow-md: 0 4px 16px rgba(30, 136, 229, 0.13);
    --shadow-lg: 0 8px 32px rgba(229, 57, 53, 0.18);
}

body {
    font-family: 'Nunito', 'Raleway', sans-serif;
    background: var(--background);
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    padding-bottom: 2rem;
}

.student-header {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-red));
    padding: 2rem 0 1rem 0;
    color: #fff;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.header-main-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.header-tabs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}
.header-tabs .tab-link {
    background: #fff;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    font-weight: 700;
    margin-right: 0.5rem;
    transition: all 0.2s;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.07);
    cursor: pointer;
}
.header-tabs .tab-link.active, .header-tabs .tab-link:focus {
    background: var(--primary-blue);
    color: #fff;
    border-bottom: 3px solid var(--primary-red);
    box-shadow: 0 4px 16px rgba(229, 57, 53, 0.13);
}
.header-tabs .tab-link:hover {
    color: var(--primary-red);
    background: #e3f2fd;
}

@media (max-width: 900px) {
    .header-main-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .header-tabs {
        flex-direction: row;
        width: 100%;
        margin-top: 0.5rem;
        justify-content: flex-start;
    }
}
@media (max-width: 600px) {
    .header-tabs {
        flex-direction: column;
        width: 100%;
        margin-top: 0.5rem;
    }
    .header-tabs .tab-link {
        margin-bottom: 0.5rem;
        margin-right: 0;
        border-radius: 10px;
    }
    .header-main-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.student-info {
    color: var(--text-main);
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.header-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-profile, .btn-logout {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-profile {
    background: var(--primary-blue);
    color: #fff;
    border: 2px solid var(--primary-blue);
}
.btn-profile:hover {
    background: #fff;
    color: var(--primary-blue);
}

.btn-logout {
    background: var(--primary-red);
    color: #fff;
    border: none;
}
.btn-logout:hover {
    background: var(--accent-red);
    color: #fff;
}

.student-top-block {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    padding: 2rem;
    position: relative;
    z-index: 3;
}

.course-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.course-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-left: 6px solid var(--primary-blue);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.course-card.completed {
    border-left: 6px solid var(--primary-red);
    opacity: 0.85;
}
.course-card:hover {
    box-shadow: var(--shadow-lg);
    border-left: 6px solid var(--primary-red);
}

.course-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
}

.course-progress {
    height: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}
.course-progress-bar {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-red));
    border-radius: 4px;
    transition: width 0.6s;
    height: 100%;
}

.progress-percentage {
    font-weight: 600;
    color: var(--primary-red);
    font-size: 0.98rem;
}

.tab-content {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-top: 1rem;
}

/* --- Горизонтальный стиль курса для student_page --- */
.course-row-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.course-row {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 1.1rem 1.5rem;
    gap: 1.5rem;
    transition: box-shadow 0.2s;
}
.course-row:hover {
    box-shadow: var(--shadow-lg);
}
.course-row-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    background: #e3f2fd;
    flex-shrink: 0;
}
.course-row-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.course-row-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.2rem;
}
.course-row-progress {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.course-row-bar {
    flex: 1 1 120px;
    height: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 0.5rem;
}
.course-row-bar-inner {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-red));
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s;
}
.course-row-perc {
    font-weight: 600;
    color: var(--primary-red);
    font-size: 0.98rem;
    min-width: 38px;
}
.course-row-btn {
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 0.7rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.10);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.course-row-btn:hover {
    background: var(--primary-blue);
    color: #fff;
    text-decoration: none;
}
@media (max-width: 700px) {
    .course-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem;
    }
    .course-row-img {
        width: 60px;
        height: 60px;
    }
    .course-row-btn {
        width: 100%;
        justify-content: center;
    }
}

.student-avatar-container {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 3px solid var(--primary-blue);
}
.student-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    background: #e3f2fd;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.10);
}
@media (max-width: 700px) {
    .student-avatar-container {
        width: 64px;
        height: 64px;
    }
    .student-avatar {
        width: 60px;
        height: 60px;
    }
}

.text-star {
    color: var(--primary-red) !important;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(229,57,53,0.18), 0 2px 8px rgba(229,57,53,0.10);
}

.text-star-yellow {
    color: #FFD600 !important;
    font-weight: 700;
    text-shadow: 0 0 8px #FFD60044, 0 2px 8px #FFD60022;
}

/* --- Современный профиль --- */
.profile-card.profile-modern {
    background: var(--card-bg);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2.2rem 2rem 2.2rem;
    max-width: 420px;
    margin: 0 auto 2.5rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.5rem;
}
.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}
.profile-info-modern {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.profile-info-modern-box {
    background: #f5f7fa;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(30,136,229,0.07);
    padding: 1rem 1.2rem;
    font-size: 1.08rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: flex-start;
}
.profile-info-modern-box span {
    color: var(--primary-blue);
    font-weight: 600;
    margin-right: 0.3rem;
}
.profile-info-modern-box i {
    color: var(--primary-blue);
    font-size: 1.1rem;
    min-width: 22px;
    text-align: center;
}
.profile-stats-modern {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 1.2rem;
}
.course-stats {
    display: flex;
    gap: 2.5rem;
}
@media (max-width: 900px) {
    .course-stats {
        gap: 1.2rem;
    }
    .profile-stats-modern {
        gap: 1.2rem;
    }
}
/* Кнопки справа в шапке профиля */
.student-header .container.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.student-header .header-btns {
    margin-left: auto;
    display: flex;
    gap: 1rem;
}
@media (max-width: 600px) {
    .profile-card.profile-modern {
        padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    }
    .profile-info-modern-box {
        font-size: 0.98rem;
        padding: 0.8rem 0.7rem;
    }
    .profile-stats-modern {
        gap: 0.7rem;
    }
}

.btn-modern {
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(30,136,229,0.08);
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.85rem 2.2rem;
    letter-spacing: 0.02em;
}
.btn-profile.btn-modern {
    background: linear-gradient(90deg, #1e88e5, #1976d2);
    color: #fff;
    border: none;
}
.btn-profile.btn-modern:hover, .btn-profile.btn-modern:focus {
    background: linear-gradient(90deg, #1976d2, #1e88e5);
    color: #fff;
    box-shadow: 0 4px 18px rgba(30,136,229,0.18);
    transform: translateY(-2px) scale(1.03);
}
.btn-secondary.btn-modern {
    background: #f5f7fa;
    color: #1976d2;
    border: 2px solid #bbdefb;
}
.btn-secondary.btn-modern:hover, .btn-secondary.btn-modern:focus {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #90caf9;
    box-shadow: 0 2px 8px #90caf9;
}

.sidebar-modules {
    min-width: 270px;
    max-width: 400px;
    width: 100%;
}
.sidebar-module-title {
    word-break: break-word;
    hyphens: auto;
    font-weight: 700;
    font-size: 1.08rem;
    margin-bottom: 0.5rem;
}
.sidebar-lessons-list .lesson-link span,
.sidebar-quiz-list .quiz-link {
    display: inline-block;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    word-break: break-word;
}
@media (max-width: 900px) {
    .sidebar-modules {
        min-width: 100%;
        max-width: 100%;
    }
    .sidebar-lessons-list .lesson-link span,
    .sidebar-quiz-list .quiz-link {
        max-width: 100%;
    }
    .badge, .quiz-result, .sidebar-module .badge {
        max-width: 120px;
    }
}

.badge, .quiz-result, .sidebar-module .badge {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    font-size: 0.98rem;
    padding: 0.32em 0.7em;
    vertical-align: middle;
    display: inline-block;
}
@media (max-width: 700px) {
    .badge, .quiz-result, .sidebar-module .badge {
        max-width: 80px;
        font-size: 0.93rem;
    }
} 


