* {
    box-sizing: border-box;
}


html {
    background: #080a09;
}


body {
    margin: 0;

    background: #080a09;

    color: #f4f4f4;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;

    width: 240px;
    height: 100vh;

    padding: 32px 24px;

    background: #0d100e;

    border-right:
        1px solid #1b211d;
}


/* =========================================================
   CODEMASTER — REAL LAYERED 3D
========================================================= */

.logo-3d-wrap {
    position: relative;

    width: 195px;
    height: 46px;

    margin-bottom: 48px;

    font-family:
        Arial Black,
        Arial,
        Helvetica,
        sans-serif;

    font-size: 30px;

    font-weight: 900;

    line-height: 1;

    letter-spacing: -2px;

    white-space: nowrap;

    user-select: none;

    cursor: default;

    perspective: 800px;

    transform-style: preserve-3d;

    animation:
        codemasterLogoEnter 0.65s cubic-bezier(0.34,
            1.56,
            0.64,
            1);
}


.logo-3d-wrap span {
    position: absolute;

    top: 0;
    left: 0;

    display: block;

    white-space: nowrap;

    transition:
        transform 0.24s ease,
        color 0.24s ease;
}


/* =========================================================
   BACK DEPTH
========================================================= */

.logo-3d-back {
    z-index: 1;

    color: #063b1a;

    transform:
        translate(11px,
            11px);

    text-shadow:
        2px 3px 3px rgba(0,
            0,
            0,
            0.6);
}


/* =========================================================
   MIDDLE DEPTH
========================================================= */

.logo-3d-middle {
    z-index: 2;

    color: #09612a;

    transform:
        translate(8px,
            8px);
}


/* =========================================================
   NEAR DEPTH
========================================================= */

.logo-3d-near {
    z-index: 3;

    color: #159844;

    transform:
        translate(4px,
            4px);
}


/* =========================================================
   FRONT
========================================================= */

.logo-3d-front {
    z-index: 10;

    color: #43ff7b;

    transform:
        translate(0,
            0);

    text-shadow:
        0 -1px 0 rgba(224,
            255,
            232,
            0.55),

        0 1px 0 #32e86d;
}


/* =========================================================
   LOGO HOVER
========================================================= */

.logo-3d-wrap:hover .logo-3d-front {
    color: #66ff94;

    transform:
        translate(-2px,
            -2px);
}


.logo-3d-wrap:hover .logo-3d-near {
    transform:
        translate(5px,
            5px);
}


.logo-3d-wrap:hover .logo-3d-middle {
    transform:
        translate(9px,
            9px);
}


.logo-3d-wrap:hover .logo-3d-back {
    transform:
        translate(13px,
            13px);
}


/* =========================================================
   LOGO ENTER
========================================================= */

@keyframes codemasterLogoEnter {

    from {
        opacity: 0;

        transform:
            translateY(-12px) scale(0.8);
    }

    to {
        opacity: 1;

        transform:
            translateY(0) scale(1);
    }

}


/* =========================================================
   SIDEBAR NAVIGATION
========================================================= */

.sidebar-nav {
    display: flex;

    flex-direction: column;

    gap: 14px;
}


.sidebar-nav a {
    padding:
        12px 14px;

    color: #8d9690;

    border-radius: 8px;

    text-decoration: none;

    transition: 0.2s;
}


.sidebar-nav a:hover {
    background: #151a17;

    color: #ffffff;
}


.sidebar-user {
    padding:
        4px 14px;

    color: #39ff88;

    font-size: 13px;

    font-weight: 700;
}


/* =========================================================
   MAIN
========================================================= */

.main-content {
    margin-left: 240px;

    min-height: 100vh;

    padding:
        64px 72px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    max-width: 750px;

    margin-bottom: 64px;
}


.eyebrow {
    margin-bottom: 16px;

    color: #39ff88;

    font-size: 13px;

    font-weight: bold;

    letter-spacing: 2px;
}


.hero h1 {
    margin:
        0 0 20px;

    font-size: 52px;

    line-height: 1.05;

    letter-spacing: -2px;
}


