:root {
    --recaptcha-blue: #4a90e2;
    --recaptcha-header: #4a90e2;
    --bg-color: #f9f9f9;
    --text-color: #333;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    perspective: 1000px;
}

/* Initial Box */
.captcha-box {
    background: #fff;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
    width: 300px;
    height: 74px;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: 0 0 4px 1px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.captcha-box:hover {
    box-shadow: 0 0 6px 1px rgba(0,0,0,0.12);
}

.captcha-left {
    display: flex;
    align-items: center;
}

.checkbox-container {
    width: 28px;
    height: 28px;
    border: 2px solid #c1c1c1;
    border-radius: 2px;
    margin-right: 12px;
    cursor: pointer;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-color 0.2s;
}

.checkbox-container:hover {
    border-color: #b2b2b2;
}

.checkbox {
    width: 100%;
    height: 100%;
}

.captcha-text {
    font-size: 14px;
    color: #000;
}

.captcha-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
}

.captcha-right img {
    height: 32px;
}

.privacy-text {
    font-size: 8px;
    color: #555;
    margin-top: 4px;
}

/* Challenge Modal */
.challenge-modal {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    width: 400px;
    padding: 7px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.challenge-header {
    background: var(--recaptcha-header);
    color: #fff;
    padding: 20px;
    margin-bottom: 7px;
}

.header-main {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.header-sub {
    font-size: 14px;
    font-weight: 300;
}

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

.grid-item {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s;
}

.grid-item:active {
    transform: scale(0.95);
}

.grid-item.selected {
    padding: 10px;
}

.grid-item.selected img {
    transform: scale(0.85);
}

.grid-item .checkmark {
    display: none;
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--recaptcha-blue);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.grid-item.selected .checkmark {
    display: flex;
}

/* Selected overlay */
.grid-item.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.4);
    pointer-events: none;
}

.challenge-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    border-top: 1px solid #eee;
}

.footer-left {
    display: flex;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
}

.icon-btn:hover {
    opacity: 1;
}

.verify-btn {
    background: var(--recaptcha-blue);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.verify-btn:hover {
    filter: brightness(1.1);
}

.error-message {
    color: #d93025;
    font-size: 13px;
    margin-top: 10px;
    padding: 0 10px;
}

.hidden {
    display: none;
}

/* Success Screen */
.success-screen {
    background: #fff;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.retry-btn {
    margin-top: 20px;
    background: var(--recaptcha-blue);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
