:root {
    --primary: #4361ee;
    --success: #0067b8;
    --error: #ef476f;
    --warning: #ffd166;
    --dark: #111;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: revert;
}


.row {
	margin-top: 10px;
}


.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
}

.card.success {
    border-top: 4px solid var(--success);
}


.instructions {
    color: var(--gray);
    margin: 1.25rem 0 1.75rem;
    font-size: 1.05rem;
}

.challenge {
    background: #f8fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.question {
    display: inline-block;
    min-width: 120px;
}

.answer-input {
    width: 100px;
    padding: 8px 12px;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1.3rem;
    text-align: center;
    margin-top: 8px;
    transition: var(--transition);
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    margin: 10px 0;
}

.btn-submit:hover:not(:disabled) {
    background: #3a56e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.85;
    cursor: wait;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: pulse 0.4s;
	margin-top: 1.5rem;
}

@keyframes pulse {
    0% { transform: scale(0.98); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.alert.error {
    background: rgba(239, 71, 111, 0.1);
    border: 1px solid var(--error);
    color: #c02d4a;
}

.attempts {
    margin-top: 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.progress-maths {
    background: #e9ecef;
    border-radius: 10px;
    height: 6px;
    margin-top: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.footer {
    margin-top: 2rem;
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

.hint {
    color: var(--primary);
    font-weight: 500;
}

/* Success page styles */
.success-message {
    color: var(--success);
    margin: 1.5rem 0;
    font-weight: 600;
}

.user-info {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
    border-left: 3px solid var(--success);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 1.5rem 0;
}

.btn-logout {
    background: var(--success);
    color: white !important;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #d63a5a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #f0f4ff;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .card {
        padding: 1.8rem;
    }
    
    .challenge {
        font-size: 1.35rem;
        padding: 1rem;
    }
    
    .answer-input {
        width: 90px;
        font-size: 1.2rem;
    }
}

.cf-turnstile-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.cf-turnstile {
    transform: scale(0.92);
    transform-origin: 0 0;
}

@media (max-width: 480px) {
    .cf-turnstile {
        transform: scale(0.85);
    }
}

.hcaptcha-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.h-captcha {
    transform: scale(0.95);
    transform-origin: 0 0;
}

@media (max-width: 480px) {
    .h-captcha {
        transform: scale(0.85);
    }
}

.recaptcha-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.g-recaptcha {
    transform: scale(0.95);
    transform-origin: 0 0;
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.85);
    }
}