.hero-text {
    margin: 0;

    color: #858d87;

    font-size: 18px;
}


/* =========================================================
   LANGUAGES
========================================================= */

.languages-section h2 {
    margin-bottom: 24px;

    font-size: 24px;
}


.language-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit,
            minmax(240px,
                1fr));

    gap: 18px;

    max-width: 1000px;
}


.language-card {
    display: block;

    min-height: 150px;

    padding: 24px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;

    color: white;

    text-decoration: none;

    transition: 0.2s;
}


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

    border-color: #39ff88;

    background: #121813;
}


.language-card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 44px;
}


.language-name {
    font-size: 21px;

    font-weight: 700;
}


.language-arrow {
    color: #39ff88;

    font-size: 22px;
}


.language-card p {
    margin: 0;

    color: #7f8881;

    font-size: 14px;
}


.language-card-icon {
    width: 48px;
    height: 48px;

    margin-bottom: 26px;
}


.language-card-icon img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* =========================================================
   LANGUAGE DETAIL
========================================================= */

.language-header {
    margin-bottom: 40px;
}


.language-header h1 {
    margin:
        0 0 12px;

    font-size: 48px;
}


.language-header p {
    color: #858d87;
}


.language-progress {
    max-width: 900px;

    margin-bottom: 48px;
}


/* =========================================================
   TOPICS
========================================================= */

.topic-grid {
    display: grid;

    gap: 16px;

    max-width: 900px;
}


.topic-card {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        24px 28px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;

    color: white;

    text-decoration: none;

    transition: 0.2s;
}


.topic-card:hover {
    border-color: #39ff88;

    transform:
        translateX(4px);
}


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

    font-size: 20px;
}


.topic-card p {
    margin: 0;

    color: #7f8881;
}


.topic-card span {
    color: #39ff88;

    font-size: 24px;
}


.topic-card-content {
    flex: 1;
}


.topic-card-right {
    display: flex;

    align-items: center;

    gap: 20px;

    margin-left: 30px;
}


.topic-percent {
    color: #39ff88;

    font-size: 14px !important;

    font-weight: 700;
}


.topic-progress-bar {
    width: 100%;

    max-width: 500px;

    height: 6px;

    margin-top: 14px;

    background: #1a201c;

    border-radius: 999px;

    overflow: hidden;
}


.topic-progress-fill {
    height: 100%;

    background: #39ff88;

    border-radius: 999px;
}


/* =========================================================
   TOPIC DETAIL
========================================================= */

.topic-header {
    margin-bottom: 40px;
}


.topic-header h1 {
    margin:
        0 0 12px;

    font-size: 46px;
}


.topic-header p {
    color: #858d87;
}


.topic-progress {
    max-width: 900px;

    margin-bottom: 32px;
}


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

.progress-info {
    display: flex;

    justify-content: space-between;

    margin-bottom: 10px;

    color: #b7bdb9;

    font-size: 14px;
}


.progress-bar {
    width: 100%;

    height: 10px;

    background: #171c18;

    border-radius: 999px;

    overflow: hidden;
}


.progress-fill {
    height: 100%;

    background: #39ff88;

    border-radius: 999px;

    transition:
        width 0.3s;
}


.progress-percent {
    margin-top: 8px;

    color: #39ff88;

    font-size: 13px;

    font-weight: 700;
}


/* =========================================================
   PROBLEMS LIST
========================================================= */

.problems-list {
    display: grid;

    gap: 14px;

    max-width: 900px;
}


.problem-card {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        20px 24px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 12px;

    color: white;

    text-decoration: none;

    transition: 0.2s;
}


.problem-card:hover {
    border-color: #39ff88;

    transform:
        translateX(4px);
}


.problem-info {
    display: flex;

    align-items: center;

    gap: 20px;
}


.problem-number {
    color: #39ff88;

    font-size: 14px;

    font-weight: 700;
}


.problem-card h3 {
    margin:
        0 0 6px;
}


.problem-card p {
    margin: 0;

    color: #7f8881;

    font-size: 14px;
}


