:root {
    /*--bg: oklch(.932 .032 255.585);*/
    --bg: #f5f5f5;
    --text: #111;
    --card: #fff;
    --primary: oklch(.932 .032 255.585);
    --color-button: oklch(.379 .146 265.522);
    --header-shadow-color-rgb: 0, 0, 0;
    --white: #fff;
    --text-color-primary: #333;
}



body {
    /*font-family: Arial, sans-serif;*/
    font-family: Arial;
   /* font-family: 'Inter', sans-serif;*/
    margin: 0;
   /* background: var(--bg);*/
    font-size: 16px;
    font-weight: 600;
}

header {
    background: #111;
    color: white;
    /*padding: 15px;*/
    background: var(--white);
    box-shadow: 1px 0px 2px rgba(var(--header-shadow-color-rgb), 0.23);
}

nav a {
    color: var(--text-color-primary);
    margin-right: 15px;
    text-decoration: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
   /* background: white;*/
   /* padding: 20px;*/
    border-radius: 8px;
}


[data-theme="dark"] {
    --bg: #111;
    --text: #fff;

}

.CodeMirror {
    background: #0f172a;
    color: #e2e8f0;
    font-size: 15px;
    border-radius: 12px;
    padding: 10px;
}

.CodeMirror-gutters {
    background: #0b1220;
    border-right: 1px solid #1e293b;
}

#sql-editor {
    width: 100%;


    background: #263238;
    color: #EEFFFF;

    border: none;
    outline: none;

    resize: none;

    padding: 15px;

    font-size: 16px;
    font-family: monospace;

    border-radius: 12px;
}

.editor-wrapper{
    width: 100%;
    border-radius: 10px;
    overflow: hidden; /* ключевое */
    border: 1px solid #ddd;
    background: #fff;
}

.editor-wrapper {
    min-height: 300px;
    background: #263238;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

/* дефолтное состояние */
.editor-loading::before {
    content: '';
    display: block;
    width: 100%;

    background: #263238;
}

/* когда codemirror загрузился */


/* layout */
.task-layout {
    display: flex;
    gap: 20px;
}


.hint-box {
    padding: 10px;
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
    border-radius: 6px;
}

.hidden {
    display: none;
}

.table-preview {
    margin-top: 10px;
    padding: 10px;
    background: #0f172a;
    color: #fff;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
}

/* right block */
.task-right {
    width: 45%;
}

/* left block */
.task-left {
    width: 55%
}

/* описание */
.task-description {
    background: var(--card);

    border-radius: 10px;
    margin-top: 10px;
}

/* кнопка */
.btn-primary {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--primary);
    color: var(--color-button);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* результат */
.result-box {
    margin-top: 20px;
}

/* таблица */
.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

/* alerts */
.alert {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
}

.alert.success {
    background: #d4edda;
}

.alert.error {
    background: #f8d7da;
}


.page-title {
    margin-bottom: 20px;
}


.tasks-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.task-header h3{
    margin: 0 0 10px 0;
}

.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
}

.task-desc {
    margin: 10px 0;
    color: #555;
    font-size: 14px;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    text-decoration: none;
    color: #111;
    font-size: 14px;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}


.badge {
   /* background: var(--bg);
    color: var(--primary);*/
}

.sql-table {
    width: 100%;
    border-collapse: collapse;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    border-radius: 10px;
    overflow: hidden;
}

.sql-table th {
    background: #111827;
    color: #fff;
    text-align: left;
    padding: 10px;
}

.sql-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.sql-table tr:hover {
    background: #f9fafb;
}


.user-stats {
    background: #1e1e2f;
    padding: 10px 15px;
    border-radius: 10px;
    color: #fff;
    margin-bottom: 15px;
}

.xp {
    color: #4ade80;
    font-weight: bold;
    margin-top: 5px;
}

.xp-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #22c55e;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 18px;

    animation: xpFloat 1.5s ease-out forwards;
    z-index: 9999;
}



.tasks-layout {
    display: flex;
    /*height: calc(100vh - 60px);*/
}

