/* =========================================================
   OGE Platform — cleaned style.css
   ========================================================= */

/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;

    margin: 0;
    min-height: 100vh;

    color: white;
    font-family: Inter, Arial, sans-serif;

    background:
        radial-gradient(circle at top left, rgba(56,189,248,0.12), transparent 25%),
        radial-gradient(circle at bottom right, rgba(34,197,94,0.08), transparent 25%),
        #020617;
}

body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56,189,248,0.18), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -250px;
    right: -250px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34,197,94,0.10), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

::selection {
    background: #38bdf8;
    color: #020617;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: rgba(56,189,248,0.45);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56,189,248,0.8);
}

main {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px 120px;
}

a {
    color: #38bdf8;
}

button {
    border: none;
    cursor: pointer;
}

input,
select,
textarea {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 16px;
    transition: 0.3s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56,189,248,0.15);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

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

    width: 100%;
    max-width: 100%;

    padding: 18px 42px;

    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow-x: hidden;
}

.site-logo a {
    color: white;
    text-decoration: none;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-search input {
    width: 240px;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
}

.header-search input::placeholder {
    color: #94a3b8;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-nav a {
    color: #38bdf8;
    text-decoration: none;
    font-size: 17px;
    font-weight: bold;
    transition: 0.3s;
}

.site-nav a:hover {
    color: white;
}

.user-name {
    color: #cbd5e1;
    font-weight: 600;
}

/* ---------- Typography ---------- */

.page-title {
    max-width: 900px;
    margin: 0 0 42px;

    font-size: clamp(38px, 5vw, 72px);
    line-height: 0.95;
    letter-spacing: -2.5px;
    font-weight: 900;

    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-subtitle,
.search-info,
.task-topic {
    font-size: 19px;
    line-height: 1.6;
    color: #94a3b8;
}

/* ---------- Common cards / buttons ---------- */

.task-card,
.number-card,
.profile-card,
.auth-card,
.exam-task-item,
.exam-result-box,
.exam-result-item,
.task-main-card,
.side-card,
.task-item {
    background: rgba(30, 41, 59, 0.72);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 45px rgba(0,0,0,0.28);
}

.task-card,
.profile-card,
.auth-card {
    padding: 42px;
    border-radius: 28px;
}

.open-task-btn,
.open-number-btn,
.daily-task-btn,
.exam-submit-btn,
.hero-primary-btn,
button,
.solve-btn {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;
    border: none;
    border-radius: 16px;
    padding: 14px 22px;
    font-weight: 700;
    transition: 0.3s;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(56,189,248,0.22);
}

.open-task-btn:hover,
.open-number-btn:hover,
.daily-task-btn:hover,
.exam-submit-btn:hover,
.hero-primary-btn:hover,
button:hover,
.solve-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(56,189,248,0.34);
}

.exam-submit-wrap {
    margin-top: 36px;

    display: flex;
    justify-content: center;
}

.exam-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 280px;
    height: 64px;

    padding: 0 34px;

    border-radius: 20px;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);

    color: #020617;

    font-size: 18px;
    font-weight: 900;

    border: none;
    cursor: pointer;

    box-shadow:
        0 18px 40px rgba(56,189,248,0.28);

    transition: 0.3s;
}

.exam-submit-btn:hover {
    transform: translateY(-3px);

    box-shadow:
        0 24px 50px rgba(56,189,248,0.38);
}

/* ---------- Grids and task lists ---------- */

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

.task-item {
    position: relative;
    overflow: hidden;

    min-height: 240px;
    padding: 34px;
    border-radius: 30px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    transition: 0.35s ease;
}

.task-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(135deg, rgba(56,189,248,0.10), transparent 45%);
    opacity: 0;
    transition: 0.35s;
}

.task-item > * {
    position: relative;
    z-index: 2;
}

.task-item:hover {
    transform: translateY(-8px);
    border-color: #38bdf8;
    box-shadow: 0 20px 40px rgba(56,189,248,0.18);
}

.task-item:hover::before {
    opacity: 1;
}

.task-item h2 {
    margin: 0 0 22px;
    font-size: 34px;
    letter-spacing: -1px;
    color: white;
}

.open-task-btn {
    display: inline-block;
    position: relative;
    z-index: 5;
    margin-top: 18px;
    color: #020617;
    text-decoration: none;
}

/* ---------- Number cards ---------- */

.number-card {
    position: relative;
    overflow: hidden;

    padding: 25px;
    border-radius: 28px;
    transition: 0.35s ease;
}

.number-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(135deg, rgba(56,189,248,0.12), transparent 40%);
    opacity: 0;
    transition: 0.4s;
}

.number-card::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    z-index: 1;
    pointer-events: none;

    width: 220px;
    height: 220px;

    background: radial-gradient(circle, rgba(56,189,248,0.16), transparent 70%);
    opacity: 0;
    transition: 0.45s;
}

.number-card > * {
    position: relative;
    z-index: 2;
}

.number-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56,189,248,0.7);
    box-shadow: 0 24px 55px rgba(56,189,248,0.16);
}

.number-card:hover::before,
.number-card:hover::after {
    opacity: 1;
}

.number-badge {
    display: inline-block;
    background: #38bdf8;
    color: #020617;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: bold;
    margin-bottom: 15px;
}

.number-topic {
    color: #e5e7eb;
    font-size: 17px;
    min-height: 45px;
}

.open-number-btn {
    display: inline-block;
    position: relative;
    z-index: 5;

    margin-top: 15px;
    color: #020617;
    text-decoration: none;
}

/* ---------- Breadcrumbs / back buttons ---------- */

.breadcrumbs {
    margin-bottom: 25px;
    color: #94a3b8;
    font-size: 15px;
}

.breadcrumbs a {
    color: #38bdf8;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: white;
}

.breadcrumbs span {
    margin: 0 6px;
}

.back-btn,
.back-to-topic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 25px;

    background: #0f172a;
    color: #38bdf8;

    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;

    border: 1px solid #334155;
    transition: 0.3s;
}

.back-btn:hover,
.back-to-topic-btn:hover {
    background: #1e293b;
    border-color: #38bdf8;
    color: white;
}

/* ---------- Task detail ---------- */

.task-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

.task-main-card {
    position: relative;
    overflow: hidden;

    padding: 48px;
    border-radius: 32px;
}

.task-main-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;

    background: linear-gradient(135deg, rgba(56,189,248,0.08), transparent 35%);
}

.task-main-card > * {
    position: relative;
    z-index: 2;
}