.problem-arrow {
    color: #39ff88;

    font-size: 22px;
}


.problem-status {
    width: 18px;

    color: #39ff88;

    font-weight: 700;
}


/* =========================================================
   FILTERS
========================================================= */

.problem-filters {
    display: grid;

    gap: 16px;

    max-width: 900px;

    margin-bottom: 28px;
}


.filter-group {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;
}


.filter-label {
    min-width: 85px;

    color: #7f8881;

    font-size: 13px;
}


.filter-button {
    padding:
        8px 13px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 8px;

    color: #9da59f;

    cursor: pointer;

    transition: 0.2s;
}


.filter-button:hover {
    border-color: #39ff88;

    color: white;
}


.filter-button.active {
    background:
        rgba(57,
            255,
            136,
            0.12);

    border-color: #39ff88;

    color: #39ff88;
}


.no-filter-results {
    color: #7f8881;
}


/* =========================================================
   SEARCH
========================================================= */

.problem-search {
    max-width: 900px;

    margin-bottom: 20px;
}


.problem-search-input {
    width: 100%;

    padding:
        13px 16px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 10px;

    color: white;

    font-size: 14px;

    outline: none;

    transition: 0.2s;
}


.problem-search-input::placeholder {
    color: #69716b;
}


.problem-search-input:focus {
    border-color: #39ff88;
}


/* =========================================================
   PROBLEM DETAIL
========================================================= */

.problem-header {
    margin-bottom: 32px;
}


.problem-title-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;
}


.problem-title-row h1 {
    margin: 0;

    font-size: 44px;
}


.difficulty-badge {
    padding:
        8px 12px;

    border-radius: 999px;

    font-size: 12px;

    font-weight: 700;

    text-transform: uppercase;
}


.difficulty-easy {
    background:
        rgba(57,
            255,
            136,
            0.12);

    color: #39ff88;
}


.difficulty-medium {
    background:
        rgba(255,
            200,
            70,
            0.12);

    color: #ffc846;
}


.difficulty-hard {
    background:
        rgba(255,
            90,
            90,
            0.12);

    color: #ff5a5a;
}


.problem-content {
    display: grid;

    gap: 18px;

    max-width: 900px;
}


.problem-section {
    padding: 26px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;
}


.problem-section h2 {
    margin-top: 0;

    margin-bottom: 14px;
}


.problem-section p {
    margin: 0;

    color: #b7bdb9;

    line-height: 1.7;
}


.problem-section summary {
    cursor: pointer;

    color: white;

    font-size: 20px;

    font-weight: 700;
}


.problem-section summary:hover {
    color: #39ff88;
}


.problem-section[open] summary {
    margin-bottom: 16px;
}


.problem-section pre {
    margin: 0;

    padding: 16px;

    background: #090c0a;

    border:
        1px solid #1d241f;

    border-radius: 10px;

    color: #d8ded9;

    font-family: monospace;

    font-size: 14px;

    white-space: pre-wrap;
}


.code-block {
    color: #39ff88 !important;
}


/* =========================================================
   EXAMPLES
========================================================= */

.example-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 18px;
}


.example-grid h3 {
    margin-top: 0;

    color: #858d87;

    font-size: 14px;
}


/* =========================================================
   SOLVED
========================================================= */

.solve-button {
    margin-top: 24px;

    padding:
        14px 22px;

    background: #39ff88;

    color: #071008;

    border: none;

    border-radius: 10px;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;
}


.solve-button:hover {
    opacity: 0.85;
}


.solved-message {
    width: fit-content;

    margin-top: 24px;

    padding:
        14px 20px;

    background:
        rgba(57,
            255,
            136,
            0.12);

    border:
        1px solid rgba(57,
            255,
            136,
            0.3);

    border-radius: 10px;

    color: #39ff88;

    font-weight: 700;
}


/* =========================================================
   BREADCRUMBS
========================================================= */

.breadcrumbs {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 30px;

    font-size: 14px;
}


.breadcrumbs a {
    color: #858d87;

    text-decoration: none;
}