/* SIDEBAR */
.tasks-sidebar {
    width: 260px;
    /*background: #f2f2f2;*/
   /* color: #fff;*/
    padding: 20px;
    overflow-y: auto;
    border-radius: 10px;

    font-size: 15px;
}

.sidebar-title {
    margin-bottom: 15px;
    font-size: 18px;
}

.task-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 5px;
    margin-bottom: 6px;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    transition: 0.2s;
}

.task-link:hover {
    background: #f2f2f2;
}

.task-link.active {
    background: #e0efff;
    color: var(--color-button);
}

.status {
    width: 20px;
}

/* CONTENT */
.tasks-content {
    flex: 1;
    overflow-y: auto;
}




@keyframes xpFloat {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(1.1);
    }
}


.topic-header {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px;
}

.topic-tasks {
    margin-left: 10px;
}

.topic-tasks.hidden {
    display: none;
}


span:hover .tooltip {
    visibility: visible;
}





.footer {
    padding: 20px;
    background: #111827;
    color: #9ca3af;
}

.footer-container {
   /* max-width: 1100px;*/
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-block {
    min-width: 200px;
    max-width: 400px;
}


.footer-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-text {
    font-size: 14px;
}

.footer-links a {
    display: block;
    color: #9ca3af;
    text-decoration: none;
    margin-bottom: 5px;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}


.pricing-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.pricing-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.pricing-header p {
    color: #666;
    margin-bottom: 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.pricing-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 25px;
    text-align: left;
    position: relative;
    transition: 0.2s;
}

.pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.pricing-card--highlight {
    border: 2px solid #4f46e5;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4f46e5;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
}

.price {
    font-size: 28px;
    margin: 15px 0;
}

.price span {
    font-size: 14px;
    color: #777;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.pricing-card li {
    margin-bottom: 8px;
    font-size: 14px;
}

.pricing-footer {
    margin-top: 40px;
    color: #777;
}





.legal-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
    color: #111;
}

.legal-header {
    margin-bottom: 40px;
    background: var(--primary);!important;
    color: #111;
    border-radius: 5px;
    box-shadow: none;
}

.legal-header h1 {
    font-size: 34px;
    margin-bottom: 10px;
    font-weight: 700;
}

.legal-header p {
    color: #666;
    font-size: 16px;
}

.legal-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.legal-section h2 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.legal-section p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}




/* ===== SIDEBAR BASE ===== */
tasks-layout {
    display: flex;
}

/* ===== DESKTOP ===== */
.tasks-sidebar {
    width: 320px;
    background: white;
    border-right: 1px solid #eee;
    height: 100vh;
    overflow-y: auto;
}


/* ===== CONTENT ===== */
.tasks-content {
    flex: 1;

}

/* ===== LAYOUT ===== */
.tasks-layout {
    display: flex;
}



.sidebar-toggle {
    display: block;
    position: fixed;
    bottom: 20px;
    left: 10px;
    z-index: 60;
    background: #2563eb;
    color: white;
    padding: 8px 10px;
    border-radius: 10px;
}

.tasks-sidebar.open {
    transform: translateX(0);
}
.tasks-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    background: white;
    z-index: 1000;

    transform: translateX(-100%);
    transition: 0.3s ease;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
}


.tab-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.tab-active {
    position: relative;
    opacity: 1;
}

.tab-btn {
    padding: 10px 10px;
    transition: 0.2s;
}

.tab-btn:active {
    transform: scale(0.96);
}

.tab-btn.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 40;
}



.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #ccc;
}

.tabs-header-right{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #e0efff;
    border-bottom: 1px solid #ccc;
    padding: 10px 10px
}

/* Табы */
.tabs-left {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;

    /* Firefox */
    scrollbar-width: none;

    /* IE / Edge legacy */
    -ms-overflow-style: none;
}


/* Убираем перенос кнопок */
.tabs-left button {
    flex-shrink: 0;
}

/* Навигация */
.tabs-right {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}