.task-detail-header {
    margin-bottom: 34px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.task-number-chip {
    display: inline-block;

    margin-bottom: 20px;
    padding: 9px 15px;

    border-radius: 999px;

    background: rgba(56,189,248,0.12);
    border: 1px solid rgba(56,189,248,0.25);

    color: #38bdf8;

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

.task-detail-title {
    max-width: 900px;
    margin: 0 0 16px;

    font-size: clamp(44px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -2px;
}

.task-topic {
    margin-bottom: 0;
    font-size: 20px;
}

.task-question {
    position: relative;

    margin-top: 34px;
    margin-bottom: 25px;
    padding: 40px;

    border-radius: 28px;

    background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.78));
    border: 1px solid rgba(255,255,255,0.06);

    color: #e5e7eb;

    font-size: 18px;
    line-height: 1.8;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 10px 30px rgba(0,0,0,0.18);

    overflow: visible;
}

.task-question::before {
    content: 'УСЛОВИЕ';

    position: absolute;
    top: -14px;
    left: 24px;

    padding: 6px 14px;
    border-radius: 999px;

    background: #38bdf8;
    color: #020617;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;

    z-index: 5;
}

.task-question p {
    margin-top: 0;
}

.task-question p:last-child {
    margin-bottom: 0;
}

.task-question strong {
    color: #f8fafc;
}

.task-question code,
.task-question pre {
    background: rgba(2,6,23,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 14px;
    color: #38bdf8;
}

/* CKEditor tables / images in tasks */

.task-question table {
    border-collapse: collapse !important;
    width: auto !important;
    margin: 20px 0;
}

.task-question td,
.task-question th,
.task-question figure.table td,
.task-question figure.table th {
    border: 1px solid #ffffff !important;
    padding: 12px 18px !important;
    text-align: center !important;
    background-color: #1a2740 !important;
    color: white !important;
}

.task-question th,
.task-question figure.table th {
    background-color: #2d3f5e !important;
    font-weight: bold;
}

.task-question figure.table {
    margin: 25px 0;
}

.task-question figure.table table {
    border-collapse: collapse !important;
    width: auto !important;
}

.task-question img {
    width: 600px !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 20px 0;
    border-radius: 10px;
}

.task-question figure.image {
    width: 600px !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
}

.task-question figure.image img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 10px;
}

/* Programs table */

.programs-table {
    margin: 30px 0;
    max-width: 720px;
    overflow-x: auto;
}

.programs-table table {
    width: 100%;
    border-collapse: collapse !important;
    color: white;
    border: 1px solid white !important;
}

.programs-table th {
    background: #2f405c;
    border: 1px solid #ffffff !important;
    padding: 12px;
    text-align: center;
    font-size: 18px;
}

.programs-table td {
    border: 1px solid #ffffff !important;
    padding: 24px;
    vertical-align: top;
    text-align: left;
}

.programs-table pre {
    margin: 0;
    white-space: pre;
    font-family: Consolas, monospace;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.programs-table tr {
    border: 1px solid white !important;
}

/* Answer form */

.answer-form {
    margin-top: 28px;

    display: grid;
    grid-template-columns: 120px 1fr 180px;
    gap: 16px;
    align-items: center;

    padding: 22px;

    background: rgba(15,23,42,0.65);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
}

.answer-form label {
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
    font-weight: 700;
}

.answer-form input {
    width: 100% !important;
    height: 58px;
    margin-left: 0;

    border-radius: 16px;
    font-size: 18px;
}

.answer-form button {
    height: 58px;
    border-radius: 16px;
    font-size: 16px;
}

.answer-form-success {
    border-color: rgba(34,197,94,0.35);
    box-shadow: 0 0 30px rgba(34,197,94,0.12);
}

.answer-form-success input {
    opacity: 0.75;
    cursor: not-allowed;
}

.answer-form-success button {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    cursor: default;
    box-shadow: 0 12px 30px rgba(34,197,94,0.25);
}

.answer-form-success button:hover {
    transform: none;
}

/* Side panel */

.task-side-panel {
    position: sticky;
    top: 110px;

    display: grid;
    gap: 18px;
}

.side-card {
    padding: 28px;
    border-radius: 24px;
    transition: 0.3s;
}

.side-card:hover {
    border-color: rgba(56,189,248,0.45);
}

.side-label {
    display: block;
    margin-bottom: 18px;

    color: #94a3b8;

    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.side-card p {
    margin: 10px 0 0;
    color: #cbd5e1;
    line-height: 1.5;
}

.task-solved,
.task-unsolved {
    display: inline-block;

    margin: 8px 0 16px;
    padding: 7px 12px;

    border-radius: 999px;

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

.task-solved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.task-unsolved {
    background: rgba(148,163,184,0.12);
    color: #cbd5e1;
}

.solve-btn {
    width: 100%;
    margin-top: 20px;
}

/* Task switcher */

.task-switcher-card {
    padding: 24px;
}

.task-switcher {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.task-switcher a,
.task-switcher-disabled,
.side-nav-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 14px 16px;

    border-radius: 16px;

    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(255,255,255,0.08);

    color: #38bdf8;
    text-decoration: none;
    font-weight: 800;

    transition: 0.3s;
}

.task-switcher a:hover,
.side-nav-buttons a:hover {
    border-color: #38bdf8;
    background: rgba(56,189,248,0.10);
}

.task-switcher-disabled {
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.65;
}

/* File / solution / result */

.download-file-btn {
    display: inline-block;
    margin: 10px 0 25px;

    background-color: #38bdf8;
    color: black;

    padding: 12px 20px;
    border-radius: 10px;

    text-decoration: none;
    font-weight: bold;
}

.download-file-btn:hover {
    background-color: #0ea5e9;
}

.file-check-note {
    margin-top: 20px;
    padding: 18px;

    background-color: #0f172a;
    border-left: 4px solid #38bdf8;
    border-radius: 10px;

    font-weight: bold;
}

.show-solution-btn {
    margin-top: 20px;

    background-color: #38bdf8;
    color: black;

    padding: 12px 20px;
    border-radius: 10px;

    font-weight: bold;
}

.show-solution-btn:hover {
    background-color: #0ea5e9;
}

.explanation {
    margin-top: 24px;

    max-height: 0;
    overflow: hidden;

    opacity: 0;
    transform: translateY(-10px);

    transition:
        max-height 0.5s ease,
        opacity 0.35s ease,
        transform 0.35s ease,
        padding 0.35s ease;

    padding: 0 24px;

    background: linear-gradient(180deg, rgba(15,23,42,0.95), rgba(15,23,42,0.75));
    border-radius: 22px;
    border: 1px solid rgba(56,189,248,0.15);
}

.explanation.solution-open {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
    padding: 28px 24px;
}

.explanation h3 {
    margin-top: 0;
    color: #38bdf8;
}

.explanation p {
    line-height: 1.6;
}

.result {
    display: flex;
    flex-direction: column;
    gap: 6px;

    width: fit-content;
    margin-top: 22px;
    padding: 22px 24px;

    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);

    font-size: 16px;
    line-height: 1.4;

    backdrop-filter: blur(12px);

    animation: resultFade 0.35s ease;
}

.result strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.result span {
    color: #cbd5e1;
    line-height: 1.5;
    font-weight: 500;
}

.result-correct {
    background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(34,197,94,0.08));
    border-color: rgba(34,197,94,0.35);
    box-shadow: 0 0 30px rgba(34,197,94,0.15);
}

.result-correct strong {
    color: #4ade80;
}

.result-wrong {
    background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(239,68,68,0.08));
    border-color: rgba(239,68,68,0.35);
    box-shadow: 0 0 30px rgba(239,68,68,0.12);
}

.result-wrong strong {
    color: #f87171;
}
@keyframes resultFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ---------- Filters / progress ---------- */

.progress-box {
    margin-bottom: 30px;
}

.progress-text {
    margin-bottom: 10px;
    color: #cbd5e1;
    font-weight: 600;
}

.progress-bar,
.number-progress-bar {
    width: 100%;
    background: #1e293b;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #334155;
}

.progress-bar {
    height: 14px;
}

.progress-fill,
.number-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #38bdf8);
    border-radius: 999px;
    transition: 0.3s;
}

.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 34px;
}

.filters-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;

    border-radius: 999px;

    background: rgba(15,23,42,0.75);
    border: 1px solid rgba(255,255,255,0.08);

    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;

    transition: 0.3s;
}

.filters-row a:hover {
    border-color: #38bdf8;
    color: white;
    background: rgba(56,189,248,0.10);
    transform: translateY(-2px);
}

.filters-row a.active {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(56,189,248,0.22);
}

/* ---------- Auth / profile ---------- */

.auth-card {
    max-width: 420px;
    margin: 60px auto;
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
}

.auth-card p {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.auth-card label {
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 600;
}

.auth-card input {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    font-size: 16px;
}

.auth-card button {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
}

.profile-card {
    max-width: 900px;
    margin: 40px auto;
}

.profile-card h1 {
    margin-top: 0;
    margin-bottom: 15px;
}

.profile-user {
    color: #cbd5e1;
    margin-bottom: 35px;
    font-size: 18px;
}

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

.profile-stats div {
    background: #0f172a;
    padding: 30px;
    border-radius: 18px;
    text-align: center;
    border: 1px solid #334155;
}

.profile-stats strong {
    display: block;
    font-size: 36px;
    color: #38bdf8;
    margin-bottom: 10px;
}

.profile-stats span {
    color: #94a3b8;
    font-size: 16px;
}

.recent-tasks,
.number-progress,
.achievements,
.weak-topics {
    margin-top: 45px;
}

.recent-tasks h2,
.number-progress h2,
.achievements h2,
.weak-topics h2 {
    margin-bottom: 20px;
}

.recent-task-link,
.weak-topic-item {
    display: block;

    background: #0f172a;
    border: 1px solid #334155;

    padding: 16px 20px;
    border-radius: 14px;

    margin-bottom: 14px;

    text-decoration: none;
    color: #38bdf8;

    transition: 0.3s;
}

.recent-task-link:hover,
.weak-topic-item:hover {
    background: #1e293b;
    border-color: #38bdf8;
    transform: translateX(4px);
}

.number-progress-item {
    margin-bottom: 20px;
}

.number-progress-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
}

