
.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin: 0px 10px 0px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38B2AC, #9F7AEA);
    width: 0%;
    transition: width 0.4s ease;
}
#app > .container {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
}

.question-container {
    background: white;
    border-radius: 20px;
    padding: 4px 20px 30px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(50, 38, 89, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s forwards;
}
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.question-title {
    font-size: 24px;
    margin-bottom: 16px;
    color: #322659;
    margin-top: 12px;
}
.question-image {
    margin: 20px 0;
    text-align: center;
    width: 100%;
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-image_bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    filter: blur(4px);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow: hidden;
    border-radius: 20px;
}

.question-image_bg::before {
    content: "";
    background-image: url(../images/background/glass.webp);
    background-repeat: repeat;
    background-color: black;
    background-size: 750px;
    opacity: 0.3;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background-attachment: fixed;
}
.question-image_bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.question-image-img {
    max-width: 100%;
    max-height: 90%;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    position: relative;
}
.question-description {
    color: #666;
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
}
.options-grid {
    display: grid;
    gap: 10px;
}
.options-grid--2col {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 576px) {
    .options-grid--2col { grid-template-columns: 1fr; }
}
.option-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #322659;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}
.option-btn:hover {
    border-color: #9F7AEA;
    transform: translateY(-2px);
}
.option-btn.selected {
    border-color: #38B2AC;
    background: #f0fdfa;
    font-weight: 600;
}
.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-prev {
    background: #f0f0f0;
    color: #322659;
}
.btn-next, .btn-submit {
    background: #38B2AC;
    color: white;
    margin-left: auto;
}
.btn-submit {
    background: #9F7AEA;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.result-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    padding: 10px 30px 30px;
    min-height: 80vh;
    box-shadow: 0 4px 20px rgba(50, 38, 89, 0.1);
    /* display: none;/ */
}


.result-container_banner {
    width: 100%;
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.result-container_banner_bg{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    filter: blur(4px);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow: hidden;
    border-radius: 20px;
}

.result-container_banner_bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-container_banner_bg::before {
    content: "";
    background-image: url(../images/background/glass.webp);
    background-repeat: repeat;
    background-color: black;
    background-size: 750px;
    opacity: 0.3;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background-attachment: fixed;
}
.result-container_banner_img {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    max-width: 90%;
    height: 90%;
}

.result-container_banner_img img {
    object-fit: contain;
    height: 100%;
}
.result-container-res-info {
    font-size: 26px;
}
.result-title {
    font-size: 26px;
    margin-bottom: 20px;
    color: #322659;
    margin-top: 20px;
}
.result-text {
    font-size: 18px;
    line-height: 1.6;
    color: #666;
}
.result-actions {
    margin-top: auto;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.result-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.btn-catalog {
    background: #38B2AC;
    color: white;
}
.btn-author {
    background: #9F7AEA;
    color: white;
}
.hidden {
    display: none;
}

/* ===== Share section ===== */
.share-section { margin: 24px 0 8px; text-align: center; }
.share-label { font-size: 14px; color: #888; margin-bottom: 12px; }
.share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 18px; border: none; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
    text-decoration: none;
}
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-vk   { background: #0077FF; color: #fff; }
.share-tg   { background: #26A5E4; color: #fff; }
.share-copy { background: #f0ebfa; color: #322659; }
.share-copy.copied { background: #c6f6d5; color: #276749; }

/* ===== Rate section ===== */
.rate-section { margin: 20px 0 8px; text-align: center; }
.rate-label { font-size: 14px; color: #888; margin-bottom: 10px; }
.rate-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rate-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 22px; border: 2px solid #e9e5f5; border-radius: 10px;
    background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.rate-btn:hover { border-color: #9F7AEA; }
.rate-btn.rate-like.active    { background: #dcfce7; border-color: #22c55e; color: #15803d; }
.rate-btn.rate-dislike.active { background: #fee2e2; border-color: #ef4444; color: #b91c1c; }
.rate-btn:disabled { opacity: .5; cursor: not-allowed; }
.comment-cta {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
    background: #faf5ff; color: #322659; text-decoration: none; border: 1px solid #ede9f8;
    transition: all .2s; margin-top: 10px;
}
.comment-cta:hover { background: #f0ebfa; }

/* ===== Similar tests ===== */
.similar-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid #f0ebfa; }
.similar-heading { font-size: 18px; font-weight: 700; color: #322659; margin-bottom: 16px; text-align: center; }
.similar-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.similar-card { width: 160px; flex-shrink: 0; }
.similar-card {
    display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
    background: white; box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    text-decoration: none; transition: all 0.2s;
}
.similar-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.similar-card-img {
    width: 100%; height: 100px; object-fit: cover; background: #faf5ff;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.similar-card-img img { width: 100%; height: 100%; object-fit: cover; }
.similar-card-title { padding: 8px 10px; font-size: 13px; font-weight: 600; color: #322659; line-height: 1.3; }

/* ===== Celebration screen ===== */
.celebration-screen {
    position: relative;
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 50px 30px 44px;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 4px 30px rgba(50,38,89,.12);
    overflow: hidden;
    animation: fadeIn .5s ease;
}
.celebration-particles {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.particle {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    top: -10px;
    left: calc(var(--i) * 8% - 4%);
    background: hsl(calc(var(--i) * 30), 80%, 60%);
    animation: confettiFall calc(1.4s + var(--i) * 0.12s) ease-in calc(var(--i) * 0.08s) infinite;
    opacity: 0;
}
@keyframes confettiFall {
    0%   { opacity: 1; transform: translateY(0)   rotate(0deg); }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(110vh) rotate(720deg); }
}
.celebration-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    animation: celebBounce .6s ease .2s both;
}
@keyframes celebBounce {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    60%  { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
.celebration-title {
    font-size: 28px;
    font-weight: 800;
    color: #322659;
    margin: 0 0 10px;
    animation: fadeIn .5s ease .3s both;
}
.celebration-sub {
    font-size: 16px;
    color: #777;
    line-height: 1.6;
    margin: 0 0 28px;
    animation: fadeIn .5s ease .4s both;
}
.celebration-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #9F7AEA, #38B2AC);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    animation: fadeIn .5s ease .5s both;
    box-shadow: 0 4px 20px rgba(159,122,234,.35);
}
.celebration-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(159,122,234,.45); }
.celebration-btn:active { transform: scale(.97); }

/* ===== Result compact actions bar ===== */
.result-container {
    min-height: unset !important;
}
.result-container_banner {
    height: 220px;
}
.result-title {
    margin-top: 16px !important;
    margin-bottom: 10px !important;
}
.result-text {
    margin-bottom: 16px;
}
.result-actions-bar {
    margin: 14px 0 8px;
    border-top: 1px solid #f0ebfa;
    padding-top: 14px;
}
.result-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.result-actions-divider {
    width: 1px;
    height: 28px;
    background: #e9e5f5;
    flex-shrink: 0;
}
.result-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all .15s;
}
.btn-comment {
    background: #faf5ff;
    color: #9F7AEA;
    padding: 9px 12px;
}
.btn-comment:hover { background: #f0ebff; }

/* Theme overrides for celebration + actions bar */
[class*="gt-theme-"] .celebration-screen {
    background: var(--th-card) !important;
    color: var(--th-text) !important;
}
[class*="gt-theme-"] .celebration-title { color: var(--th-text) !important; }
[class*="gt-theme-"] .celebration-sub   { color: var(--th-text) !important; opacity: .7; }
[class*="gt-theme-"] .celebration-btn {
    background: linear-gradient(135deg, var(--th-accent), var(--th-accent2)) !important;
}
[class*="gt-theme-"] .result-actions-bar  { border-top-color: rgba(255,255,255,.08) !important; }
[class*="gt-theme-"] .result-actions-divider { background: rgba(255,255,255,.12) !important; }
[class*="gt-theme-"] .btn-comment {
    background: rgba(255,255,255,.08) !important;
    color: var(--th-accent) !important;
}
[class*="gt-theme-"] .result-btn.btn-catalog,
[class*="gt-theme-"] .result-btn.btn-author {
    background: rgba(255,255,255,.08) !important;
    color: var(--th-text) !important;
}

@media (max-width: 700px) {
    /* Similar tests: horizontal scroll slider */
    .similar-grid {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        justify-content: flex-start !important;
    }
    .similar-grid::-webkit-scrollbar { height: 4px; }
    .similar-grid::-webkit-scrollbar-thumb { background: #ede9f8; border-radius: 4px; }
    .similar-card {
        width: 140px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: start;
    }
}

@media (max-width: 600px) {
    /* Question */
    .question-container { padding: 4px 14px 20px; }
    .question-title { font-size: 18px; margin-top: 8px; margin-bottom: 10px; }
    .question-image { height: 180px; margin: 12px 0; }
    .question-description { font-size: 14px; margin-bottom: 16px; }
    .option-btn { padding: 9px 14px; font-size: 14px; }
    .nav-buttons { margin-top: 16px; gap: 8px; }

    /* Result */
    .result-container { padding: 10px 16px 20px; }
    .result-container_banner { height: 180px; }
    .result-title { font-size: 20px; margin-top: 12px !important; margin-bottom: 8px !important; }
    .result-text  { font-size: 15px; }
}

@media (max-width: 480px) {
    .celebration-screen { padding: 36px 20px 32px; }
    .celebration-icon   { font-size: 52px; }
    .celebration-title  { font-size: 24px; }
    .result-container_banner { height: 150px; }
    .result-actions-row .result-btn span,
    .result-actions-row .share-btn span { display: none; }
    .result-btn  { padding: 9px 11px; }
    .share-btn   { padding: 9px 11px; }
}