.breadcrumbs a:hover {
    color: #39ff88;
}


.breadcrumbs span {
    color: #555d57;
}


.breadcrumbs .breadcrumb-current {
    color: #c8ceca;
}


/* =========================================================
   PROBLEM LAYOUT
========================================================= */

.problem-layout {
    display: grid;

    grid-template-columns:
        minmax(0,
            1fr) minmax(420px,
            0.9fr);

    gap: 24px;

    align-items: start;
}


.problem-left {
    display: grid;

    gap: 18px;
}


/* =========================================================
   EDITOR
========================================================= */

.editor-panel {
    position: sticky;

    top: 32px;

    background: #0d100e;

    border:
        1px solid #202721;

    border-radius: 14px;

    overflow: hidden;
}


.editor-header {
    display: flex;

    justify-content: space-between;

    padding:
        14px 18px;

    background: #101411;

    border-bottom:
        1px solid #202721;

    color: #858d87;

    font-size: 13px;
}


.code-editor {
    width: 100%;

    height: 420px;

    min-height: 420px;

    overflow: hidden;

    background: #1e1e1e;
}


.editor-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    padding:
        14px 16px;

    background: #101411;

    border-top:
        1px solid #202721;
}


.run-button,
.submit-button {
    padding:
        10px 18px;

    border-radius: 8px;

    font-weight: 700;

    cursor: pointer;
}


.run-button {
    background: transparent;

    color: white;

    border:
        1px solid #343d36;
}


.submit-button {
    background: #39ff88;

    color: #071008;

    border: none;
}


.editor-result {
    min-height: 70px;

    padding: 16px;

    background: #080a09;

    border-top:
        1px solid #202721;

    color: #7f8881;

    font-family: monospace;

    font-size: 13px;
}


/* =========================================================
   PROBLEM NAVIGATION
========================================================= */

.problem-navigation {
    display: flex;

    justify-content: space-between;

    max-width: 900px;

    margin-top: 40px;
}


.problem-nav-button {
    display: inline-block;

    padding:
        12px 18px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 10px;

    color: white;

    text-decoration: none;

    transition: 0.2s;
}


.problem-nav-button:hover {
    border-color: #39ff88;

    color: #39ff88;
}


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

.profile-header {
    margin-bottom: 48px;
}


.profile-header h1 {
    margin:
        0 0 10px;

    font-size: 48px;
}


.profile-header p {
    color: #858d87;
}


.profile-section {
    max-width: 900px;

    margin-bottom: 48px;
}


/* =========================================================
   PROFILE OVERVIEW
========================================================= */

.profile-overview {
    max-width: 900px;

    padding: 26px;

    margin-bottom: 42px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;
}


.profile-overview-top {
    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    margin-bottom: 20px;
}


.profile-stat-label {
    color: #7f8881;

    font-size: 13px;
}


.profile-overview h2 {
    margin:
        6px 0 0;

    font-size: 32px;
}


.profile-big-percent {
    color: #39ff88;

    font-size: 32px;

    font-weight: 800;
}


/* =========================================================
   DIFFICULTY STATS
========================================================= */

.difficulty-stats {
    display: grid;

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

    gap: 14px;
}


.difficulty-stat-card {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 20px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 12px;
}


.difficulty-stat-card span {
    color: #8e9791;
}


.difficulty-stat-card strong {
    color: #39ff88;

    font-size: 22px;
}


/* =========================================================
   PROFILE LANGUAGES
========================================================= */

.profile-language-list {
    display: grid;

    gap: 14px;
}


.profile-language-card {
    display: block;

    padding: 22px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;

    color: white;

    text-decoration: none;
}


.profile-language-card:hover {
    border-color: #39ff88;
}


.profile-language-top {
    display: flex;

    justify-content: space-between;

    margin-bottom: 14px;
}


/* =========================================================
   RECENTLY SOLVED
========================================================= */

.recent-problem {
    display: flex;

    justify-content: space-between;

    padding:
        18px 20px;

    margin-bottom: 10px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 12px;

    color: white;

    text-decoration: none;
}


