@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --phone-bezel: #1e293b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
}

.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    scrollbar-width: thin;
}

.app-container::-webkit-scrollbar {
    width: 5px;
}
.app-container::-webkit-scrollbar-track {
    background: transparent;
}
.app-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

@media (min-width: 481px) {
    body {
        background-color: #f3f4f6;
    }
    .app-container {
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
    }
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.site-title span {
    color: var(--primary-color);
}

.description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1.5rem;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.btn:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    margin-top: 1rem;
}

.btn-row .btn {
    width: 100%;
    border-radius: 0;
}

.btn-row .btn:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.btn-row .btn:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.loader-card {
    padding: 3rem 1.5rem;
}

.sponsor-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.loader-bar {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
    margin: 2rem 0;
}

.loader-progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    border-radius: 9999px;
    animation: loading-fill 3s linear forwards;
}

@keyframes loading-fill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.quiz-progress {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--primary-light);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.quiz-score-badge {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: left;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    width: 100%;
}

.visually-hidden {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    transition: all 0.2s ease-in-out;
    min-height: 52px;
}

.option-label:hover {
    border-color: #cbd5e1;
    background-color: var(--bg-light);
}

.option-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    width: 28px;
    height: 28px;
    background-color: var(--bg-light);
    border-radius: 50%;
    margin-right: 12px;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease-in-out;
}

input[type="radio"]:checked + .option-label {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

input[type="radio"]:checked + .option-label .option-marker {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.error-msg {
    color: #ef4444;
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.score-container {
    margin: 1.5rem 0;
}

.score-circle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    background-color: var(--primary-light);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.score-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.score-total {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.score-feedback {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.review-header {
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.review-item {
    text-align: left;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.review-question {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.review-ans-row {
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-correct {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-incorrect {
    background-color: #fee2e2;
    color: #991b1b;
}

.review-text {
    font-weight: 500;
}

.review-text.correct {
    color: #059669;
}

.review-text.incorrect {
    color: #dc2626;
}

footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}
