@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Marcellus&family=Merriweather:wght@400;600&family=Noto+Serif+Bengali:wght@400;600&display=swap');

:root {
    --amcq-primary: #0f766e;
    --amcq-text: #0f172a;
    --amcq-muted: #475569;
    --amcq-border: #dce3ec;
    --amcq-surface: #ffffff;
    --amcq-soft: #f7f9fb;
    --amcq-radius: 8px;
}

#amcq-quiz-container,
.amcq-shell,
.amcq-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--amcq-text);
    line-height: 1.5;
}

.amcq-shell {
    border: 1px solid var(--amcq-border);
    border-radius: var(--amcq-radius);
    background: var(--amcq-surface);
    padding: 18px;
}

.amcq-hero {
    border: 1px solid var(--amcq-border);
    border-radius: var(--amcq-radius);
    padding: 16px;
    background: var(--amcq-soft);
    margin-bottom: 14px;
}

.amcq-hero__eyebrow {
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--amcq-muted);
    text-transform: uppercase;
    display: none;
}

.amcq-hero__title {
    font-size: 20px;
    margin: 6px 0 4px;
    font-weight: 700;
}

.amcq-hero__subtitle {
    margin: 0;
    color: var(--amcq-muted);
    font-size: 14px;
}

.amcq-progress {
    background: #e5e7eb;
    height: 6px;
    border-radius: 999px;
    margin: 0 0 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.amcq-progress-bar {
    height: 100%;
    background: var(--amcq-primary);
    width: 0%;
    transition: width 0.35s ease;
}

.amcq-progress-meta {
    font-size: 12px;
    color: var(--amcq-muted);
}

.amcq-step-indicator {
    display: flex;
    gap: 8px;
    margin: 4px 0 12px;
    justify-content: space-between;
    width: 100%;
    position: relative;
    padding-bottom: 0;
    z-index: 2;
    margin-bottom: 0px;
}

.amcq-step-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d4af37;
    color: #1A1635;
    font-size: 12px;
    font-weight: 600;
    background: #f7f1e8;
    position: relative;
    z-index: 2;
    margin-bottom: -16px;
}

.amcq-step-dot.active {
    background: #d4af37;
    color: #1A1635;
}

.amcq-step-indicator::after,
.amcq-step-indicator::before {
    content: none;
}

.amcq-container {
    border: 1px solid var(--amcq-border);
    border-radius: var(--amcq-radius);
    padding: 16px;
    background: var(--amcq-surface);
}

.amcq-questions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.amcq-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    padding: 8px 12px;
    margin: 8px 0 10px;
    border: 1px solid var(--amcq-border);
    border-radius: 6px;
    background: #eef3fa;
}

.amcq-question-box {
    border: 1px solid var(--amcq-border);
    border-radius: var(--amcq-radius);
    padding: 14px;
    background: var(--amcq-soft);
}

.amcq-question-top {
    display: flex;
    justify-content: flex-end;
}

.amcq-chip {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--amcq-border);
    background: var(--amcq-surface);
    font-size: 12px;
    color: var(--amcq-muted);
}

.amcq-question-text {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
}

.amcq-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amcq-answer-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--amcq-surface);
    border: 1px solid var(--amcq-border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.amcq-answer-option:hover {
    border-color: #cbd5e1;
}

.amcq-answer-option.selected {
    border-color: var(--amcq-primary);
    background: #eff6f5;
}

.amcq-answer-option input[type="radio"],
.amcq-answer-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--amcq-primary);
    outline: none;
    box-shadow: none;
}

.amcq-answer-option span {
    font-size: 15px;
    font-weight: 500;
    color: var(--amcq-text);
}

.amcq-error {
    display: none;
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #fecdd3;
    margin-top: 10px;
    font-size: 14px;
}

.amcq-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.amcq-meta-note {
    color: var(--amcq-muted);
    font-size: 13px;
}

.amcq-btn {
    background: var(--amcq-primary);
    color: #fff;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    border: 1px solid var(--amcq-primary);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.amcq-btn:hover {
    background: #0c5f58;
    border-color: #0c5f58;
}

.amcq-result-box {
    background: var(--amcq-surface);
    border-radius: var(--amcq-radius);
    padding: 20px;
    border: 1px solid var(--amcq-border);
    text-align: center;
}

.amcq-score {
    font-size: 36px;
    font-weight: 700;
    color: var(--amcq-primary);
    margin: 6px 0;
}

.amcq-category {
    font-size: 18px;
    font-weight: 600;
}

.amcq-guidance {
    margin-top: 10px;
    color: var(--amcq-muted);
    font-size: 15px;
}

.amcq-register-card {
    background: var(--amcq-surface);
    padding: 18px;
    border-radius: var(--amcq-radius);
    border: 1px solid var(--amcq-border);
}

.amcq-register-card label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: var(--amcq-text);
}

.amcq-register-card input {
    width: 100%;
    padding: 9px 10px;
    border-radius: 6px;
    border: 1px solid var(--amcq-border);
    background: var(--amcq-soft);
    font-size: 14px;
}

