/* 基础样式 */
.ccl-overlay {
    position: relative;
    padding: 2rem;
    margin: 2rem auto;
    background: rgba(255,255,255,0.98);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    display: flex;
    gap: 2rem;
    max-width: 800px;
    border: 1px solid rgba(0,0,0,0.1);
    z-index: 9999;
}

.ccl-qr-container {
    flex: 0 0 200px;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ccl-qr-container img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.ccl-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#ccl-captcha-input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    text-align: center;
    letter-spacing: 0.2em;
}

#ccl-captcha-input:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

#ccl-submit {
    background: linear-gradient(135deg, #007cba, #006ba1);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

#ccl-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,186,0.3);
}

#ccl-submit:active {
    transform: translateY(0);
}

#ccl-message {
    min-height: 1.5em;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

#ccl-message .message-content {
    padding: 4px 0;
}

#ccl-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

#ccl-message.error {
    background: #ffebee;
    color: #c62828;
}

#ccl-message.loading {
    color: #666;
}

#ccl-message.loading .message-content {
    animation: ccl-pulse 1.5s infinite;
}

@keyframes ccl-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ccl-overlay {
        flex-direction: column;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .ccl-qr-container {
        width: 160px;
        margin: 0 auto;
    }

    #ccl-captcha-input {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* 按钮样式 */
.ccl-cta-container {
    margin: 2.5rem 0;
    text-align: center;
    position: relative;
}

.ccl-unlock-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ccl-unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.ccl-icon {
    width: 1.5em;
    height: 1.5em;
}

/* 模态框样式 */
.ccl-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(3px);
}

.ccl-modal-dialog {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 680px;
    max-width: 95%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.ccl-modal-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 320px;
}

.ccl-qr-column {
    background: #f8fafc;
    padding: 2rem;
    display: flex;
    align-items: center;
}

.ccl-qr-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ccl-form-column {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ccl-guide {
    color: #1e293b;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.ccl-input-row {
    display: flex;
    gap: 12px;
}

#ccl-captcha {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#ccl-captcha:focus {
    border-color: #2563eb;
    outline: none;
}

#ccl-verify-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

#ccl-verify-btn:hover {
    background: #1d4ed8;
}

#ccl-result-message {
    margin-top: 1.25rem;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

#ccl-result-message.success {
    background: #f0fdf4;
    color: #15803d;
}

#ccl-result-message.error {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 640px) {
    .ccl-modal-grid {
        grid-template-columns: 1fr;
    }
    
    .ccl-qr-column {
        padding: 1.5rem;
        justify-content: center;
    }
    
    .ccl-qr-img {
        max-width: 160px;
    }
    
    .ccl-form-column {
        padding: 1.5rem;
    }
    
    .ccl-input-row {
        flex-direction: column;
    }
    
    #ccl-verify-btn {
        width: 100%;
    }
}