.number-progress-top span {
    color: #cbd5e1;
}

.number-progress-bar {
    height: 12px;
    background: #0f172a;
}

.achievement-item {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #334155;

    padding: 18px 22px;
    border-radius: 16px;

    margin-bottom: 16px;

    font-weight: 600;
    color: #f8fafc;

    transition: 0.3s;
}

.achievement-item:hover {
    transform: translateX(4px);
    border-color: #38bdf8;
}

.weak-topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.weak-topic-item span {
    color: #94a3b8;
}

/* ---------- Daily task ---------- */

.daily-task {
    margin: 40px 0;
}

.daily-task-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #0f172a;
    border: 1px solid #334155;

    padding: 22px 26px;
    border-radius: 18px;
}

.daily-task-card strong {
    color: #38bdf8;
    font-size: 24px;
}

.daily-task-card p {
    color: #cbd5e1;
    margin-bottom: 0;
}

.daily-task-btn {
    color: #020617;
    text-decoration: none;
}

/* ---------- Exam ---------- */

.exam-list {
    display: grid;
    gap: 20px;
}

.exam-task-item {
    border-radius: 28px;
    padding: 24px;
    transition: 0.3s;
}

.exam-task-item:hover,
.exam-result-item:hover {
    border-color: rgba(56,189,248,0.7);
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(56,189,248,0.16);
}

.exam-task-item strong {
    display: block;
    font-size: 22px;
    color: #38bdf8;
    margin-bottom: 10px;
}

.exam-task-item p {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.exam-progress-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    flex-wrap: wrap;
}

.exam-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;

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

    padding: 0;

    background: transparent;
    border: 1px solid rgba(96, 165, 250, 0.6);

    color: #e5e7eb;
    font-size: 18px;
    font-weight: 700;

    box-shadow: none;
}

.exam-nav-btn.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.45);
}

.exam-answer-input {
    display: block;

    width: 100%;
    max-width: 400px;

    padding: 14px;

    border-radius: 10px;
    border: 1px solid #334155;

    background: #0f172a;
    color: white;

    margin-top: 20px;
}

.exam-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.manual-task-notice {
    margin-top: 20px;
    padding: 16px;

    border-radius: 14px;

    background: #0f172a;
    border: 1px solid #38bdf8;

    color: #e2e8f0;

    font-size: 16px;
    line-height: 1.5;
}

.exam-result-box {
    padding: 34px;
}

.exam-result-box h2 {
    margin: 0 0 24px;
    font-size: 30px;
    letter-spacing: -0.8px;
}

.exam-result-box p {
    display: flex;
    justify-content: space-between;
    align-items: center;

    max-width: 520px;

    margin: 14px 0;

    color: #cbd5e1;

    font-size: 17px;
    line-height: 1.5;
}

.exam-result-box strong {
    color: white;
    font-size: 20px;
}

.exam-analytics-box {
    margin: 32px 0;
    padding: 38px;

    background: rgba(30, 41, 59, 0.72);
    backdrop-filter: blur(14px);

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;

    box-shadow: 0 18px 45px rgba(0,0,0,0.24);
}

.exam-analytics-box h2 {
    margin-top: 0;
    margin-bottom: 10px;

    font-size: 32px;
    letter-spacing: -1px;
}

.exam-analytics-box.success {
    border-color: rgba(34,197,94,0.35);
}

.analytics-subtitle {
    color: #94a3b8;
    margin-bottom: 24px;
}

.weak-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.weak-task-card {
    min-height: 150px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background: rgba(15, 23, 42, 0.8);

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;

    padding: 20px;

    text-decoration: none;
    color: inherit;

    transition: 0.3s;
}

.weak-task-card:hover {
    transform: translateY(-4px);
    border-color: #38bdf8;
}

.weak-task-card strong {
    display: block;
    color: #38bdf8;
    font-size: 26px;
    margin-bottom: 10px;
}

.weak-task-card span {
    display: block;
    margin-top: 10px;
    min-height: 44px;

    color: #cbd5e1;
    line-height: 1.5;
}

.weak-task-card em {
    display: block;
    margin-top: 16px;

    color: #38bdf8;

    font-style: normal;
    font-weight: 700;
}

.exam-answers-box {
    margin-top: 40px;
}

.exam-answers-box h2 {
    margin-bottom: 25px;
}

.exam-answers-table {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.exam-answer-row {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 110px 90px;
    gap: 20px;
    align-items: center;

    background: rgba(15, 23, 42, 0.75);
    border: 1px solid #243041;
    border-radius: 18px;

    padding: 16px 18px;

    backdrop-filter: blur(10px);

    transition: 0.3s;
}

.exam-answer-row:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.exam-answer-row strong {
    display: block;
    font-size: 20px;
    color: white;
    margin-bottom: 8px;
}

.exam-answer-row span {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
}

.exam-answer-row small {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
    font-size: 13px;
}

.exam-answer-row p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.answer-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 14px;
    border-radius: 999px;

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

.answer-status.correct {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.answer-status.wrong {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.exam-answer-row a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
}

.exam-answer-row a:hover {
    color: white;
}

/* ---------- Hero ---------- */

.hero-section {
    padding: 90px 0 120px;
    max-width: none;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(420px, 0.9fr);
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;

    padding: 10px 18px;

    border-radius: 999px;

    background: rgba(56,189,248,0.12);
    border: 1px solid rgba(56,189,248,0.25);

    color: #38bdf8;

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

    margin-bottom: 28px;
}

.hero-subtitle {
    max-width: 760px;

    font-size: 22px;
    line-height: 1.7;

    color: #94a3b8;

    margin-bottom: 42px;
}

.hero-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 70px;
}

.hero-primary-btn,
.hero-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 16px 28px;

    border-radius: 18px;

    text-decoration: none;
    font-weight: 700;

    transition: 0.3s;
}

.hero-primary-btn {
    color: #020617;
    box-shadow: 0 18px 40px rgba(56,189,248,0.25);
}

.hero-secondary-btn {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: white;
}

.hero-secondary-btn:hover {
    border-color: #38bdf8;
    background: rgba(56,189,248,0.08);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.hero-stats div {
    background: rgba(30,41,59,0.65);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(10px);
}

.hero-stats strong {
    display: block;
    margin-bottom: 12px;
    color: white;
    font-size: 42px;
    font-weight: 800;
}

.hero-stats span {
    color: #94a3b8;
    line-height: 1.5;
}

.hero-visual {
    position: relative;
    min-height: 520px;

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

.hero-visual::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,0.22), transparent 70%);
    filter: blur(30px);
    z-index: -1;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);

    background-size: 40px 40px;

    mask-image: radial-gradient(circle, white 30%, transparent 85%);

    z-index: -2;
}

.code-window {
    width: 100%;
    max-width: 520px;

    background: rgba(15,23,42,0.92);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;

    overflow: hidden;

    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    backdrop-filter: blur(16px);

    transform: rotate(-4deg);
}

