@font-face {
    font-family: 'IRANSans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url('../fonts/IRANSansWeb.woff2') format('woff2'),
        url('../fonts/IRANSansWeb.woff') format('woff'),
        url('../fonts/IRANSansWeb.ttf') format('truetype');
}

@font-face {
    font-family: 'IRANSans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src:
        url('../fonts/IRANSansWeb_Bold.woff2') format('woff2'),
        url('../fonts/IRANSansWeb_Bold.woff') format('woff'),
        url('../fonts/IRANSansWeb_Bold.ttf') format('truetype');
}

:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #1e4f8a;
    --primary-dark: #163a66;
    --danger: #b91c1c;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'IRANSans', Tahoma, sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
    color: var(--text);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
}

.container {
    width: 100%;
    max-width: 640px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

h1 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.9;
    text-align: center;
}

p.subtitle {
    margin: 0 0 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 700;
}

input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 1rem;
    margin-bottom: 16px;
    background: #fff;
}

input:focus {
    outline: 2px solid rgba(30, 79, 138, 0.25);
    border-color: var(--primary);
}

button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 13px 16px;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    cursor: pointer;
}

button:hover {
    background: var(--primary-dark);
}

.error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    line-height: 1.7;
}

.hint {
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.8;
    text-align: center;
}

.exam-instructions {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.9;
}

.instructions-title {
    margin: 0 0 14px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.8;
}

.dress-code-box {
    margin: 16px 0;
    padding: 12px 14px;
    border: 2px solid var(--text);
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    line-height: 1.8;
}

.instructions-list {
    margin: 0 0 16px;
    padding-right: 20px;
}

.instructions-list li + li {
    margin-top: 10px;
}

.instructions-list--bullets {
    list-style: disc;
}

.instructions-list--numbered {
    list-style: decimal;
}

.bubble-guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.bubble-guide__label {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.bubble-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.bubble {
    position: relative;
    width: 34px;
    height: 34px;
    border: 2px solid var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: #fff;
}

.bubble span {
    position: relative;
    z-index: 1;
}

.bubble--correct {
    background: var(--text);
    color: #fff;
}

.bubble--wrong-dot::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
}

.bubble--wrong-x::before,
.bubble--wrong-x::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background: var(--text);
}

.bubble--wrong-x::before {
    transform: rotate(45deg);
}

.bubble--wrong-x::after {
    transform: rotate(-45deg);
}

.bubble--wrong-check::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 2px;
    background: var(--text);
    transform: rotate(45deg) translate(-3px, 2px);
}

.bubble--wrong-check::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--text);
    transform: rotate(-45deg) translate(4px, 1px);
}

.bubble--wrong-line::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 3px;
    background: var(--text);
}

@media (max-width: 520px) {
    .bubble-guide {
        grid-template-columns: 1fr;
    }
}

.notice {
    margin: 18px 0;
    padding: 14px 16px;
    background: #fff8e6;
    border: 1px solid #f2d58a;
    border-right: 4px solid #f0ad4e;
    border-radius: 8px;
    color: #6b4f00;
    font-size: 15px;
    line-height: 1.8;
}

.notice strong {
    color: #8a5a00;
}