/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close:hover {
    color: #000;
    background-color: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

.captcha-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

#captchaCanvas {
    border: 1px solid #ddd;
    border-radius: 5px;
}

.refresh-btn {
    background-color: #6c757d;
    font-size: 14px;
    padding: 5px 10px;
    width: 80px;
}

#captchaInput {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 10px;
}

#captchaInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.modal-footer {
    padding: 15px 20px;
    text-align: right;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer button {
    padding: 8px 16px;
    font-size: 14px;
}

#confirmCaptcha {
    background-color: #28a745;
}

#confirmCaptcha:hover {
    background-color: #218838;
}

#cancelCaptcha {
    background-color: #dc3545;
}

#cancelCaptcha:hover {
    background-color: #c82333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .close {
        font-size: 24px;
        width: 25px;
        height: 25px;
    }
    
    #captchaInput {
        padding: 10px;
        font-size: 14px;
    }
    
    .modal-footer {
        gap: 8px;
    }
    
    .modal-footer button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 15% auto;
        width: 98%;
    }
    
    .captcha-container {
        margin-bottom: 15px;
    }
    
    #captchaCanvas {
        width: 200px;
        height: 60px;
    }
    
    #captchaInput {
        letter-spacing: 8px;
    }
}