.code-window-top {
    display: flex;
    gap: 8px;

    padding: 16px 18px;

    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-window-top span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-window-top span:nth-child(1) {
    background: #ef4444;
}

.code-window-top span:nth-child(2) {
    background: #f59e0b;
}

.code-window-top span:nth-child(3) {
    background: #22c55e;
}

.code-window pre {
    margin: 0;
    padding: 34px;

    overflow-x: auto;

    color: #38bdf8;

    font-size: 16px;
    line-height: 1.8;
    font-family: Consolas, monospace;
}

.floating-card {
    position: absolute;

    background: rgba(30,41,59,0.92);

    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;

    padding: 14px 18px;

    backdrop-filter: blur(10px);

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

    font-weight: 700;
}

.floating-card-1 {
    top: 40px;
    right: 10px;
}

.floating-card-2 {
    bottom: 120px;
    left: -20px;
}

.floating-card-3 {
    bottom: 20px;
    right: 40px;
}

.tasks-section {
    margin-top: 60px;
}

.section-title {
    margin-bottom: 16px;
    font-size: 42px;
    letter-spacing: -1px;
}

.section-subtitle {
    color: #94a3b8;
    font-size: 18px;
    margin-bottom: 40px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
        min-height: auto;
    }

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

@media (max-width: 1000px) {
    .task-detail-layout {
        grid-template-columns: 1fr;
    }

    .task-side-panel {
        position: static;
    }
}

@media (max-width: 768px) {

    main {
        padding: 28px 16px 90px !important;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 22px 16px;
    }

    .site-logo a {
        font-size: 28px;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .header-search,
    .header-search input {
        width: 100%;
        max-width: 100%;
    }

    .site-nav {
        gap: 18px;
        flex-wrap: wrap;
    }

    .site-nav a {
        font-size: 18px;
    }

    .page-title {
        font-size: 46px;
        line-height: 0.98;
        letter-spacing: -1.5px;
        margin-bottom: 28px;
    }

    .tasks-grid,
    .directions-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .task-item {
        min-height: auto;
        padding: 24px;
        border-radius: 24px;
    }

    .task-item h2 {
        font-size: 28px;
    }

    .task-detail-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 22px !important;
    }

    .task-main-card {
        order: 1 !important;

        width: 100%;
        max-width: 100%;

        padding: 26px 20px !important;
        border-radius: 28px !important;

        overflow-x: hidden;
    }

    .task-side-panel {
        order: 2 !important;

        position: static !important;

        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;

        width: 100%;
        max-width: 100%;
    }

    .task-detail-header {
        margin-bottom: 24px !important;
        padding-bottom: 22px !important;
    }

    .task-detail-title {
        font-size: 36px !important;
        line-height: 1.05 !important;
        letter-spacing: -1.2px !important;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .task-topic {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .breadcrumbs {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

   .task-question {
    margin-top: 28px !important;
    padding: 32px 20px 24px !important;
    border-radius: 24px !important;

    font-size: 17px !important;
    line-height: 1.65 !important;

    overflow: visible !important;
}

   .task-question figure.table {
    overflow-x: auto !important;
    max-width: 100% !important;
}

.task-question::before {
    top: -14px !important;
    left: 18px !important;
    z-index: 5 !important;
}

    .task-question table {
        min-width: 520px;
    }

    .answer-form {
        margin-top: 22px !important;
        padding: 20px !important;

        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .answer-form label {
        font-size: 16px !important;
    }

    .answer-form input[type="text"] {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 58px !important;

        font-size: 18px !important;

        padding: 0 18px !important;
        margin: 0 !important;
    }

    .answer-form button {
        width: 100% !important;
        height: 58px !important;

        font-size: 17px !important;

        margin: 0 !important;
    }

    .task-switcher-card {
        width: 100% !important;
        padding: 18px !important;
    }

    .task-switcher {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }

    .task-switcher a,
    .task-switcher-disabled {
        min-height: 56px !important;

        padding: 8px 10px !important;

        border-radius: 16px !important;

        font-size: 13px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;

        text-align: center !important;
        white-space: normal !important;

        word-break: break-word !important;
    }


    .task-switcher-card .side-label {
        margin-bottom: 14px !important;
        font-size: 13px !important;
    }

    .side-card {
        width: 100% !important;
        max-width: 100% !important;

        padding: 22px !important;
        border-radius: 24px !important;
        margin: 0 !important;
    }

    .side-card .solve-btn {
        width: 100% !important;
        margin-top: 22px !important;
    }

    .hero-actions,
    .hero-buttons {
        flex-direction: column;
    }

    .hero-actions a,
    .hero-buttons a {
        width: 100%;
    }

    .hero-subtitle {
        font-size: 19px;
    }

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

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

    .daily-task-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .exam-answer-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .number-card {
        min-height: 190px;
        padding: 24px;
        border-radius: 24px;

        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .number-badge {
        width: fit-content;
        margin-bottom: 14px;

        font-size: 15px;
        line-height: 1;
    }

    .number-topic {
        min-height: auto;
        font-size: 18px;
        line-height: 1.35;
        margin-bottom: 18px;
    }

    .open-number-btn {
        width: 100%;
        text-align: center;
        margin-top: auto;
    }
}

@media (max-width: 768px) {

    .programs-table {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        margin: 24px 0;
        border-radius: 18px;
    }

    .programs-table table {
        min-width: 760px;
    }

    .programs-table th {
        font-size: 15px;
        padding: 10px;
        white-space: nowrap;
    }

    .programs-table td {
        padding: 18px;
    }

    .programs-table pre {
        font-size: 13px;
        line-height: 1.45;
    }
}


@media (max-width: 768px) {

    main {
        padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
    }

    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

@media (max-width: 768px) {

    .exam-result-box {
        padding: 28px 24px !important;
        border-radius: 26px !important;
    }

    .exam-result-box h2 {
        font-size: 34px !important;
        line-height: 1.1 !important;
        margin-bottom: 28px !important;
    }

    .exam-result-box p {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 16px !important;

        max-width: 100% !important;
        font-size: 20px !important;
        line-height: 1.35 !important;
    }

    .exam-result-box strong {
        font-size: 26px !important;
    }

    .exam-answers-box h2,
    .exam-analytics-box h2 {
        font-size: 34px !important;
        line-height: 1.1 !important;
    }

    .exam-answer-row {
        padding: 26px !important;
        border-radius: 24px !important;
        gap: 22px !important;
    }

    .weak-task-card {
        padding: 26px !important;
        border-radius: 24px !important;
    }
}

.task-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.task-chips-row .task-number-chip {
    margin-bottom: 0;
}

.task-id-chip {
    display: inline-block;

    padding: 9px 15px;
    border-radius: 999px;

    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);

    color: #cbd5e1;

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

.search-task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 18px;
}

.search-task-top h2 {
    margin: 0 !important;
}

.search-task-id {
    padding: 6px 12px;
    border-radius: 999px;

    background: rgba(148,163,184,0.12);
    border: 1px solid rgba(148,163,184,0.2);

    color: #cbd5e1;

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

.exam-history {
    margin-top: 45px;
}

.exam-history h2 {
    margin-bottom: 20px;
}

.exam-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    background: #0f172a;
    border: 1px solid #334155;

    padding: 18px 22px;
    border-radius: 16px;

    margin-bottom: 14px;
}

.exam-history-item strong {
    display: block;
    margin-bottom: 8px;
    color: white;
}

.exam-history-item span {
    color: #94a3b8;
}

.exam-history-score {
    color: #38bdf8;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .exam-history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .exam-history-score {
        white-space: normal;
    }
}

.exam-weak-profile {
    margin-top: 45px;
}

.exam-weak-profile h2 {
    margin-bottom: 20px;
}

.exam-weak-profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #0f172a;
    border: 1px solid #334155;

    padding: 18px 22px;
    border-radius: 16px;

    margin-bottom: 14px;

    text-decoration: none;
    transition: 0.3s;
}

.exam-weak-profile-item:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}

.exam-weak-profile-item strong {
    color: #38bdf8;
    font-size: 24px;
}

.exam-weak-profile-item span {
    color: #cbd5e1;
    font-weight: 700;
}

.personal-recommendations {
    margin-top: 45px;
}

.personal-recommendations h2 {
    margin-bottom: 20px;
}

.recommendation-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;

    background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(15,23,42,0.9));
    border: 1px solid rgba(56,189,248,0.28);

    padding: 22px 24px;
    border-radius: 20px;

    margin-bottom: 16px;
}

.recommendation-card strong {
    display: block;
    color: white;
    font-size: 22px;
    margin-bottom: 8px;
}

.recommendation-card p {
    margin: 0;
    color: #94a3b8;
}

.recommendation-card a {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;

    padding: 12px 18px;
    border-radius: 14px;

    text-decoration: none;
    font-weight: 800;

    white-space: nowrap;
}

@media (max-width: 768px) {
    .recommendation-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .recommendation-card a {
        width: 100%;
        text-align: center;
    }
}

.favorite-btn {
    width: 100%;
    margin-bottom: 14px;

    background: linear-gradient(135deg, #facc15, #eab308);
    color: #111827;

    font-weight: 800;
}

.favorite-btn:hover {
    box-shadow: 0 18px 35px rgba(250,204,21,0.35);
}

.favorite-tasks {
    margin-top: 45px;
}

.favorite-tasks h2 {
    margin-bottom: 20px;
}

.favorite-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    background: rgba(15,23,42,0.82);
    border: 1px solid #334155;

    padding: 18px 22px;
    border-radius: 18px;

    margin-bottom: 14px;

    text-decoration: none;
    transition: 0.3s;
}

.favorite-task-item:hover {
    border-color: #facc15;
    transform: translateY(-2px);
}

.favorite-task-item strong {
    display: block;
    color: #facc15;
    font-size: 22px;
    margin-bottom: 6px;
}

.favorite-task-item span {
    color: #cbd5e1;
    line-height: 1.5;
}

.favorite-task-item em {
    color: #94a3b8;
    font-style: normal;
    font-weight: 700;
}

@media (max-width: 768px) {
    .favorite-task-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.video-solution-block {
    margin: 36px 0;

    padding: 28px;

    border-radius: 26px;

    background: rgba(15,23,42,0.78);
    border: 1px solid rgba(255,255,255,0.08);
}

.video-solution-block h3 {
    margin-top: 0;
    margin-bottom: 22px;

    color: white;
    font-size: 28px;
}

.video-wrapper {
    position: relative;

    width: 100%;
    padding-bottom: 56.25%;

    border-radius: 18px;
    overflow: hidden;

    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
}

.training-result {
    margin-top: 18px;
    font-size: 18px;
    font-weight: 800;
}

.training-result-correct {
    color: #4ade80;
}

.training-result-wrong {
    color: #f87171;
}

.training-final {
    max-width: 760px;
    margin: 40px auto 0;
    padding: 42px;

    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;

    text-align: center;
}

.training-final h2 {
    margin-top: 0;
    font-size: 42px;
}

.training-final-score {
    display: flex;
    justify-content: center;
    gap: 18px;
    align-items: center;

    margin: 28px 0;
}

.training-final-score strong {
    font-size: 54px;
    color: white;
}

.training-final-score span {
    font-size: 28px;
    color: #38bdf8;
    font-weight: 900;
}

.training-final p {
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1.5;
}

.training-repeat-btn,
.training-back-btn {
    display: inline-flex;
    justify-content: center;

    margin: 14px 8px 0;
    padding: 14px 20px;

    border-radius: 16px;

    text-decoration: none;
    font-weight: 800;
}

.training-repeat-btn {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;
}

.training-back-btn {
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    color: #38bdf8;
}

@media (max-width: 768px) {
    .training-final {
        padding: 28px 22px;
    }

    .training-final h2 {
        font-size: 34px;
    }

    .training-final-score {
        flex-direction: column;
    }

    .training-repeat-btn,
    .training-back-btn {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.training-history {
    margin-top: 45px;
}

.training-history h2 {
    margin-bottom: 22px;
}

.training-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 20px 24px;
    margin-bottom: 16px;

    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;

    transition: 0.3s;
}

.training-history-item:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
}

.training-history-item strong {
    display: block;
    margin-bottom: 8px;

    color: #38bdf8;
    font-size: 24px;
}

.training-history-item span {
    color: #cbd5e1;
    line-height: 1.5;
}

.training-history-date {
    color: #94a3b8;
    font-size: 14px;
    white-space: nowrap;
}

@media (max-width: 768px) {

    .training-history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .training-history-date {
        font-size: 13px;
    }
}

.training-history-item {
    text-decoration: none;
}

.training-history-item:visited {
    color: inherit;
}

.best-training-results {
    margin-top: 45px;
}

.best-training-results h2 {
    margin-bottom: 22px;
}

.best-training-item {
    display: block;

    padding: 20px 24px;
    margin-bottom: 16px;

    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;

    text-decoration: none;
    transition: 0.3s;
}

.best-training-item:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
}

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

    margin-bottom: 14px;
}