.recent-problem:hover {
    border-color: #39ff88;
}


.recent-problem p {
    margin:
        5px 0 0;

    color: #778079;

    font-size: 13px;
}


.recent-difficulty {
    color: #8e9791;

    font-size: 13px;
}

.recent-difficulty-easy {
    color: #39ff88;
    background: rgba(57, 255, 136, 0.12);
}

.recent-difficulty-medium {
    color: #ffc846;
    background: rgba(255, 200, 70, 0.12);
}

.recent-difficulty-hard {
    color: #ff5a5a;
    background: rgba(255, 90, 90, 0.12);
}


/* =========================================================
   STREAK
========================================================= */

.streak-stats {
    display: grid;

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

    gap: 14px;
}


.streak-card {
    display: flex;

    align-items: center;

    gap: 18px;

    padding: 22px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;

    transition: 0.2s;
}


.streak-card:hover {
    border-color: #39ff88;

    transform:
        translateY(-2px);
}


.streak-icon {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 54px;
    height: 54px;

    background: #151a17;

    border:
        1px solid #202721;

    border-radius: 12px;

    font-size: 28px;
}


.streak-card>div:last-child {
    display: flex;

    flex-direction: column;

    gap: 5px;
}


.streak-number {
    color: #39ff88;

    font-size: 30px;

    line-height: 1;
}


.streak-days {
    color: #7f8881;

    font-size: 13px;
}


/* =========================================================
   ACTIVITY
========================================================= */

.activity-header {
    margin-bottom: 18px;
}


.activity-header h2 {
    margin-bottom: 8px;
}


.activity-header p {
    margin: 0;

    color: #7f8881;

    font-size: 14px;
}


.activity-card {
    padding: 24px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;

    overflow-x: auto;
}


.activity-calendar {
    display: flex;

    gap: 12px;

    min-width: 520px;
}


.activity-days {
    display: grid;

    grid-template-rows:
        repeat(7,
            14px);

    gap: 5px;

    padding-top: 1px;
}


.activity-days span {
    display: flex;

    align-items: center;

    height: 14px;

    color: #69716b;

    font-size: 10px;
}


.activity-weeks {
    display: flex;

    gap: 5px;
}


.activity-week {
    display: grid;

    grid-template-rows:
        repeat(7,
            14px);

    gap: 5px;
}


.activity-day {
    width: 14px;
    height: 14px;

    border-radius: 3px;
}


.activity-level-0 {
    background: #171c18;

    border:
        1px solid #202721;
}


.activity-level-1 {
    background:
        rgba(57,
            255,
            136,
            0.22);
}


.activity-level-2 {
    background:
        rgba(57,
            255,
            136,
            0.42);
}


.activity-level-3 {
    background:
        rgba(57,
            255,
            136,
            0.68);
}


.activity-level-4 {
    background: #39ff88;
}


.activity-future {
    background: transparent;

    border:
        1px solid #151a17;
}


.activity-day:not(.activity-future) {
    transition: 0.15s;
}


.activity-day:not(.activity-future):hover {
    transform:
        scale(1.3);

    outline:
        1px solid #39ff88;
}


.activity-footer {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 5px;

    margin-top: 18px;

    color: #69716b;

    font-size: 11px;
}


/* =========================================================
   LEVEL + XP
========================================================= */

.level-card {
    max-width: 900px;

    padding: 26px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;
}


.level-card-top {
    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    margin-bottom: 22px;
}


.level-number {
    margin:
        5px 0 0;

    color: #39ff88;

    font-size: 42px;

    line-height: 1;
}


.xp-total {
    color: #39ff88;

    font-size: 22px;

    font-weight: 800;
}


.level-progress-info {
    display: flex;

    justify-content: space-between;

    margin-bottom: 10px;

    color: #8e9791;

    font-size: 13px;
}


.level-next-text {
    margin:
        10px 0 0;

    color: #69716b;

    font-size: 12px;
}


/* =========================================================
   AUTH
========================================================= */