.amcq-register-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 14px;
    margin-top: 6px;
}

.amcq-stop-state .amcq-result-box {
    background: #fff8f8;
    border-color: #f3dada;
}

.amcq-result-shell {
    background: #1A1635;
    border: 0;
    border-radius: 18px;
    padding: 28px;
    color: #f7f3ea;
    font-family: 'Merriweather', 'Noto Serif Bengali', serif;
}

.amcq-result-header {
    margin-bottom: 18px;
}

.amcq-result-header .amcq-hero__eyebrow {
    display: block;
    color: #56E5F8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 6px;
}

.amcq-result-header .amcq-hero__title {
    font-family: 'Marcellus', 'Noto Serif Bengali', serif;
    font-size: 30px;
    margin: 0 0 6px;
    color: #f7f3ea;
}

.amcq-result-header .amcq-hero__subtitle {
    color: rgba(247, 243, 234, 0.75);
    font-size: 14px;
}

.amcq-result-card {
    background: #f7f1e8;
    border-radius: 20px;
    padding: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 22px;
    color: #1A1635;
    box-shadow: 0 12px 30px rgba(26, 22, 53, 0.2);
}

.amcq-result-card__text h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #1A1635;
    font-family: 'Marcellus', 'Noto Serif Bengali', serif;
}

.amcq-result-stage {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1A1635;
    display: flex;
    align-items: center;
    gap: 10px;
}

.amcq-result-emoji {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: inline-block;
}

.amcq-result-card .amcq-guidance {
    color: #3b3b4d;
    font-size: 15px;
    margin-top: 0;
}

.amcq-stage-breakdown {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(26, 22, 53, 0.1);
}

.amcq-stage-breakdown h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #1A1635;
}

.amcq-stage-breakdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.amcq-stage-breakdown li {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #1A1635;
}

.amcq-stage-score {
    font-weight: 600;
    color: #0f766e;
}

.amcq-result-card__chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.amcq-score-ring {
    width: 240px;
    height: 240px;
    position: relative;
}

.amcq-score-ring__svg {
    width: 100%;
    height: 100%;
    display: block;
}

.amcq-ring-segment {
    fill: none;
    stroke-width: 18;
    stroke-linecap: butt;
}

.amcq-ring-segment.low { stroke: #d7655c; }
.amcq-ring-segment.medium { stroke: #f0a23a; }
.amcq-ring-segment.high { stroke: #6fb16f; }

.amcq-score-ring::after {
    content: '';
    position: absolute;
    inset: 28px;
    background: #f7f1e8;
    border-radius: 50%;
}

.amcq-score-ring__inner {
    position: absolute;
    inset: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
}

.amcq-score-ring__label {
    font-size: 12px;
    color: #6a5f55;
}

.amcq-score-ring__value {
    font-size: 28px;
    font-weight: 700;
    color: #1A1635;
    margin: 4px 0;
}

.amcq-score-ring__status {
    font-size: 12px;
    color: #6a5f55;
}

.amcq-score-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 12px;
    color: #6a5f55;
    justify-content: center;
    text-align: center;
}

.amcq-score-legend span::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.amcq-score-legend .low::before { background: #d7655c; }
.amcq-score-legend .medium::before { background: #f0a23a; }
.amcq-score-legend .high::before { background: #6fb16f; }

.amcq-score-legend strong {
    margin-left: 6px;
    color: #1A1635;
    font-weight: 700;
}

.amcq-all-user-msg {
    margin-top: 18px;
    padding: 16px 18px;
    background: rgba(86, 229, 248, 0.08);
    border: 1px solid rgba(86, 229, 248, 0.25);
    border-radius: 14px;
    color: #d7f7fb;
    font-size: 14px;
}

.amcq-result-cta {
    margin-top: 16px;
}

.amcq-result-loading {
    padding: 60px 20px;
    text-align: center;
    background: #1A1635;
    border-radius: 16px;
    color: #f7f3ea;
}

.amcq-loading-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 6px solid rgba(86, 229, 248, 0.2);
    border-top-color: #56E5F8;
    margin: 0 auto 16px;
    animation: amcq-spin 1s linear infinite;
}

.amcq-loading-text {
    font-size: 14px;
    color: rgba(247, 243, 234, 0.8);
}

@keyframes amcq-spin {
    to { transform: rotate(360deg); }
}

#amcq-quiz-container.amcq-loading {
    opacity: 0.65;
    pointer-events: none;
}

@media (max-width: 640px) {
    #amcq-quiz-container {
        padding: 0;
        margin: 0;
    }

    .amcq-shell,
    .amcq-container {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .amcq-hero {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .amcq-question-box {
        border-radius: 6px;
    }

    .amcq-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .amcq-btn {
        width: 100%;
        text-align: center;
    }

    .amcq-result-shell {
        border-radius: 0;
        padding: 20px;
    }

    .amcq-result-card {
        grid-template-columns: 1fr;
    }

    .amcq-score-ring {
        width: 200px;
        height: 200px;
    }
}