.best-training-top strong {
    color: #38bdf8;
    font-size: 24px;
}

.best-training-top span {
    color: white;
    font-size: 20px;
    font-weight: 900;
}

.best-training-bar {
    height: 12px;
    background: #1e293b;
    border-radius: 999px;
    overflow: hidden;
}

.best-training-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #38bdf8);
    border-radius: 999px;
}

.training-chart-box {
    margin-top: 45px;
}

.training-chart-box h2 {
    margin-bottom: 22px;
}

.training-chart {
    height: 260px;
    display: flex;
    align-items: flex-end;
    gap: 16px;

    padding: 24px;

    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 20px;
}

.training-chart-column {
    flex: 1;
    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.training-chart-bar {
    width: 100%;
    min-height: 12px;


    background: linear-gradient(180deg, #38bdf8, #22c55e);
    border-radius: 999px 999px 6px 6px;
}

.training-chart-column span {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .training-chart {
        gap: 10px;
        padding: 18px;
    }
}

.training-chart-percent {
    color: white;
    font-size: 14px;
    font-weight: 800;
}

.training-start-box {
    margin-bottom: 34px;
}

.training-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 16px 24px;

    border-radius: 18px;

    background: linear-gradient(135deg, #22c55e, #16a34a);

    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;

    box-shadow: 0 16px 35px rgba(34,197,94,0.22);

    transition: 0.3s;
}

.training-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(34,197,94,0.30);
}

.training-weak-profile {
    margin-top: 45px;
}

.training-weak-profile h2 {
    margin-bottom: 22px;
}

.training-weak-profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 22px;
    margin-bottom: 14px;

    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;

    text-decoration: none;

    transition: 0.3s;
}

.training-weak-profile-item:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
}

.training-weak-profile-item strong {
    color: #38bdf8;
    font-size: 22px;
}

.training-weak-profile-item span {
    color: #cbd5e1;
    font-weight: 600;
}

@media (max-width: 768px) {

    .training-weak-profile-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.rank-card {
    margin-top: 28px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(56,189,248,0.14), rgba(15,23,42,0.95));
    border: 1px solid rgba(56,189,248,0.28);
}

.rank-card-top {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rank-card-top span {
    display: block;
    margin-bottom: 8px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
}

.rank-card-top strong {
    color: white;
    font-size: 28px;
    font-weight: 900;
}

.rank-progress-bar {
    height: 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 999px;
    overflow: hidden;
}

.rank-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    border-radius: 999px;
}

@media (max-width: 768px) {
    .rank-card {
        padding: 22px;
    }

    .rank-card-top {
        flex-direction: column;
    }

    .rank-card-top strong {
        font-size: 24px;
    }
}

.mistakes-section {
    margin-top: 45px;
}

.mistakes-section h2 {
    margin-bottom: 22px;
}

.mistake-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 20px 24px;
    margin-bottom: 16px;

    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;

    text-decoration: none;

    transition: 0.3s;
}

.mistake-card:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
}

.mistake-card strong {
    display: block;

    color: #38bdf8;
    font-size: 24px;

    margin-bottom: 8px;
}

.mistake-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.5;
}

.mistake-card span {
    color: #94a3b8;
    font-size: 14px;
    white-space: nowrap;
}

@media (max-width: 768px) {

    .mistake-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .mistake-card span {
        white-space: normal;
    }
}

.profile-actions {
    display: flex;
    gap: 16px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 220px;
    min-height: 62px;

    padding: 18px 28px;

    border-radius: 18px;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;

    text-decoration: none;
    font-size: 17px;
    font-weight: 800;

    box-shadow: 0 16px 35px rgba(56,189,248,0.22);

    transition: 0.3s;
}

.profile-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(56,189,248,0.32);
}

.profile-action-btn-secondary {
    background: rgba(15,23,42,0.85);
    border: 1px solid rgba(255,255,255,0.08);
    color: #38bdf8;
    box-shadow: none;
}

.profile-action-btn-secondary:hover {
    border-color: #38bdf8;
    background: rgba(56,189,248,0.10);
}