.auth-card {
    max-width: 520px;

    padding: 28px;

    background: #101411;

    border:
        1px solid #202721;

    border-radius: 14px;
}


.auth-field {
    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-bottom: 20px;
}


.auth-field>label {
    color: #c7cdc9;

    font-size: 14px;

    font-weight: 700;
}


.auth-field input[type="text"],
.auth-field input[type="password"] {
    width: 100%;

    padding:
        13px 14px;

    background: #0b0e0c;

    border:
        1px solid #273029;

    border-radius: 9px;

    color: white;

    font-size: 14px;

    outline: none;
}


.auth-field input:focus {
    border-color: #39ff88;
}


.auth-submit {
    width: 100%;

    margin-top: 8px;
}


.auth-errors {
    color: #ff6969;

    font-size: 13px;
}


.auth-errors ul {
    margin: 0;

    padding-left: 18px;
}


.auth-bottom-text {
    margin:
        22px 0 0;

    color: #7f8881;

    font-size: 14px;
}


.auth-bottom-text a {
    color: #39ff88;

    text-decoration: none;
}


/* =========================================================
   LANGUAGE SELECTOR
========================================================= */

.language-choice {
    display: grid;

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

    gap: 12px;
}


.language-option {
    position: relative;

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 72px;

    padding:
        16px 18px;

    background: #0b0e0c;

    border:
        1px solid #273029;

    border-radius: 12px;

    color: #c7cdc9;

    cursor: pointer;

    transition: 0.2s;
}


.language-option:hover {
    background: #111612;

    border-color: #39ff88;

    transform:
        translateY(-2px);
}