.tabs-left {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs-left::-webkit-scrollbar {
    display: none;
}


/* контейнер */
.breadcrumbs {
    font-size: 14px;
    color: #6b7280;
    /*margin-bottom: 16px;*/

    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */

    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.breadcrumbs::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

/* список */
.breadcrumbs__list {
    display: flex;
    align-items: center;
    gap: 6px;

    white-space: nowrap;
}

/* элементы */
.breadcrumbs__item {
    flex-shrink: 0;
    padding: 5px 0 0 0;
}

/* ссылки */
.breadcrumbs__link {
    color: #6b7280;
    text-decoration: none;

    max-width: 140px;
    display: inline-block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 5px;
}

.breadcrumbs__link:hover {
    color: #2563eb;
}

/* текущий */
.breadcrumbs__current {
    color: #111827;
    font-weight: 500;

    max-width: 140px;
    display: inline-block;

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

/* разделитель */
.breadcrumbs__separator {
    color: #9ca3af;
    flex-shrink: 0;
}

.breadcrumbs__separator {
    display: flex;
    align-items: center;
    color: #9ca3af;
}

.breadcrumbs__icon {
    width: 14px;
    height: 14px;
}


.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    background: #f3f4f6;
    color: #555;

    transition: all 0.25s ease;
}
.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-btn {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
    background: #f3f4f6;

    transition: all 0.25s ease;
}

.social-btn img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* hover */
.social-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: #e5e7eb;
}


details summary::-webkit-details-marker {
    display: none;
}

details summary {
    list-style: none;
}

/* убираем стандартную стрелку */
.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary {
    list-style: none;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: center;

    font-weight: 600;
    color: #1f2937;
}

/* карточка */
.faq-item {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* стрелка */
.faq-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    transition: transform 0.25s ease;
}

/* поворот */
details[open] .faq-icon {
    transform: rotate(180deg);
}

/* текст */
.faq-content {
    margin-top: 10px;
    color: #4b5563;
    line-height: 1.6;
}


/*  MOBILE */
@media (max-width: 768px) {

    .breadcrumbs {
        font-size: 13px;
    }

    .breadcrumbs__link,
    .breadcrumbs__current {
        max-width: 100px;
    }

    .breadcrumbs__link {
        margin: 0;
    }


    .tab-btn {
        padding: 10px 5px;
        font-size: 13px;
    }

    .tabs-left {
        /*padding-top: 5px;*/
    }

    .tabs-right {
        order: 1;
        justify-content: flex-end;
    }

    .tabs-header {
        overflow-x: auto;
    }


    .block__bred nav a {
        font-size: 10px;
        margin: 0;
        padding: 10px 0;
    }

}



/* ===== MOBILE ===== */
@media (max-width: 768px) {




    .container {
        max-width: 100%!important;
    }

    .sidebar-toggle {
        position: fixed;
        bottom: 7px;
        left: 6px;
        z-index: 60;
        background: #2563eb;
        color: white;
        padding: 8px 10px;
        border-radius: 10px;
    }



    .tasks-content {
        width: 100%;
    }

    .tasks-layout {
        flex-direction: column;
    }

    .tasks-sidebar.open {
        transform: translateX(0);
    }




}


.prose.max-w-none.prose-neutral p{
    margin-bottom: 15px!important;
}

.prose.max-w-none.prose-neutral pre{
    margin-bottom: 10px!important;
}

.prose.max-w-none.prose-neutral h3{
    margin-bottom: 15px!important;
}

.prose.max-w-none.prose-neutral hr{
    margin-bottom: 10px!important;
}


/*blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
    margin: 15px!important;
}*/


.prose p {
    margin-bottom: 10px;
}

.prose h1,
.prose h2,
.prose h3 {
    margin-top: 16px;
    margin-bottom: 8px;
}

.prose ul {
    margin: 10px 0;
    padding-left: 20px;
}

.prose li {
    margin-bottom: 6px;
}

.prose pre {
    margin: 12px 0;
    padding: 10px;
    background: #f3f4f6;
    border-radius: 6px;
}

.dots {
    background-image: radial-gradient(rgba(37, 99, 235, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;

    /* плавное исчезновение вниз */
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}




@media (min-width: 768px) {
    .tasks-grid {
        /*grid-template-columns: repeat(2, 1fr);*/
    }
}



.task-page{
    padding:20px 0;
    background:#fafafa;

}

.task-container{
    max-width:1600px;
    margin:0 auto;
    padding:0 20px;
}

.task-layout{
    display:flex;
    gap:20px;
}

.task-sidebar{
    width:50%;
    display:flex;
}

.task-editor{
    width:50%;
}


.task-full-height{
    height:calc(100vh - 160px);
    display:flex;
    flex-direction:column;
}

.tabs-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid #eee;
    padding: 0 0 10px 0;
}

.tabs-left{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.tab-btn{
    border:none;
    background:#f3f4f6;
    padding:10px 18px;
    border-radius:10px;
    cursor:pointer;
    transition:.3s;
    font-size:14px;
}

.tab-btn:hover{
    background: #ffebdf;
}

.tab-btn.active{

    background:#ffc4a0;
    color:#000000;
}

.tabs-nav{
    display:flex;
    gap:10px;
}

.nav-btn{
    width:40px;
    height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f3f4f6;
    border-radius:10px;
    text-decoration:none;
    color:#111;
    transition:.3s;
}

.nav-btn:hover{
    background:#dbeafe;
}

.task-content{
    padding:25px;
    overflow:auto;
    flex:1;
}

.task-number{
    font-size:14px;
    color:#999;
    margin-bottom:10px;
}

.task-title{
    font-size:20px;
    font-weight:700;
    margin-bottom:20px;
    color:#111827;
}

.task-description{
    color:#4b5563;
    line-height:1.8;
    white-space:pre-line;
    font-size: 19px;
}

.hidden{
    display:none;
}

.empty-text{
    color:#999;
}

.attempt-card{
    border:1px solid #eee;
    border-radius:14px;
    padding:15px;
    margin-bottom:15px;
}

.attempt-header{
    display:flex;
    justify-content:space-between;
    margin-bottom:10px;
}

.success-text{
    color:#16a34a;
    font-weight:600;
}

.error-text{
    color:#dc2626;
}

.attempt-sql{
    background:#f9fafb;
    padding:15px;
    border-radius:10px;
    overflow:auto;
    font-size:13px;
}

.editor-header{
    padding:10px 0 10px 0;
    border-bottom:1px solid #eee;
    font-size:18px;
    font-weight:600;
}

.editor-content{
    flex:1;
    overflow:auto;
    padding:20px 0;
}

.resizer{
    width:8px;
    position:relative;
    cursor:col-resize;
}

.resizer-line{
    position:absolute;
    left:50%;
    top:0;
    width:2px;
    height:100%;
    background:#d1d5db;
}

#er-diagram{
    width:100%;
    height:100%;
}

@media(max-width:992px){

    .task-layout{
        flex-direction:column;
    }

    .task-sidebar,
    .task-editor{
        width:100%;
    }

    .task-full-height{
        height:auto;
    }

}






.tasks-page{
    padding:50px 0;
    min-height:100vh;
    /*background:linear-gradient(to bottom right,#eff6ff,#ffffff);*/
    background-color: #f7f7f7;
}

.tasks-container{
    max-width:1400px;
    margin:0 auto;
    padding:0 10px;
}

.tasks-filters{
    margin-bottom:40px;
    display:flex;
    gap:15px;
    flex-wrap:wrap;
    align-items:center;
}

.filter-all{
    padding:10px 18px;
    border-radius:10px;
    background:#e5e7eb;
    text-decoration:none;
    color:#111827;
    transition:.3s;
}

.filter-all:hover{
    background:#d1d5db;
}

.post-tag{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.btn-medium{
    padding:10px 18px;
    border-radius:10px;
    text-decoration:none;
    font-size:14px;
    font-weight:500;
    transition:.3s;
}

.fashion{
    background:#dbeafe;
    color:#2563eb;
}

.health{
    background:#dcfce7;
    color:#16a34a;
}

.travel{
    background:#fed7aa;
    color:#ea580c;
}

.btn-medium.active{
    background:#111827;
    color:#fff;
}

.tasks-header{
    margin-bottom:20px;
}

.tasks-title{
    font-size:42px;
    font-weight:700;
    color:#111827;
    margin-bottom:10px;
}

.tasks-subtitle{
    color:#6b7280;
    font-size:18px;
}

.tasks-description{
    max-width:800px;
    margin-bottom:50px;
}

.tasks-description p{
    color:#4b5563;
    line-height:1.8;
    font-size:16px;
}

.task-card{
    padding:10px 20px;
    border-radius:20px;
    background:#fff;
    border:1px solid #e5e7eb;
    margin-bottom:30px;
    transition:.3s;
    height:100%;
    width:100%;
    position: relative;
}


.task-card:hover{
   /* transform:translateY(-5px);*/
    box-shadow:0 10px 30px rgba(0,0,0,.06);

    border-color: #ddd;
}





.task-card-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    margin-bottom:5px;
}

.task-title-card span{
    font-size: 10px;
    color:#6b7280;
}

.task-title-card a{
    font-size:24px;
    font-weight:600;
    color:#111827;
    text-decoration:none;
    line-height:1.4;
}

.task-title-card a:hover{
    color:#2563eb;
}

.task-status{
    width:14px;
    height:14px;
    border-radius:50%;
    background:#d1d5db;
    flex-shrink:0;
    margin-left:15px;
    margin-top: 7px;
}

.task-status.success{
    background:#22c55e;
}

.task-card-description{
    margin-bottom:30px;
}

.task-card-description p{
    color:#6b7280;
    line-height:1.7;
}

.task-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:auto;
}

.task-label{
    font-size:14px;
    font-weight:600;

    min-width: 100px;
    text-align: center;
    padding: 5px 25px;
    border-radius: 15px;
    color: #222;
}

.task-label.solved{
    background-color: #e6f9ed;
}

.task-label.new{
    background-color: #ffebdf;
    transition: background-color 0.3s ease;
}

.task-label.new:hover{
    background-color: #ffc4a0;
}





.task-card-link{
    display:block;
    text-decoration:none;
    color:inherit;
}

.task-lock svg{
    width:18px;
    color: #ff4c4c;
}

.task-lock svg:hover{

}


@media(max-width:768px){

    .tasks-title{
        font-size:32px;
    }

    .tasks-filters{
        flex-direction:column;
        align-items:flex-start;
    }

}

/*.header-top-area{
    display:none;
}*/

.header-mid-area {
    display:none;
}

.page-container{
    width:100%;
    padding:0;
    background:#fff;
}

.content-container{
    max-width:1600px;
    margin:0 auto;
    padding:0 15px;
    margin-top:12px;
}


.CodeMirror{
    font-size:20px;
}

.CodeMirror pre{
    font-size:20px;
}




.dashboard-page{
    min-height:100vh;
    background:#f5f5f5;
    padding:40px 0;
}

.dashboard-container{
    max-width:1200px;
    margin:0 auto;
    padding:0 20px;
}

.dashboard-header{
    max-width:1200px;
    margin:0 auto;
    padding:0 20px;
}

.dashboard-title{
    font-size:32px;
    font-weight:700;
    color:#222;
    margin-bottom:8px;
}

.dashboard-subtitle{
    font-size:14px;
    color:#777;
}

.dashboard-content{
    padding-top:30px;
}

.dashboard-card{
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:16px;
    padding:30px;
    transition:0.3s;
}

.dashboard-card:hover{
    box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

.dashboard-welcome{
    margin-bottom:30px;
}

.card-title{
    font-size:22px;
    font-weight:600;
    color:#222;
    margin-bottom:12px;
}

.card-text{
    color:#666;
    line-height:1.7;
}

.dashboard-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.stat-card{
    text-align:left;
}

.stat-label{
    font-size:16px;
    font-weight:600;
    color:#444;
    margin-bottom:15px;
}

.stat-value{
    font-size:42px;
    font-weight:700;
    color:#333;
    margin-bottom:10px;
}

.stat-description{
    font-size:14px;
    color:#888;
}

.dashboard-buttons{
    display:flex;
    gap:15px;
    margin-top:35px;
    flex-wrap:wrap;
}

.dashboard-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:14px 24px;
    border-radius:10px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.dashboard-btn-primary{
    background:#444;
    color:#fff;
}

.dashboard-btn-primary:hover{
    background:#222;
}

.dashboard-btn-secondary{
    background:#fff;
    border:1px solid #dcdcdc;
    color:#444;
}

.dashboard-btn-secondary:hover{
    background:#f1f1f1;
}

@media(max-width:991px){

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

    .dashboard-title{
        font-size:28px;
    }

}

.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.login-box{
    width:100%;
    max-width:450px;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:20px;
    padding:40px;
    box-shadow:0 10px 30px rgba(0,0,0,0.05);
}

.login-title{
    text-align:center;
    font-size:32px;
    font-weight:700;
    color:#222;
    margin-bottom:30px;
}

.login-form{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.form-group{
    width:100%;
}

.form-input{
    width:100%;
    height:55px;
    border:1px solid #dcdcdc;
    border-radius:12px;
    padding:0 18px;
    font-size:16px;
    transition:0.3s;
    outline:none;
}

.form-input:focus{
    border-color:#999;
}

.form-error{
    margin-top:8px;
    color:#d33;
    font-size:14px;
}

.login-btn{
    width:100%;
    height:55px;
    border:none;
    border-radius:12px;
    background:#444;
    color:#fff;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}

.login-btn:hover{
    background:#222;
}

.login-footer{
    text-align:center;
    font-size:14px;
    color:#777;
}

.login-footer a{
    color:#333;
    text-decoration:none;
    font-weight:600;
}

.login-footer a:hover{
    text-decoration:underline;
}
.register-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.register-box{
    width:100%;
    max-width:450px;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:20px;
    padding:40px;
    box-shadow:0 10px 30px rgba(0,0,0,0.05);
}

.register-title{
    text-align:center;
    font-size:32px;
    font-weight:700;
    color:#222;
    margin-bottom:30px;
}

.register-form{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.form-group{
    width:100%;
}

.form-input{
    width:100%;
    height:55px;
    border:1px solid #dcdcdc;
    border-radius:12px;
    padding:0 18px;
    font-size:16px;
    outline:none;
    transition:0.3s;
}

.form-input:focus{
    border-color:#888;
}

.form-error{
    margin-top:8px;
    color:#d33;
    font-size:14px;
}

.register-btn{
    width:100%;
    height:55px;
    border:none;
    border-radius:12px;
    background:#444;
    color:#fff;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}

.register-btn:hover{
    background:#222;
}

.register-footer{
    text-align:center;
    font-size:14px;
    color:#777;
}

.register-footer a{
    color:#333;
    text-decoration:none;
    font-weight:600;
}

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

@media(max-width:576px){

    .register-box{
        padding:30px 20px;
    }

    .register-title{
        font-size:28px;
    }

}



.rating-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:20px;
    border-radius:16px;
    background:#fff;
    margin-bottom:20px;
    transition:0.3s;
    border:1px solid #eee;
}

.rating-card:hover{
    transform:translateY(-3px);
    box-shadow:0 10px 30px rgba(0,0,0,0.08);
}

.rating-position{
    font-size:28px;
    font-weight:700;
    width:80px;
}

.rating-name{
    font-size:20px;
    font-weight:600;
}

.rating-score{
    font-size:22px;
    font-weight:700;
}

.filter-btn {
    color: #222;
    transition: 0.2s;
}

.filter-btn:hover {
    color: #000000;
}

.success-message,
.error-message {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;

    backdrop-filter: blur(10px);

    border: 1px solid transparent;

    box-shadow:
        0 4px 12px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.4);

    animation: fadeIn 0.25s ease;
    margin: 20px 0;
}

/* SUCCESS */
.success-message {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.25);
    margin: 20px 0;
}

/* ERROR */
.error-message {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.25);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.profile-avatar-block {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
}

.avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}

.avatar-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avatar-input {
    font-size: 14px;
}

.avatar-btn {
    border: none;
    background: #111827;
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.avatar-btn:hover {
    opacity: 0.9;
}


.avatar-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.avatar-input {
    display: none;
}

.custom-file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 14px 18px;

    background: #f3f4f6;
    border: 2px dashed #cbd5e1;

    border-radius: 14px;

    cursor: pointer;

    transition: 0.2s;

    font-size: 14px;
    font-weight: 600;

    color: #374151;
}

.custom-file-upload:hover {
    background: #e5e7eb;
    border-color: #94a3b8;
}

.avatar-btn {
    border: none;
    background: linear-gradient(135deg, #2563eb, #7c3aed);

    color: white;

    padding: 14px 18px;

    border-radius: 14px;

    cursor: pointer;

    font-size: 14px;
    font-weight: 600;

    transition: 0.2s;
}

.avatar-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.mobile-navigation-icon {
    position: absolute!important;
    top: 10px;
    right: 20px;
}

.mobile-navigation-icon i {
    background-color: #fff!important;
}

.mobile-navigation-icon i:before {
    background-color: #fff!important;
}
.mobile-navigation-icon i:after {
    background-color: #fff!important;
}


@media only screen and (max-width: 575px) {
    .header-top-menu-list {
        display: none;
    }
}




body{
    background:#f5f7fb;
}

.leaderboard-page{
    padding:70px 20px;
}

.leaderboard-container{
    max-width:1300px;
    margin:0 auto;
}








/* HERO */

.leaderboard-hero{
    margin-bottom:70px;
}

.leaderboard-label{
    font-size:13px;
    font-weight:700;
    letter-spacing:4px;
    color:#f97316;
    margin-bottom:20px;
}

.leaderboard-hero h1{
    font-size:72px;
    line-height:1.05;
    font-weight:900;
    color:#0f172a;
    max-width:1000px;
    margin-bottom:25px;
}

.leaderboard-hero p{
    font-size:20px;
    line-height:1.7;
    color:#6b7280;
    max-width:850px;
}








/* SCALE */

.rank-scale-wrapper{
    margin-bottom:60px;
}

.scale-title{
    font-size:14px;
    font-weight:700;
    letter-spacing:4px;
    color:#9ca3af;
    margin-bottom:20px;
}

.rank-scale{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
}

.rank-pill{

    min-width:140px;

    padding:16px;

    border-radius:20px;

    border:1px solid;

    backdrop-filter:blur(10px);

    transition:.2s;
}

.rank-pill:hover{
    transform:translateY(-3px);
}

.rank-pill-icon{
    font-size:22px;
    margin-bottom:10px;
}

.rank-pill-title{
    font-size:16px;
    font-weight:700;
}

.rank-pill-xp{
    margin-top:6px;
    font-size:13px;
    color:#94a3b8;
}








/* BOX */

.leaderboard-box{

    background:rgba(255,255,255,.7);

    backdrop-filter:blur(14px);

    border:1px solid rgba(255,255,255,.5);

    border-radius:32px;

    padding:30px;

    box-shadow:
        0 20px 50px rgba(15,23,42,.06);
}

.leaderboard-top{
    display:flex;
    align-items:center;
    justify-content:space-between;

    margin-bottom:25px;
}

.leaderboard-top-title{
    font-size:15px;
    font-weight:800;
    letter-spacing:4px;
    color:#9ca3af;
}

.leaderboard-live{
    color:#10b981;
    font-size:14px;
    font-weight:700;
}








/* LIST */

.leaderboard-list{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.leaderboard-card{

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:10px 10px;

    border-radius:22px;

    background:rgba(255,255,255,.75);

    border:1px solid rgba(226,232,240,.8);

    transition:.2s;
}

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

.top-1{
    background:#fff8e7;
}

.top-2{
    background:#f8fafc;
}

.top-3{
    background:#fff7ed;
}








/* RANK */

.leaderboard-rank{
    width:60px;

    font-size:24px;
    font-weight:800;

    color:#0f172a;
}








/* USER */

.leaderboard-user{
    flex:1;

    display:flex;
    align-items:center;
    gap:16px;
}

.leaderboard-avatar{

    width:58px;
    height:58px;

    border-radius:50%;

    overflow:hidden;

    border:3px solid;
}

.leaderboard-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.avatar-placeholder{
    width:100%;
    height:100%;

    display:flex;
    align-items:center;
    justify-content:center;

    color:white;

    font-size:18px;
    font-weight:800;
}








/* INFO */

.leaderboard-info{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.leaderboard-name{
    font-size:17px;
    font-weight:800;
}

.level-badge{

    display:inline-flex;
    align-items:center;
    gap:7px;

    width:fit-content;

    padding:2px 8px;

    border-radius:999px;

    border:1px solid;

    font-size:13px;
    font-weight:700;
}

.leaderboard-stars{
    font-size:15px;
}








/* XP */

.leaderboard-xp{
    text-align:right;
}

.xp-value{
    font-size:24px;
    font-weight:900;
    color:#0f172a;
}

.xp-label{
    margin-top:4px;

    font-size:13px;
    color:#94a3b8;
}

/*****************************************/

.editor-header {
    position: relative;
    display: flex;
    justify-content: space-between;
}

.editor-popover {
    position: absolute;
    top: 50px;
    right: 10px;

    width: 260px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 15px 15px;

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

    z-index: 999;
}

.popover-arrow {
    position: absolute;

    bottom: 40px;
    left: -9px;

    width: 16px;
    height: 16px;

    background: white;

    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;

    transform: rotate(45deg);
}

.popover-title {
    font-size: 14px;
    font-weight: 600;

    margin-bottom: 10px;
}

.popover-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px 0;
}

.popover-label {
    font-size: 13px;
    color: #6b7280;
}

.font-input {
    width: 80px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    padding: 5px 8px;

    font-size: 15px;

    outline: none;
}

.font-input:focus {
    border-color: #2563eb;
}


.settings-btn {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    transition: 0.2s ease;

    cursor: pointer;
}

.settings-btn:hover {
    background: #f3f4f6;
}

.settings-btn:active {
    transform: scale(0.96);
}




.setting-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.switch {
    position: relative;

    display: inline-block;

    width: 46px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;

    inset: 0;

    background: #d1d5db;

    border-radius: 999px;

    transition: .2s;
}

.slider::before {
    content: "";

    position: absolute;

    width: 20px;
    height: 20px;

    left: 3px;
    top: 3px;

    background: white;

    border-radius: 50%;

    transition: .2s;
}

.switch input:checked + .slider {
    background: #2563eb;
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

/*****************************************/

.user-menu-btn a{
    color: #ffffff;
}

.user-menu-btn:hover a{
    color: #ffc4a0;
}



.user-menu{
    position: relative;
    display: inline-block;
}

.submenu-user{
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 180px;
    padding: 10px 0;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    list-style: none;
    z-index: 100;
    margin: 10px 0 0 0;
}

.submenu-user li{
    padding: 0;
}

.submenu-user a,
.logout-btn{
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    text-decoration: none;
}

.submenu-user a:hover,
.logout-btn:hover{
    background: #f5f5f5;
}

.task-title-card{
    font-size: 17px;
}




span.level-easy {
    color: #2ecc71; /* зелёный */
}

span.level-medium {
    color: #f1c40f; /* жёлтый */
}

span.level-hard {
    color: #e67e22; /* оранжевый */
}

span.level-expert {
    color: #e74c3c; /* красный */
}


/* MOBILE */



@media(max-width:600px){


    .task-title-card{
        font-size: 15px;
    }

    .task-container {
        padding: 0 5px;
    }
    .task-card {
        padding: 10px 10px;
    }
    .tabs-header {
        flex-direction: column;
    }
    .tab-btn {
        border: none;
        background: #f3f4f6;
        padding: 7px 10px;
    }
    .task-content {
        padding: 5px 5px;

    }



}