@media (max-width: 768px) {

    .profile-actions {
        flex-direction: column;
    }

    .profile-action-btn {
        width: 100%;
    }
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;

    margin: 34px 0 10px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 24px;

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.14),
            rgba(15,23,42,0.92)
        );

    border: 1px solid rgba(56,189,248,0.18);

    text-decoration: none;

    transition: 0.3s;
}

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

    border-color: #38bdf8;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.20),
            rgba(15,23,42,0.96)
        );

    box-shadow:
        0 18px 40px rgba(56,189,248,0.18);
}

.quick-action-card strong {
    color: white;

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

.quick-action-card span {
    color: #94a3b8;

    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 768px) {

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .quick-action-card {
        padding: 22px;
    }

    .quick-action-card strong {
        font-size: 20px;
    }
}

.quick-action-card em {
    margin-top: 6px;

    color: #38bdf8;

    font-size: 14px;
    font-style: normal;
    font-weight: 800;

    opacity: 0.95;
}

.premium-card {
    max-width: 820px;
    margin: 40px auto;

    padding: 46px;

    border-radius: 32px;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.12),
            rgba(15,23,42,0.95)
        );

    border: 1px solid rgba(56,189,248,0.22);

    box-shadow:
        0 24px 60px rgba(0,0,0,0.35);

    text-align: center;
}

.premium-card h2 {
    margin-top: 0;
    margin-bottom: 22px;

    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.premium-card p {
    max-width: 700px;
    margin: 0 auto 34px;

    color: #cbd5e1;

    font-size: 19px;
    line-height: 1.7;
}

.premium-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 16px;

    margin: 40px 0;
}

.premium-features div {
    padding: 18px;

    border-radius: 18px;

    background: rgba(15,23,42,0.82);

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

    color: white;
    font-weight: 700;
}

.premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 10px;

    min-width: 260px;
    min-height: 62px;

    padding: 18px 28px;

    border-radius: 18px;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);

    color: #020617;
    text-decoration: none;

    font-size: 18px;
    font-weight: 900;

    box-shadow:
        0 18px 40px rgba(56,189,248,0.24);

    transition: 0.3s;
}

.premium-btn:hover {
    transform: translateY(-4px);

    box-shadow:
        0 24px 50px rgba(56,189,248,0.34);
}

@media (max-width: 768px) {

    .premium-card {
        padding: 30px 22px;
    }

    .premium-card h2 {
        font-size: 34px;
    }

    .premium-card p {
        font-size: 17px;
    }

    .premium-features {
        grid-template-columns: 1fr;
    }

    .premium-btn {
        width: 100%;
    }
}

.header-premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;

    border-radius: 999px;

    background: linear-gradient(135deg, #facc15, #eab308);

    color: #111827 !important;

    font-size: 15px;
    font-weight: 900;

    text-decoration: none;

    box-shadow:
        0 10px 24px rgba(250,204,21,0.22);

    transition: 0.3s;
}

.header-premium-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 16px 30px rgba(250,204,21,0.34);

    color: #111827 !important;
}

.trust-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;

    margin: 20px 0 80px;
}

.trust-card {
    padding: 28px 24px;

    border-radius: 24px;

    background: rgba(30,41,59,0.72);
    border: 1px solid rgba(255,255,255,0.08);

    text-align: center;
}

.trust-card strong {
    display: block;
    margin-bottom: 10px;

    color: #38bdf8;
    font-size: 34px;
    font-weight: 900;
}

.trust-card span {
    color: #94a3b8;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .trust-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .trust-section {
        grid-template-columns: 1fr;
    }
}

.features-section {
    margin: 90px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.feature-card {
    padding: 32px;

    border-radius: 28px;

    background: rgba(30,41,59,0.72);
    border: 1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(14px);

    transition: 0.35s;
}

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

    border-color: #38bdf8;

    box-shadow:
        0 20px 45px rgba(56,189,248,0.14);
}

.feature-icon {
    font-size: 34px;
    margin-bottom: 18px;
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 14px;

    font-size: 24px;
    color: white;
}

.feature-card p {
    margin: 0;

    color: #94a3b8;
    line-height: 1.7;
}

.premium-price-box {
    margin: 34px 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.premium-price-box strong {
    font-size: 64px;
    line-height: 1;

    color: white;
    font-weight: 900;
}

.premium-price-box span {
    color: #94a3b8;
    font-size: 18px;
    font-weight: 600;
}

.premium-contact-note {
    max-width: 520px;
    margin: 22px auto 0;

    color: #94a3b8;

    font-size: 15px;
    line-height: 1.6;
}

.creator-section {
    margin: 90px 0;
}

.creator-card {
    padding: 46px;

    border-radius: 32px;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.12),
            rgba(15,23,42,0.95)
        );

    border: 1px solid rgba(56,189,248,0.22);

    box-shadow:
        0 24px 60px rgba(0,0,0,0.28);
}

.creator-info {
    max-width: 820px;
}

.creator-text {
    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.7;
    margin-bottom: 18px;
}

@media (max-width: 768px) {
    .creator-card {
        padding: 30px 22px;
    }

    .creator-text {
        font-size: 17px;
    }
}

.final-cta-section {
    margin: 100px 0 20px;
}

.final-cta-card {
    padding: 50px;

    border-radius: 34px;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.18),
            rgba(15,23,42,0.96)
        );

    border: 1px solid rgba(56,189,248,0.28);

    text-align: center;
}

.final-cta-card h2 {
    max-width: 760px;
    margin: 0 auto 20px;

    font-size: 44px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.final-cta-card p {
    max-width: 680px;
    margin: 0 auto 34px;

    color: #cbd5e1;
    font-size: 19px;
    line-height: 1.7;
}

.final-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .final-cta-card {
        padding: 34px 22px;
    }

    .final-cta-card h2 {
        font-size: 34px;
    }

    .final-cta-buttons a {
        width: 100%;
    }
}

.dev-banner {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #fbbf24;
    color: #111827;
    padding: 10px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.dev-banner a {
    color: #111827;
    text-decoration: underline;
    font-weight: 700;
}

.logout-form {
    display: inline;
    margin: 0;
}

.logout-link {
    background: none;
    border: none;
    color: #38bdf8;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.logout-link:hover {
    color: #7dd3fc;
}

.criteria-card {
    margin-top: 30px;
    margin-bottom: 28px;
    padding: 38px 34px;
    border-radius: 30px;
    background: linear-gradient(
        180deg,
        rgba(15,23,42,0.96),
        rgba(15,23,42,0.82)
    );
    border: 1px solid rgba(148,163,184,0.14);
    box-shadow: 0 24px 70px rgba(0,0,0,0.34);
    overflow: hidden;
}

.criteria-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 34px;
}

.criteria-kicker {
    color: #38bdf8;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.criteria-max-score {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(250,204,21,0.14);
    border: 1px solid rgba(250,204,21,0.34);
    color: #facc15;
    font-weight: 800;
    white-space: nowrap;
}

.rubric-table-wrap {
    margin-top: 24px;
    overflow-x: auto;
}

.rubric-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 16px;
}

.rubric-table thead th {
    background: rgba(30,41,59,0.95);

    color: #60a5fa;
    font-size: 15px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.05em;

    padding: 20px 24px;
}

.rubric-table thead th:first-child {
    border-radius: 22px 0 0 22px;
    text-align: left;
}

.rubric-table thead th:last-child {
    border-radius: 0 22px 22px 0;
    width: 110px;
    text-align: center;
}

.rubric-table tbody td {
    background: rgba(30,41,59,0.82);

    padding: 26px 24px;

    color: #f8fafc;
    font-size: 16px;
    line-height: 1.75;

    vertical-align: top;
}

.rubric-table tbody td:first-child {
    border-radius: 24px 0 0 24px;
}

.rubric-table tbody td:last-child {
    border-radius: 0 24px 24px 0;

    width: 110px;

    text-align: center;

    color: #38bdf8;
    font-size: 34px;
    font-weight: 900;
}

.rubric-section {
    margin-top: 24px;
    padding-top: 18px;

    border-top: 1px solid rgba(148,163,184,0.12);
}

