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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.captcha-container {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.captcha-header {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 20px;
    text-align: center;
}

.captcha-logo {
    font-size: 2em;
    margin-bottom: 10px;
}

.captcha-header h1 {
    font-size: 1.4em;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-info {
    color: #666;
    font-size: 0.9em;
}

.challenge-card {
    padding: 25px;
}

.challenge-instruction {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.image-tile {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #f9f9f9;
}

.image-tile:hover {
    border-color: #007bff;
    transform: translateY(-1px);
}

.image-tile.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.image-tile.correct-answer {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.image-tile.incorrect-answer {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: #ccc;
    background: #f0f0f0;
}

.selection-checkmark {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #007bff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
}

.correct-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2em;
    background: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.incorrect-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2em;
    background: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ccc;
    color: #666;
}

.submit-btn.active {
    background: #007bff;
    color: white;
}

.submit-btn.active:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.submit-btn:disabled {
    cursor: not-allowed;
}

.result-message {
    text-align: center;
    padding: 20px;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.result-message.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.result-icon {
    font-size: 1.3em;
}

.captcha-footer {
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    padding: 15px;
    text-align: center;
}

.security-badge {
    color: #666;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.results-card {
    padding: 40px 30px;
    text-align: center;
}

.score-display {
    margin-bottom: 30px;
}

.score-number {
    font-size: 3em;
    font-weight: 800;
    color: #007bff;
    display: block;
    margin-bottom: 10px;
}

.score-message {
    font-size: 1.3em;
    color: #333;
    font-weight: 600;
}

.verification-status {
    margin: 30px 0;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
}

.verified {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-icon {
    font-size: 1.5em;
}

.retry-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.loading {
    text-align: center;
    padding: 60px 30px;
    font-size: 1.2em;
    color: #666;
}

@media (max-width: 600px) {
    .captcha-container {
        margin: 10px;
        max-width: none;
    }
    
    .challenge-card {
        padding: 20px;
    }
    
    .image-grid {
        gap: 8px;
    }
    
    .challenge-instruction {
        font-size: 1em;
        padding: 12px;
    }
    
    .results-card {
        padding: 30px 20px;
    }
    
    .score-number {
        font-size: 2.5em;
    }
}

@media (max-width: 400px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .captcha-header h1 {
        font-size: 1.2em;
    }
    
    .challenge-instruction {
        font-size: 0.95em;
    }
}