/* =====================================================
   TECHCOOL — СТИЛИ ЭКЗАМЕНОВ
   ===================================================== */

.exam-page{
    width:100%;
    margin:0;
    padding:0 0 55px;
}
/* =====================================================
   HERO
   ===================================================== */

.exam-intro {
    position: relative;
    width: 100%;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 8%;
    background:
        radial-gradient(circle at 50% 45%, rgba(138, 123, 182, 0.12), transparent 30%),
        radial-gradient(circle at 80% 40%, rgba(138, 123, 182, 0.22), transparent 35%),
        linear-gradient(135deg, #0b0b0d 0%, #15131a 55%, #211b2d 100%);
    border-bottom: 1px solid rgba(138, 123, 182, 0.18);
    box-shadow:
        inset 0 -80px 100px rgba(0, 0, 0, 0.18),
        0 20px 80px rgba(0, 0, 0, 0.2);
}
.exam-intro::before {
    content: "";
    position: absolute;
    top: -180px;
    left: 50%;
    width: 520px;
    height: 520px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(138, 123, 182, 0.08);
    filter: blur(90px);
    pointer-events: none;
}
.exam-intro::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.025) 50%,
            transparent 100%
        );
    pointer-events: none;
}
.exam-intro-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}
.exam-label {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
    padding: 8px 16px;
    color: #b0a8c0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    border: 1px solid rgba(176, 168, 192, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow:
        0 0 25px rgba(138, 123, 182, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.exam-intro h1 {
    position: relative;
    margin: 0;
    color: #ffffff;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -1px;
    text-shadow:
        0 0 20px rgba(138, 123, 182, 0.25),
        0 0 60px rgba(138, 123, 182, 0.12);
}
.exam-intro-decoration {
    position: absolute;
    right: 8%;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(138, 123, 182, 0.25);
    border-radius: 50%;
    box-shadow:
        0 0 80px rgba(138, 123, 182, 0.12),
        0 0 160px rgba(138, 123, 182, 0.06),
        inset 0 0 80px rgba(138, 123, 182, 0.08);
    opacity: 0.9;
}
.exam-intro-decoration::before,
.exam-intro-decoration::after {
    content: "";
    position: absolute;
    inset: 12%;
    border: 1px solid rgba(138, 123, 182, 0.2);
    border-radius: 50%;
}
.exam-intro-decoration::after {
    inset: 30%;
    border-color: rgba(176, 168, 192, 0.22);
    box-shadow:
        0 0 35px rgba(138, 123, 182, 0.16),
        inset 0 0 35px rgba(138, 123, 182, 0.08);
}
/* =====================================================
   ИНФОРМАЦИЯ ЭКЗАМЕНА
   ===================================================== */

.exam-details{
    position:relative;
    width:min(520px,calc(100% - 40px));
    margin:55px auto 0;
    padding:50px 35px;
    overflow:hidden;
    text-align:center;
    border:1px solid rgba(176,168,192,.2);
    border-radius:22px;
    background:linear-gradient(135deg,rgba(255,255,255,.075),rgba(138,123,182,.045));
    box-shadow:0 25px 70px rgba(0,0,0,.3),0 0 50px rgba(138,123,182,.08),inset 0 1px 0 rgba(255,255,255,.12),inset 0 -1px 0 rgba(0,0,0,.2);
    backdrop-filter:blur(20px);
    -webkit-backdrop-filter:blur(20px);
}

.exam-details::before{
    content:"";
    position:absolute;
    top:-150px;
    left:50%;
    width:320px;
    height:260px;
    transform:translateX(-50%);
    border-radius:50%;
    background:rgba(138,123,182,.16);
    filter:blur(75px);
    pointer-events:none;
}

.exam-details::after{
    content:"";
    position:absolute;
    top:0;
    left:12%;
    right:12%;
    height:1px;
    background:linear-gradient(90deg,transparent,rgba(176,168,192,.5),rgba(138,123,182,.5),rgba(176,168,192,.5),transparent);
    box-shadow:0 0 15px rgba(138,123,182,.35);
}

.exam-details-content{
    position:relative;
    z-index:1;
    width:100%;
    margin:0 auto;
}

.exam-details h2{
    margin:0 0 16px;
    color:var(--text-color,#fff);
    font-family:"Orbitron",sans-serif;
    font-size:clamp(23px,3vw,32px);
    line-height:1.2;
}

.exam-details p{
    max-width:600px;
    margin:0 auto 30px;
    color:var(--secondary-text-color,#b0a8c0);
    font-size:16px;
    line-height:1.7;
}

.exam-info{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    width:100%;
    margin:0 0 30px;
}

.exam-info-item{
    min-width:0;
    padding:13px 8px;
    overflow:hidden;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(176,168,192,.18);
    border-radius:12px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 5px 20px rgba(0,0,0,.08);
    backdrop-filter:blur(10px);
}

.exam-info-item span{
    display:block;
    margin-bottom:5px;
    overflow:hidden;
    color:#8a7bb6;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.7px;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.exam-info-item strong{
    display:block;
    overflow:hidden;
    color:#fff;
    font-size:14px;
    line-height:1.25;
    white-space:nowrap;
    text-overflow:ellipsis;
}

/* =====================================================
   КНОПКИ
   ===================================================== */

.exam-page button{
    font-family:inherit;
    cursor:pointer;
    transition:transform .2s ease,box-shadow .2s ease,background .2s ease,border-color .2s ease;
}

.exam-start-button,
.exam-next-button,
.exam-finish-button,
.exam-return-button{
    border:1px solid #8a7bb6;
    border-radius:10px;
    padding:14px 24px;
    color:#fff;
    background:#8a7bb6;
    font-size:15px;
    font-weight:700;
    box-shadow:0 5px 18px rgba(138,123,182,.16);
}

.exam-start-button:hover,
.exam-next-button:hover,
.exam-finish-button:hover,
.exam-return-button:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 25px rgba(138,123,182,.3),0 0 25px rgba(138,123,182,.12);
}

.exam-next-button{
    background:transparent;
}

.exam-next-button:hover{
    background:rgba(138,123,182,.12);
}

/* =====================================================
   СОДЕРЖИМОЕ ЭКЗАМЕНА
   ===================================================== */

.exam-content{
    width:min(1100px,calc(100% - 40px));
    margin:0 auto;
    padding:70px 0 0;
}

.exam-progress{
    margin-bottom:35px;
    padding:22px;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:14px;
    background:var(--card-background,#111);
}

.exam-progress-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:15px;
}

.exam-progress-label{
    display:block;
    margin-bottom:5px;
    color:#8a7bb6;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:1px;
}

.exam-progress-top strong{
    color:var(--text-color,#fff);
    font-size:20px;
}

#examProgressPercent{
    color:#8a7bb6;
    font-size:24px;
    font-weight:800;
}

.exam-progress-bar{
    width:100%;
    height:8px;
    overflow:hidden;
    border-radius:10px;
    background:#2b2b2b;
}

#examProgressBar{
    display:block;
    width:0;
    height:100%;
    border-radius:inherit;
    background:#8a7bb6;
    box-shadow:0 0 12px rgba(138,123,182,.45);
    transition:width .3s ease;
}

/* =====================================================
   ВОПРОС
   ===================================================== */

.exam-question{
    padding:45px;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:18px;
    background:var(--card-background,#111);
}

.exam-question-number{
    color:#8a7bb6;
    font-size:13px;
    font-weight:700;
    letter-spacing:2px;
}

.exam-question h2{
    margin:12px 0 30px;
    color:var(--text-color,#fff);
    font-family:"Orbitron",sans-serif;
    font-size:clamp(25px,4vw,40px);
    line-height:1.25;
}

.exam-options{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.exam-option{
    min-width:0;
    display:flex;
    align-items:center;
    width:100%;
    padding:18px 20px;
    text-align:left;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:12px;
    color:var(--text-color,#fff);
    background:rgba(255,255,255,.025);
}

.exam-option:hover{
    border-color:#8a7bb6;
    background:rgba(138,123,182,.08);
    box-shadow:0 0 20px rgba(138,123,182,.08);
}

.exam-option-letter{
    display:flex;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    min-width:34px;
    margin-right:15px;
    border:1px solid rgba(138,123,182,.4);
    border-radius:8px;
    color:#8a7bb6;
    font-weight:800;
}

.exam-option-text{
    font-size:16px;
    line-height:1.5;
    min-width:0;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.exam-navigation{
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:25px;
}

/* =====================================================
   РЕЗУЛЬТАТ
   ===================================================== */

.exam-result{
    width:min(700px,calc(100% - 40px));
    margin:70px auto 0;
    padding:60px 40px;
    text-align:center;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:22px;
    background:var(--card-background,#111);
    box-shadow:0 25px 70px rgba(0,0,0,.25);
}

.exam-result-label{
    color:#8a7bb6;
    font-size:13px;
    font-weight:700;
    letter-spacing:2px;
}

.exam-result h2{
    margin:15px 0 20px;
    color:var(--text-color,#fff);
    font-family:"Orbitron",sans-serif;
}

#examScore{
    display:block;
    margin-bottom:20px;
    color:#8a7bb6;
    font-size:56px;
    font-weight:800;
}

.exam-result p{
    margin:0 auto 30px;
    color:var(--secondary-text-color,#b0a8c0);
    line-height:1.7;
}
.exam-option.selected{
    border-color:#8a7bb6;
    background:rgba(138,123,182,.16);
    box-shadow:0 0 20px rgba(138,123,182,.15),inset 0 0 15px rgba(138,123,182,.05);
}
.exam-option.selected .exam-option-letter{
    color:#fff;
    background:#8a7bb6;
    border-color:#8a7bb6;
    box-shadow:0 0 12px rgba(138,123,182,.45);
}
/* =====================================================
   СВЕТЛАЯ ТЕМА
   ===================================================== */

body.light-theme .exam-intro{
    background:
        radial-gradient(circle at 20% 30%,rgba(138,123,182,.12),transparent 32%),
        radial-gradient(circle at 80% 35%,rgba(138,123,182,.16),transparent 35%),
        linear-gradient(135deg,#f8f7fb 0%,#eeeaf4 55%,#e4deed 100%);
    border-bottom-color:rgba(117,104,156,.16);
}

body.light-theme .exam-intro h1{
    color:#201d27;
}

body.light-theme .exam-label{
    color:#75689c;
    background:rgba(255,255,255,.62);
    border-color:rgba(117,104,156,.18);
}

body.light-theme .exam-details{
    background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(247,245,250,.78));
    border-color:rgba(117,104,156,.18);
}

body.light-theme .exam-details h2{
    color:#201d27;
}

body.light-theme .exam-details p{
    color:#625d6c;
}

body.light-theme .exam-info-item{
    background:rgba(255,255,255,.58);
    border-color:rgba(117,104,156,.16);
}

body.light-theme .exam-info-item strong{
    color:#292631;
}

body.light-theme .exam-progress{
    background:rgba(255,255,255,.85);
    border-color:#d8d3df;
}

body.light-theme .exam-progress-top strong{
    color:#201d27;
}

body.light-theme .exam-progress-bar{
    background:#dedbe5;
}

body.light-theme .exam-question{
    background:rgba(255,255,255,.9);
    border-color:#d8d3df;
}

body.light-theme .exam-question h2{
    color:#201d27;
}

body.light-theme .exam-option{
    color:#292631;
    background:rgba(255,255,255,.6);
    border-color:#d8d3df;
}

body.light-theme .exam-option:hover{
    background:rgba(138,123,182,.08);
}

body.light-theme .exam-result{
    background:rgba(255,255,255,.9);
    border-color:#d8d3df;
}

body.light-theme .exam-result h2{
    color:#201d27;
}
.exam-code{
    display:flex;
    width:100%;
    margin:0 0 30px;
    border:1px solid rgba(138,123,182,.25);
    border-radius:14px;
    overflow:auto;
    background:#0b0b0e;
    box-shadow:0 15px 40px rgba(0,0,0,.2);
}

.exam-code-lines{
    display:flex;
    flex-direction:column;
    flex-shrink:0;
    padding:18px 12px;
    border-right:1px solid rgba(138,123,182,.15);
    background:#08080a;
    color:#55505f;
    font:14px/1.6 "Courier New",monospace;
    text-align:right;
    user-select:none;
}

.exam-code-lines span{
    height:22.4px;
}

.exam-code-content{
    margin:0;
    padding:18px 20px;
    min-width:max-content;
    color:#d8d5df;
    font:14px/1.6 "Courier New",monospace;
    white-space:pre;
}

.py-keyword{
    color:#c792ea;
}

.py-function{
    color:#82aaff;
}

.py-string{
    color:#c3e88d;
}

.py-number{
    color:#f78c6c;
}

.py-boolean{
    color:#ffcb6b;
}

.py-comment{
    color:#676e95;
    font-style:italic;
}

body.light-theme .exam-code{
    border-color:#d8d3df;
    background:#f5f3f8;
    box-shadow:0 15px 40px rgba(70,60,90,.06);
}

body.light-theme .exam-code-lines{
    background:#ebe8f0;
    border-color:#d8d3df;
    color:#9992a5;
}

body.light-theme .exam-code-content{
    color:#403b48;
}
/* =====================================================
   АДАПТИВ
   ===================================================== */

@media(max-width:900px){
    .exam-intro{
        min-height:220px;
        padding:45px 6%;
    }

    .exam-intro-decoration{
        right:-160px;
        width:380px;
        height:380px;
        opacity:.5;
    }
}

@media(max-width:600px){
    .exam-intro{
        min-height:210px;
        padding:40px 20px;
    }

    .exam-intro-decoration{
        right:-190px;
        width:330px;
        height:330px;
        opacity:.3;
    }

    .exam-info{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:6px;
    }

    .exam-info-item{
        padding:12px 5px;
    }

    .exam-info-item span{
        font-size:9px;
        letter-spacing:.4px;
    }

    .exam-info-item strong{
        font-size:12px;
    }

    .exam-details{
        width:min(390px,calc(100% - 30px));
        margin-top:35px;
        padding:38px 22px;
        border-radius:18px;
    }

    .exam-details p{
        font-size:15px;
    }

    .exam-content{
        width:calc(100% - 30px);
        padding:45px 0 0;
    }

    .exam-question{
        padding:25px 20px;
    }

    .exam-navigation{
        flex-direction:column;
    }

    .exam-navigation button{
        width:100%;
    }

    .exam-result{
        width:calc(100% - 30px);
        padding:45px 22px;
    }
}

@media(max-width:349px){
    .exam-info{
        grid-template-columns:1fr;
    }

    .exam-info-item{
        padding:12px 14px;
    }

    .exam-info-item span{
        font-size:10px;
        letter-spacing:.7px;
    }

    .exam-info-item strong{
        font-size:14px;
    }
}
/* =====================================================
   ПРАКТИЧЕСКИЙ ЭКЗАМЕН
   ===================================================== */

#questionContent{
    width:100%;
}

.exam-question-image{
    width:100%;
    margin:0 0 30px;
    padding:18px;
    box-sizing:border-box;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:14px;
    background:rgba(0,0,0,.18);
    overflow:hidden;
}

.exam-question-image img{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    margin:0 auto;
    border-radius:10px;
}

.exam-written{
    width:100%;
    margin-top:20px;
}

.exam-written textarea{
    display:block;
    width:100%;
    min-height:180px;
    box-sizing:border-box;
    resize:vertical;
    padding:18px;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:12px;
    outline:none;
    color:var(--text-color,#fff);
    background:rgba(255,255,255,.025);
    font:inherit;
    font-size:16px;
    line-height:1.6;
    transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}

.exam-written textarea:focus{
    border-color:#8a7bb6;
    background:rgba(138,123,182,.05);
    box-shadow:0 0 20px rgba(138,123,182,.08);
}

.exam-written textarea::placeholder{
    color:var(--secondary-text-color,#8f899b);
}

.exam-option:disabled,
.exam-next-button:disabled,
.exam-finish-button:disabled{
    cursor:not-allowed;
    opacity:.45;
    transform:none!important;
    box-shadow:none!important;
}

body.light-theme .exam-question-image{
    background:rgba(255,255,255,.65);
    border-color:#d8d3df;
}

body.light-theme .exam-written textarea{
    color:#292631;
    background:rgba(255,255,255,.65);
    border-color:#d8d3df;
}

body.light-theme .exam-written textarea:focus{
    background:rgba(138,123,182,.05);
}

body.light-theme .exam-written textarea::placeholder{
    color:#8a8492;
}
body.light-theme .exam-next-button,
body.light-theme .exam-finish-button{
    color:#292631;
}
#examQuestionScore{
    display:inline-flex;
    align-items:center;
    margin-left:12px;
    padding:5px 10px;
    border:1px solid rgba(138,123,182,.35);
    border-radius:7px;
    color:#b0a8c0;
    background:rgba(138,123,182,.08);
    font-size:11px;
    font-weight:700;
    letter-spacing:.8px;
    vertical-align:middle;
    white-space:nowrap;
}

#examQuestionScore.star{
    border-color:rgba(229,185,77,.4);
    color:#e5c66c;
    background:rgba(229,185,77,.08);
    box-shadow:0 0 12px rgba(229,185,77,.08);
}

body.light-theme #examQuestionScore{
    border-color:rgba(117,104,156,.25);
    color:#75689c;
    background:rgba(138,123,182,.07);
}

body.light-theme #examQuestionScore.star{
    border-color:rgba(154,123,33,.3);
    color:#9a7b21;
    background:rgba(229,185,77,.08);
}
.exam-errors{
    width:min(700px,calc(100% - 40px));
    margin:20px auto 0;
    padding:28px;
    box-sizing:border-box;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:18px;
    background:var(--card-background,#111);
    box-shadow:0 20px 55px rgba(0,0,0,.18);
}

.exam-errors-label{
    display:block;
    margin-bottom:18px;
    color:#8a7bb6;
    font-size:12px;
    font-weight:700;
    letter-spacing:2px;
}

.exam-errors-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.exam-error-item{
    display:grid;
    grid-template-columns:1fr 34px 65px;
    align-items:center;
    gap:12px;
    min-height:52px;
    padding:0 15px;
    box-sizing:border-box;
    border:1px solid var(--border-color,#2b2b2b);
    border-radius:11px;
    background:rgba(255,255,255,.025);
}

.exam-error-number{
    color:var(--text-color,#fff);
    font-size:13px;
    font-weight:700;
    letter-spacing:.5px;
}

.exam-error-status{
    display:flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    border-radius:50%;
    font-size:16px;
    font-weight:900;
}

.exam-error-score{
    text-align:right;
    color:var(--secondary-text-color,#b0a8c0);
    font-size:13px;
    font-weight:700;
    white-space:nowrap;
}

.exam-error-item.correct{
    border-color:rgba(114,209,147,.2);
    background:rgba(114,209,147,.035);
}

.exam-error-item.correct .exam-error-status{
    color:#72d193;
    background:rgba(114,209,147,.1);
    box-shadow:0 0 12px rgba(114,209,147,.12);
}

.exam-error-item.correct .exam-error-score{
    color:#72d193;
}

.exam-error-item.wrong{
    border-color:rgba(229,185,77,.2);
    background:rgba(229,185,77,.025);
}

.exam-error-item.wrong .exam-error-status{
    color:#e5c66c;
    background:rgba(229,185,77,.1);
}

.exam-error-item.wrong .exam-error-score{
    color:#e5c66c;
}

body.light-theme .exam-errors{
    background:rgba(255,255,255,.9);
    border-color:#d8d3df;
    box-shadow:0 20px 55px rgba(70,60,90,.07);
}

body.light-theme .exam-error-item{
    background:rgba(255,255,255,.65);
    border-color:#d8d3df;
}

body.light-theme .exam-error-item.correct{
    border-color:rgba(63,143,93,.2);
    background:rgba(114,209,147,.06);
}

body.light-theme .exam-error-item.wrong{
    border-color:rgba(154,123,33,.2);
    background:rgba(229,185,77,.06);
}

body.light-theme .exam-error-number{
    color:#292631;
}

body.light-theme .exam-error-item.correct .exam-error-status,
body.light-theme .exam-error-item.correct .exam-error-score{
    color:#3f8f5d;
}

body.light-theme .exam-error-item.wrong .exam-error-status,
body.light-theme .exam-error-item.wrong .exam-error-score{
    color:#9a7b21;
}
@media(max-width:600px){
    .exam-question-image{
        padding:10px;
        margin-bottom:22px;
    }
    #examQuestionScore{
        margin-left:8px;
        padding:4px 8px;
        font-size:10px;
    }
    .exam-written textarea{
        min-height:160px;
        padding:15px;
        font-size:15px;
    }
    .exam-errors{
        width:calc(100% - 30px);
        padding:20px 14px;
    }

    .exam-error-item{
        grid-template-columns:1fr 30px 55px;
        gap:8px;
        padding:0 11px;
    }

    .exam-error-number{
        font-size:12px;
    }

    .exam-error-score{
        font-size:12px;
    }
    .exam-question-image{
        width:calc(100% + 40px);
        margin-left:-20px;
        padding:6px;
        border-radius:10px;
    }

    .exam-question-image img{
        width:100%;
        max-width:none;
        border-radius:7px;
    }
    .exam-option{
        align-items:flex-start;
    }

    .exam-option-text{
        flex:1;
        min-width:0;
        line-height:1.45;
    }
        .exam-code{
        width:calc(100% + 20px);
        margin-left:-10px;
        margin-bottom:22px;
        border-radius:10px;
    }

    .exam-code-lines{
        padding:14px 9px;
        font-size:12px;
    }

    .exam-code-lines span{
        height:19.2px;
    }

    .exam-code-content{
        padding:14px 14px;
        font-size:12px;
        line-height:1.6;
    }
}