.rubric-section strong {
    display: block;

    margin-bottom: 10px;

    color: #38bdf8;
    font-size: 18px;
}

.rubric-table ul {
    margin: 12px 0 0 18px;
    padding: 0;
}

.rubric-table li {
    margin-bottom: 10px;
}

@media (max-width: 768px) {

    .rubric-table {
        min-width: 900px;
    }

    .rubric-table tbody td {
        font-size: 15px;
        padding: 22px 18px;
    }

    .rubric-table tbody td:last-child {
        font-size: 28px;
        width: 90px;
    }
}


.manual-score-select {
    width: 260px;
    height: 58px;
    padding: 0 18px;
    border-radius: 18px;
    background: rgba(15,23,42,0.92);
    border: 1px solid rgba(56,189,248,0.22);
    color: white;
    font-size: 17px;
    font-weight: 700;
    transition: 0.3s;
}

.manual-score-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56,189,248,0.14);
}

@media (max-width: 768px) {
    .criteria-card {
        padding: 26px 16px;
    }

    .criteria-header {
        flex-direction: column;
    }

    .manual-score-select {
        width: 100%;
    }
}

.criteria-content table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 14px !important;
}

.criteria-content th {
    background: rgba(30,41,59,0.95) !important;
    color: #60a5fa !important;
    padding: 20px 24px !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    text-align: left !important;
}

.criteria-content th:first-child {
    border-radius: 22px 0 0 22px !important;
}

.criteria-content th:last-child {
    width: 110px !important;
    border-radius: 0 22px 22px 0 !important;
    text-align: center !important;
}

.criteria-content td {
    background: rgba(30,41,59,0.82) !important;
    padding: 24px !important;
    color: #f8fafc !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    vertical-align: top !important;
    border: none !important;
}

.criteria-content td:first-child {
    border-radius: 24px 0 0 24px !important;
}

.criteria-content td:last-child {
    width: 110px !important;
    border-radius: 0 24px 24px 0 !important;
    text-align: center !important;
    color: #38bdf8 !important;
    font-size: 34px !important;
    font-weight: 900 !important;
}

.criteria-content h2,
.criteria-content h3 {
    color: #38bdf8 !important;
    margin: 24px 0 14px !important;
}

.criteria-content ul {
    margin: 12px 0 0 22px !important;
}

.criteria-content li {
    margin-bottom: 8px !important;
}

.manual-score-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.manual-score-option input {
    display: none;
}

.manual-score-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 92px;
    height: 52px;

    padding: 0 18px;

    border-radius: 16px;

    background: rgba(15,23,42,0.92);
    border: 1px solid rgba(56,189,248,0.22);

    color: white;

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

    cursor: pointer;
    transition: 0.25s;
}

.manual-score-option span:hover {
    border-color: #38bdf8;
    background: rgba(56,189,248,0.10);
}

.manual-score-option input:checked + span {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(56,189,248,0.25);
}

.hero-box {
    margin-bottom: 60px;
    padding: 54px;

    border-radius: 34px;

    background:
        radial-gradient(
            circle at top left,
            rgba(56,189,248,0.16),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            rgba(15,23,42,0.98),
            rgba(2,6,23,0.98)
        );

    border: 1px solid rgba(56,189,248,0.16);

    box-shadow:
        0 30px 80px rgba(0,0,0,0.45);
}

.hero-label {
    margin-bottom: 18px;

    color: #38bdf8;

    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-title {
    max-width: 760px;

    margin-bottom: 26px;

    color: white;

    font-size: 68px;
    line-height: 0.95;
    font-weight: 900;

    letter-spacing: -3px;
}

.hero-description {
    max-width: 720px;

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

    font-size: 22px;
    line-height: 1.7;
}

.section-title {
    margin-bottom: 28px;

    color: white;

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

.task-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 22px;
    padding: 10px 18px;

    border-radius: 14px;

    background: rgba(56,189,248,0.12);

    color: #38bdf8;

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

@media (max-width: 768px) {

    .hero-box {
        padding: 34px 24px;
        margin-bottom: 42px;
    }

    .hero-title {
        font-size: 46px;
        line-height: 1;
    }

    .hero-description {
        font-size: 18px;
        line-height: 1.6;
    }

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


.pro-section {
    margin: 100px 0;
}

.pro-header {
    text-align: center;

    max-width: 900px;
    margin: 0 auto 60px;
}

.pro-grid {
    display: grid;

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

    gap: 24px;
}

.pro-card {
    position: relative;

    overflow: hidden;

    padding: 34px 30px;

    border-radius: 30px;

    background:
        linear-gradient(
            180deg,
            rgba(15,23,42,0.96),
            rgba(15,23,42,0.78)
        );

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

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.pro-card::before {
    content: '';

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.10),
            transparent 40%
        );

    opacity: 0;

    transition: 0.3s;
}

.pro-card:hover {
    transform: translateY(-6px);

    border-color: rgba(56,189,248,0.4);

    box-shadow:
        0 20px 50px rgba(56,189,248,0.12);
}

.pro-card:hover::before {
    opacity: 1;
}

.pro-card > * {
    position: relative;
    z-index: 2;
}

.pro-card h3 {
    margin-top: 18px;
    margin-bottom: 16px;

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

    color: #f8fafc;
}

.pro-card p {
    color: #94a3b8;

    line-height: 1.7;

    font-size: 16px;
}

.pro-buttons {
    margin-top: 50px;

    display: flex;
    justify-content: center;
    gap: 20px;

    flex-wrap: wrap;
}

@media (max-width: 768px) {

    .pro-section {
        margin: 70px 0;
    }

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

    .pro-buttons a {
        width: 100%;
    }
}


.premium-hero {
    max-width: 950px;
    margin: 0 auto 70px;

    text-align: center;
}

.premium-hero-text {
    max-width: 820px;
    margin: 0 auto;

    color: #94a3b8;

    font-size: 22px;
    line-height: 1.8;
}

.premium-teacher-section {
    margin-top: 80px;
}

.premium-teacher-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;

    padding: 46px;

    border-radius: 34px;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.12),
            rgba(15,23,42,0.95)
        );

    border: 1px solid rgba(56,189,248,0.22);

    box-shadow:
        0 24px 60px rgba(0,0,0,0.28);
}

.premium-teacher-card h2 {
    margin-top: 0;
    margin-bottom: 20px;

    font-size: 42px;
    line-height: 1.1;
    letter-spacing: -1px;

    color: white;
}

.premium-teacher-card p {
    max-width: 760px;

    margin: 0;

    color: #cbd5e1;

    font-size: 19px;
    line-height: 1.8;
}

.premium-teacher-actions {
    display: flex;
    flex-direction: column;
    gap: 18px;

    min-width: 260px;
}

.premium-teacher-actions a {
    width: 100%;
}

@media (max-width: 900px) {

    .premium-teacher-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .premium-teacher-actions {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .premium-hero-text {
        font-size: 18px;
        line-height: 1.7;
    }

    .premium-teacher-card {
        padding: 30px 22px;
    }

    .premium-teacher-card h2 {
        font-size: 34px;
    }

    .premium-teacher-card p {
        font-size: 17px;
    }
}

.ai-check-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;

    margin-bottom: 34px;
    padding: 32px;

    border-radius: 30px;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.12),
            rgba(15,23,42,0.92)
        );

    border: 1px solid rgba(56,189,248,0.22);

    box-shadow:
        0 20px 50px rgba(0,0,0,0.24);
}

.ai-check-box strong {
    display: block;

    margin-bottom: 14px;

    color: white;

    font-size: 28px;
    line-height: 1.2;
}

.ai-check-box p {
    max-width: 760px;

    margin: 0;

    color: #cbd5e1;

    font-size: 17px;
    line-height: 1.7;
}

.ai-check-box-active {
    border-color: rgba(34,197,94,0.35);

    background:
        linear-gradient(
            135deg,
            rgba(34,197,94,0.12),
            rgba(15,23,42,0.92)
        );
}