.language-option input[type="radio"] {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.language-option:has(input[type="radio"]:checked) {
    background:
        rgba(57,
            255,
            136,
            0.08);

    border-color: #39ff88;

    color: white;
}


.language-flag {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 38px;
    height: 38px;

    background: #151a17;

    border:
        1px solid #273029;

    border-radius: 9px;

    font-size: 23px;

    flex-shrink: 0;
}


.language-option-text {
    font-size: 15px;

    font-weight: 700;
}


.language-option:has(input[type="radio"]:checked)::after {
    content: "✓";

    position: absolute;

    top: 10px;
    right: 12px;

    color: #39ff88;

    font-size: 13px;

    font-weight: 800;
}


/* =========================================================
   PROFILE ENTER ANIMATION
========================================================= */

.profile-enter-overlay[hidden] {
    display: none !important;
}


.profile-enter-overlay {
    position: fixed;

    inset: 0;

    z-index: 120000;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(5,
            5,
            5,
            0.96);

    backdrop-filter:
        blur(16px);

    opacity: 0;

    transition:
        opacity 0.25s ease;
}


.profile-enter-overlay.active {
    opacity: 1;
}


.profile-enter-glow {
    position: absolute;

    width: 520px;
    height: 520px;

    border-radius: 50%;

    background:
        radial-gradient(circle,

            rgba(74,
                222,
                128,
                0.22) 0%,

            rgba(74,
                222,
                128,
                0.07) 38%,

            transparent 72%);

    filter:
        blur(14px);

    transform:
        scale(0.4);

    opacity: 0;

    pointer-events: none;
}


.profile-enter-overlay.active .profile-enter-glow {
    animation:
        profileGlow 0.9s ease forwards;
}


.profile-enter-content {
    position: relative;

    z-index: 2;

    display: flex;

    flex-direction: column;

    align-items: center;

    width:
        min(420px,
            90vw);

    text-align: center;

    opacity: 0;

    transform:
        translateY(30px) scale(0.86);
}


.profile-enter-overlay.active .profile-enter-content {
    animation:
        profileContentIn 0.55s cubic-bezier(0.16,
            1,
            0.3,
            1) forwards;
}


.profile-avatar-ring {
    width: 122px;
    height: 122px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 24px;

    border-radius: 50%;

    padding: 4px;

    background:
        conic-gradient(from 0deg,
            #22c55e,
            #4ade80,
            #86efac,
            #22c55e);

    box-shadow:
        0 0 50px rgba(74,
            222,
            128,
            0.28);

    animation:
        profileRingSpin 1.2s linear infinite;
}


.profile-avatar-core {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #111111;

    color: #4ade80;

    font-size: 42px;

    font-weight: 900;

    border:
        5px solid #090909;
}


.profile-enter-content h2 {
    margin: 0;

    font-size:
        clamp(34px,
            7vw,
            48px);

    color: #ffffff;
}


.profile-enter-content p {
    margin:
        12px 0 26px;

    color:
        rgba(255,
            255,
            255,
            0.58);

    font-size: 16px;
}


.profile-enter-stats {
    width: 100%;

    display: grid;

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

    gap: 10px;

    margin-bottom: 26px;
}


.profile-enter-stats div {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 6px;

    padding:
        14px 10px;

    border-radius: 14px;

    background:
        rgba(255,
            255,
            255,
            0.035);

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

    opacity: 0;

    transform:
        translateY(14px);
}


.profile-enter-overlay.active .profile-enter-stats div:nth-child(1) {
    animation:
        profileStatIn 0.35s 0.18s forwards;
}


.profile-enter-overlay.active .profile-enter-stats div:nth-child(2) {
    animation:
        profileStatIn 0.35s 0.28s forwards;
}


.profile-enter-overlay.active .profile-enter-stats div:nth-child(3) {
    animation:
        profileStatIn 0.35s 0.38s forwards;
}


.profile-enter-stats span {
    font-size: 20px;

    color: #4ade80;

    font-weight: 800;
}


.profile-enter-stats small {
    color:
        rgba(255,
            255,
            255,
            0.55);

    font-size: 12px;
}


.profile-loader {
    width: 190px;
    height: 5px;

    overflow: hidden;

    border-radius: 999px;

    background:
        rgba(255,
            255,
            255,
            0.08);
}


.profile-loader-fill {
    width: 0%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(90deg,
            #22c55e,
            #4ade80,
            #86efac);
}


.profile-enter-overlay.active .profile-loader-fill {
    animation:
        profileLoader 0.85s ease forwards;
}


@keyframes profileContentIn {

    from {
        opacity: 0;

        transform:
            translateY(30px) scale(0.86);
    }

    to {
        opacity: 1;

        transform:
            translateY(0) scale(1);
    }

}


@keyframes profileGlow {

    from {
        opacity: 0;

        transform:
            scale(0.4);
    }

    to {
        opacity: 0.9;

        transform:
            scale(1.5);
    }

}


@keyframes profileRingSpin {

    from {
        transform:
            rotate(0deg);
    }

    to {
        transform:
            rotate(360deg);
    }

}


@keyframes profileStatIn {

    from {
        opacity: 0;

        transform:
            translateY(14px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


@keyframes profileLoader {

    from {
        width: 0%;
    }

    to {
        width: 100%;
    }

}


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

@media (max-width: 1100px) {

    .problem-layout {
        grid-template-columns: 1fr;
    }


    .editor-panel {
        position: static;
    }

}


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

@media (max-width: 800px) {

    .sidebar {
        position: static;

        width: 100%;

        height: auto;
    }


    .logo-3d-wrap {
        margin-bottom: 30px;

        font-size: 28px;

        height: 42px;
    }


    .sidebar-nav {
        flex-direction: row;

        flex-wrap: wrap;
    }


    .main-content {
        margin-left: 0;

        padding:
            36px 24px;
    }


    .hero h1 {
        font-size: 38px;
    }

}


@media (max-width: 700px) {

    .example-grid {
        grid-template-columns: 1fr;
    }


    .difficulty-stats {
        grid-template-columns: 1fr;
    }


    .streak-stats {
        grid-template-columns: 1fr;
    }


    .language-choice {
        grid-template-columns: 1fr;
    }


    .activity-card {
        padding: 18px;
    }


    .level-card-top {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }


    .problem-title-row {
        flex-direction: column;

        align-items: flex-start;
    }


    .problem-navigation {
        gap: 10px;
    }

}