/* ==================================================
   STARKCODE — PROFILE PAGE
================================================== */


/* ==================================================
   PROFILE PAGE
================================================== */

.profile-page {
    width: min(1200px, 100%);

    margin: 0 auto;

    padding: 70px 20px 110px;
}


/* ==================================================
   PROFILE HEADER
================================================== */

.profile-header {
    position: relative;

    padding: 45px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(36, 123, 255, 0.12),
            rgba(85, 72, 232, 0.10)
        );

    border: 1px solid var(--border);

    border-radius: 24px;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25);

    animation: profileAppear 0.6s ease;
}


/* декоративное свечение */

.profile-header::before {
    content: "";

    position: absolute;

    width: 360px;
    height: 360px;

    top: -220px;
    right: -100px;

    background:
        radial-gradient(
            circle,
            rgba(36, 123, 255, 0.22),
            transparent 70%
        );

    pointer-events: none;
}


/* ==================================================
   PROFILE TEXT
================================================== */

.profile-label {
    margin: 0 0 8px;

    color: var(--blue);

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


.profile-header h1 {
    position: relative;

    z-index: 1;

    margin: 0;

    font-size: clamp(38px, 6vw, 56px);

    line-height: 1.1;

    background: var(--gradient);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


.profile-email {
    position: relative;

    z-index: 1;

    margin: 15px 0 0;

    color: var(--text-secondary);

    font-size: 16px;
}


/* ==================================================
   PROFILE STATISTICS
================================================== */

.profile-stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-top: 22px;
}


.stat-card {
    display: flex;

    flex-direction: column;

    justify-content: center;

    min-height: 145px;

    padding: 25px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);

    animation: cardAppear 0.6s ease;
}


.stat-card:hover {
    transform: translateY(-4px);

    background: var(--card-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.25);
}


.stat-number {
    margin-bottom: 8px;

    font-size: 36px;

    font-weight: 700;

    line-height: 1;

    background: var(--gradient);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


.stat-label {
    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.4;
}


/* ==================================================
   PROFILE SECTION
================================================== */

.profile-section {
    margin-top: 65px;

    animation: cardAppear 0.7s ease;
}


.section-heading {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    margin-bottom: 28px;
}


.section-heading h2 {
    margin: 0;

    font-size: 32px;

    line-height: 1.15;
}


/* ==================================================
   PROFILE COURSES
================================================== */

.profile-courses {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;
}


/* ==================================================
   PROFILE COURSE
================================================== */

.profile-course {
    position: relative;

    display: flex;

    flex-direction: column;

    min-height: 285px;

    padding: 28px;

    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}


.profile-course::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: var(--gradient);

    opacity: 0;

    transition: opacity var(--transition);
}


.profile-course:hover {
    transform: translateY(-6px);

    background: var(--card-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.3);
}


.profile-course:hover::before {
    opacity: 1;
}


/* ==================================================
   COURSE TOP
================================================== */

.profile-course-top {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;
}


.profile-course-top > div:first-child {
    min-width: 0;
}


.profile-course h3 {
    margin: 9px 0 7px;

    font-size: 24px;

    line-height: 1.2;
}


.profile-course p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.6;
}


/* ==================================================
   COURSE TAG
================================================== */

.course-tag {
    display: inline-block;

    padding: 5px 9px;

    background:
        rgba(36, 123, 255, 0.10);

    border: 1px solid
        rgba(36, 123, 255, 0.20);

    border-radius: 6px;

    color: var(--blue);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1px;
}


/* ==================================================
   COURSE PERCENT
================================================== */

.course-percent {
    flex-shrink: 0;

    color: var(--blue);

    font-size: 19px;

    font-weight: 700;

    white-space: nowrap;
}


/* ==================================================
   COURSE LESSON COUNT
================================================== */

.course-lessons-count {
    margin-top: auto !important;

    margin-bottom: 12px !important;

    color: var(--text-secondary);

    font-size: 13px !important;
}


/* ==================================================
   PROGRESS BAR
================================================== */

.progress-bar {
    width: 100%;

    height: 7px;

    margin-bottom: 20px;

    overflow: hidden;

    background: #0B0E18;

    border: 1px solid rgba(255, 255, 255, 0.03);

    border-radius: 20px;
}


.progress-fill {
    width: 0;

    height: 100%;

    background: var(--gradient);

    border-radius: inherit;

    transition: width 0.5s ease;
}


/* ==================================================
   CONTINUE BUTTON
================================================== */

.continue-button {
    width: 100%;

    margin-top: 0;

    padding: 12px 18px;
}


.continue-button:hover {
    transform: translateY(-2px);
}


/* ==================================================
   PROFILE MODULES
================================================== */