@media (max-width: 768px) {

    .ai-check-box {
        flex-direction: column;
        align-items: flex-start;

        padding: 26px 20px;
    }

    .ai-check-box strong {
        font-size: 24px;
    }

    .ai-check-box p {
        font-size: 16px;
    }

    .ai-check-box a {
        width: 100%;
    }
}

.premium-card {
    max-width: 980px;
}

.premium-features {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.premium-teacher-card {
    max-width: 1250px;
    margin: 0 auto;
}

@media (min-width: 1100px) {
    .premium-hero .page-title {
        max-width: 1050px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ---------- Premium page wide layout fix ---------- */

.premium-hero {
    max-width: 1400px;
    margin: 0 auto 50px;
}

.premium-hero .page-title {
    max-width: 1150px;
    font-size: clamp(52px, 5vw, 86px);
}

.premium-hero-text {
    max-width: 920px;
}

.premium-card {
    max-width: 1120px;
    padding: 58px;
    position: relative;
    overflow: hidden;
}

.premium-features {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 18px;
}

.premium-card h2 {
    font-size: 56px;
}

.premium-card p {
    max-width: 900px;
    font-size: 20px;
}

.premium-teacher-card {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .premium-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .premium-card {
        padding: 30px 22px;
    }

    .premium-features {
        grid-template-columns: 1fr;
    }
}

.premium-card::before {
    content: '';
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at top left,
            rgba(56,189,248,0.16),
            transparent 30%
        );

    pointer-events: none;
}

.premium-card > * {
    position: relative;
    z-index: 2;
}

.premium-card h2 {
    line-height: 1;
    letter-spacing: -2px;
}

.premium-features div {
    transition: 0.3s;
}

.premium-features div:hover {
    transform: translateY(-4px);
    border-color: rgba(56,189,248,0.35);
    background: rgba(20,30,50,0.92);
}

.premium-price-box strong {
    font-size: 82px;
    letter-spacing: -3px;
}

.welcome-profile-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;

    margin-bottom: 42px;
    padding: 40px;

    border-radius: 34px;

    background:
        linear-gradient(
            135deg,
            rgba(56,189,248,0.14),
            rgba(15,23,42,0.96)
        );

    border: 1px solid rgba(56,189,248,0.22);

    box-shadow:
        0 20px 50px rgba(0,0,0,0.22);
}

.welcome-profile-box h2 {
    margin-top: 12px;
    margin-bottom: 18px;

    font-size: 44px;
    line-height: 1.05;

    color: white;
}

.welcome-profile-box p {
    max-width: 760px;

    margin: 0;

    color: #cbd5e1;

    font-size: 18px;
    line-height: 1.8;
}

.welcome-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;

    min-width: 240px;
}

.welcome-profile-actions a {
    width: 100%;
}

@media (max-width: 900px) {

    .welcome-profile-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .welcome-profile-actions {
        width: 100%;
    }
}

.empty-profile-start {
    margin-top: 34px;
    padding: 34px;

    border-radius: 28px;

    background: rgba(15,23,42,0.72);
    border: 1px solid rgba(255,255,255,0.08);

    text-align: center;
}

.empty-profile-start h2 {
    margin-top: 0;
    font-size: 34px;
    color: white;
}

.empty-profile-start p {
    max-width: 720px;
    margin: 0 auto;

    color: #94a3b8;
    font-size: 18px;
    line-height: 1.7;
}

.ai-solution-box,
.ai-solution-locked {
    margin: 28px 0;
    padding: 28px;

    border-radius: 26px;

    background: rgba(15,23,42,0.78);
    border: 1px solid rgba(56,189,248,0.18);
}

.ai-solution-box label {
    display: block;

    margin-bottom: 16px;

    color: white;

    font-size: 20px;
    font-weight: 900;
}

.ai-solution-box textarea {
    width: 100%;
    min-height: 180px;

    resize: vertical;

    padding: 20px;

    border-radius: 20px;

    background: rgba(2,6,23,0.88);
    border: 1px solid rgba(255,255,255,0.08);

    color: white;

    font-size: 17px;
    line-height: 1.7;
}

.ai-solution-box p,
.ai-solution-locked p {
    margin: 16px 0 0;

    color: #94a3b8;

    font-size: 16px;
    line-height: 1.6;
}

.ai-solution-locked {
    border-color: rgba(250,204,21,0.24);
    background: rgba(15,23,42,0.55);
}

.ai-solution-locked strong {
    display: block;

    color: #facc15;

    font-size: 19px;
    margin-bottom: 10px;
}

.ai-result-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.ai-result-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 22px;
    color: white;
}

.ai-result-card {
    padding: 26px;
    margin-bottom: 18px;

    border-radius: 24px;

    background:
        linear-gradient(
            180deg,
            rgba(15,23,42,0.95),
            rgba(15,23,42,0.82)
        );

    border: 1px solid rgba(56,189,248,0.18);
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 14px;

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

.ai-result-header span {
    padding: 8px 14px;
    border-radius: 999px;

    background: rgba(56,189,248,0.12);
    border: 1px solid rgba(56,189,248,0.26);

    color: #38bdf8;
}

.ai-result-card p {
    margin: 0;

    color: #cbd5e1;

    font-size: 17px;
    line-height: 1.7;
}

.ai-file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 16px;
    padding: 14px 20px;

    border-radius: 16px;

    background: rgba(56,189,248,0.10);
    border: 1px solid rgba(56,189,248,0.28);

    color: #38bdf8;

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

    cursor: pointer;
    transition: 0.25s;
}

.ai-file-upload:hover {
    background: rgba(56,189,248,0.16);
    border-color: #38bdf8;
}

.ai-file-input {
    display: none;
}

.ai-dropzone {
    position: relative;

    margin-top: 18px;
    padding: 32px 24px;

    border-radius: 22px;

    border: 2px dashed rgba(56,189,248,0.22);

    background:
        linear-gradient(
            180deg,
            rgba(15,23,42,0.75),
            rgba(15,23,42,0.55)
        );

    transition: 0.25s;
    cursor: pointer;
}

.ai-dropzone:hover {
    border-color: #38bdf8;

    background:
        linear-gradient(
            180deg,
            rgba(15,23,42,0.90),
            rgba(15,23,42,0.72)
        );
}

.ai-dropzone-content {
    text-align: center;
}

.ai-dropzone-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.ai-dropzone-title {
    color: white;

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

    margin-bottom: 8px;
}

.ai-dropzone-subtitle {
    color: #94a3b8;

    font-size: 15px;
}

.ai-file-input {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    cursor: pointer;
}

.ai-dropzone.dragover {
    border-color: #38bdf8;

    transform: scale(1.01);

    background:
        linear-gradient(
            180deg,
            rgba(30,41,59,0.98),
            rgba(15,23,42,0.88)
        );
}

.ai-check-row {
    margin-bottom: 16px;
    padding: 16px 18px;

    border-radius: 16px;

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

    border: 1px solid rgba(255,255,255,0.06);
}

.ai-check-row strong {
    display: block;

    margin-bottom: 8px;

    color: #38bdf8;

    font-size: 17px;
}

.ai-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.ai-loading-overlay.active {
    display: flex;
}

.ai-loading-box {
    width: min(520px, 90%);
    padding: 42px 36px;
    border-radius: 28px;
    background: linear-gradient(180deg, #111827, #0f172a);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 45px rgba(56, 189, 248, 0.18);
    text-align: center;
}

.ai-loader {
    width: 58px;
    height: 58px;
    margin: 0 auto 24px;
    border-radius: 50%;
    border: 5px solid rgba(56, 189, 248, 0.18);
    border-top-color: #38bdf8;
    animation: aiSpin 0.9s linear infinite;
}

.ai-loading-box h2 {
    margin: 0 0 12px;
    font-size: 28px;
    color: #f8fafc;
}

.ai-loading-box p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.5;
}

@keyframes aiSpin {
    to {
        transform: rotate(360deg);
    }
}

.ai-help-text {
    margin-top: 10px;
    margin-bottom: 18px;

    font-size: 15px;
    line-height: 1.6;

    color: rgba(255,255,255,0.72);
}

.criteria-content {
    line-height: 1.75;
    font-size: 16px;
}

.exam-task-item h2 {
    font-size: 34px;
    margin-bottom: 24px;
}

