* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* 人机验证样式 */
.verification-box {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.verification-box h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.verification-box p {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.captcha-area {
    margin: 30px 0;
}

.captcha-bg {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-slider {
    width: 100%;
    height: 40px;
    background: #e0e0e0;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-button {
    width: 40px;
    height: 40px;
    background: #12b7f5;
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.slider-button:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.captcha-text {
    position: absolute;
    width: 100%;
    text-align: center;
    color: #666;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.captcha-status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.captcha-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.captcha-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* 登录界面样式 */
.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #12b7f5;
    box-shadow: 0 0 0 2px rgba(18, 183, 245, 0.1);
}

.login-button {
    width: 100%;
    padding: 12px;
    background: #12b7f5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background: #0ea5e9;
}

.login-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.login-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

/* 快速登录样式 */
.quick-login {
    margin-top: 20px;
}

.qr-container {
    text-align: center;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.qr-placeholder {
    text-align: center;
}

.qr-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.qr-placeholder p {
    color: #666;
    font-size: 14px;
}

.qr-tips {
    margin-top: 15px;
}

.qr-tips p {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.qr-error {
    color: #dc3545 !important;
    font-weight: bold;
}

.qr-expired {
    color: #dc3545 !important;
    font-weight: bold;
}

.qr-actions {
    margin-top: 15px;
    text-align: center;
}

.refresh-btn, .test-btn {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.refresh-btn:hover, .test-btn:hover {
    background: #f5f5f5;
    border-color: #12b7f5;
    color: #12b7f5;
}

.test-btn {
    background: #12b7f5;
    color: white;
    border-color: #12b7f5;
}

.test-btn:hover {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

/* 切换按钮样式 */
.login-switch {
    display: flex;
    margin-top: 30px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.switch-btn {
    flex: 1;
    padding: 12px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.switch-btn.active {
    background: #12b7f5;
    color: white;
}

.switch-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #12b7f5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 14px;
}

/* 手机端QQ按钮样式 */
.mobile-qq-container {
    text-align: center;
    padding: 20px 0;
}

.qq-button-container {
    margin-bottom: 20px;
}

.qq-open-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 16px 24px;
    background: linear-gradient(135deg, #12b7f5 0%, #0ea5e9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(18, 183, 245, 0.3);
}

.qq-open-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(18, 183, 245, 0.4);
}

.qq-open-button:active {
    transform: translateY(0);
}

.qq-icon {
    font-size: 24px;
    margin-right: 12px;
}

.qq-tips {
    margin-top: 15px;
}

.qq-tips p {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.qq-error {
    color: #dc3545 !important;
    font-weight: bold;
}

/* 二维码加载页面样式 */
.qr-loading-container {
    text-align: center;
    padding: 40px 20px;
}

.qr-loading {
    max-width: 300px;
    margin: 0 auto;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #12b7f5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.qr-loading p {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
}

.loading-tip {
    color: #666 !important;
    font-size: 14px !important;
    font-weight: normal !important;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .verification-box,
    .login-box {
        padding: 30px 20px;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
    
    .qq-open-button {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .qq-icon {
        font-size: 20px;
        margin-right: 10px;
    }
}