.profile-modules {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.profile-module {
    padding: 24px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}


.profile-module:hover {
    transform: translateY(-3px);

    background: var(--card-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.20);
}


.profile-module-top {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}


.profile-module-top > div {
    min-width: 0;
}


.profile-module-top h3 {
    margin: 6px 0 0;

    font-size: 18px;

    line-height: 1.4;
}


.profile-module-top strong {
    flex-shrink: 0;

    color: var(--blue);

    font-size: 16px;

    white-space: nowrap;
}


.module-course {
    color: var(--text-secondary);

    font-size: 11px;

    font-weight: 600;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.profile-module .progress-bar {
    margin-bottom: 0;
}


/* ==================================================
   COMPLETED LESSONS
================================================== */

.completed-lessons {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.completed-lesson {
    display: flex;

    align-items: center;

    gap: 18px;

    padding: 20px 22px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}


.completed-lesson:hover {
    transform: translateX(4px);

    background: var(--card-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.18);
}


.completed-lesson-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    width: 44px;
    height: 44px;

    border-radius: 50%;

    background:
        rgba(36, 123, 255, 0.12);

    border: 1px solid
        rgba(36, 123, 255, 0.25);

    color: var(--blue);

    font-size: 20px;

    font-weight: 700;
}


.completed-lesson-info {
    flex: 1;

    min-width: 0;
}


.completed-lesson-info > span {
    color: var(--blue);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.completed-lesson-info h3 {
    margin: 4px 0;

    font-size: 17px;

    line-height: 1.35;
}


.completed-lesson-info p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 13px;
}


.completed-lesson > strong {
    flex-shrink: 0;

    color: var(--blue);

    font-size: 14px;

    white-space: nowrap;
}


/* ==================================================
   EMPTY RESULTS
================================================== */

.empty-results {
    padding: 50px 25px;

    text-align: center;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);
}


.empty-results > span {
    display: block;

    margin-bottom: 15px;

    font-size: 36px;
}


.empty-results h3 {
    margin: 0 0 8px;

    font-size: 20px;
}


.empty-results p {
    max-width: 500px;

    margin: 0 auto;

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.6;
}


/* ==================================================
   FUTURE FEATURES
================================================== */

.profile-features {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}


.feature-card {
    padding: 28px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}


.feature-card:hover {
    transform: translateY(-4px);

    background: var(--card-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.20);
}


.feature-card > span {
    display: block;

    margin-bottom: 18px;

    font-size: 30px;
}


.feature-card h3 {
    margin: 0 0 8px;

    font-size: 19px;
}


.feature-card p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.6;
}


/* ==================================================
   PROFILE LOGOUT BUTTON
================================================== */

#profileLogoutButton {
    background: transparent;

    border: 1px solid var(--border);

    color: var(--text-secondary);

    box-shadow: none;
}


#profileLogoutButton:hover {
    background: rgba(255, 255, 255, 0.05);

    border-color: var(--blue);

    color: white;

    box-shadow:
        0 8px 20px
        rgba(36, 123, 255, 0.10);
}


/* ==================================================
   ANIMATIONS
================================================== */

@keyframes profileAppear {

    from {
        opacity: 0;

        transform:
            translateY(20px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


@keyframes cardAppear {

    from {
        opacity: 0;

        transform:
            translateY(25px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 1024px) {

    .profile-page {
        padding-top: 50px;
    }


    .profile-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .profile-courses {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .profile-features {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 768px) {

    .profile-page {
        padding:
            40px 15px 70px;
    }


    .profile-header {
        padding: 30px;
    }


    .profile-stats {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .stat-card {
        min-height: 120px;
    }


    .profile-section {
        margin-top: 50px;
    }


    .profile-courses {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .profile-modules {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .profile-features {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .section-heading {
        margin-bottom: 20px;
    }


    .section-heading h2 {
        font-size: 28px;
    }


    .completed-lesson {
        align-items: flex-start;

        padding: 18px;
    }

}


/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width: 480px) {

    .profile-header {
        padding: 25px;
    }


    .profile-header h1 {
        font-size: 38px;
    }


    .profile-course {
        min-height: 270px;

        padding: 24px;
    }


    .profile-course-top {
        gap: 10px;
    }


    .profile-course h3 {
        font-size: 22px;
    }


    .profile-module {
        padding: 20px;
    }


    .profile-module-top {
        gap: 12px;
    }


    .profile-module-top h3 {
        font-size: 16px;
    }


    .completed-lesson {
        gap: 12px;
    }


    .completed-lesson-icon {
        width: 36px;
        height: 36px;

        font-size: 17px;
    }


    .completed-lesson-info h3 {
        font-size: 15px;
    }


    .completed-lesson > strong {
        display: none;
    }


    .feature-card {
        padding: 24px;
    }

}

/* ==================================================
   HEADER — АККАУНТ
================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 5px 14px 5px 5px;

    background: rgba(36, 123, 255, 0.08);
    border: 1px solid rgba(36, 123, 255, 0.25);
    border-radius: 999px;
}

.header-user[hidden] {
    display: none;
}

.header-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    background: var(--gradient);
    border-radius: 50%;

    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.header-email {
    max-width: 200px;

    overflow: hidden;

    color: var(--text);
    font-size: 14px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {

    .header-email {
        display: none;
    }

    .header-user {
        padding: 5px;
    }

}