/* 自定义登录和注册模块样式 - v2.7.4 */

/* 已登录用户信息样式 - 简化版 */
.clr-user-info {
    padding: 15px 20px;
    margin: 20px 0;
    display: block;
}

.clr-user-actions {
    display: flex;
    gap: 10px;
}

.clr-logout-btn,
.clr-dashboard-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 2px solid transparent;
    display: inline-block;
}

.clr-logout-btn {
    background: #f44336;
    color: white;
    border-color: #d32f2f;
}

.clr-logout-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.2);
    color: white;
}

.clr-dashboard-btn {
    background: #2196F3;
    color: white;
    border-color: #1976D2;
}

.clr-dashboard-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.2);
    color: white;
}

/* 主按钮容器样式 - 始终横向排列 */
.clr-main-buttons {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    width: 100%;
}

/* 基础按钮样式 */
.clr-register-btn,
.clr-login-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 100px;
    white-space: nowrap;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: inline-block;
}

/* 注册按钮特定样式 */
.clr-register-btn {
    background-color: #4CAF50;
    color: white;
    border: 2px solid #4CAF50;
}

/* 登录按钮特定样式 */
.clr-login-btn {
    background-color: white;
    color: #2196F3;
    border: 2px solid #2196F3;
}

/* 悬停效果 */
.clr-register-btn:hover {
    background-color: #3e8e41;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: white;
}

.clr-login-btn:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: #2196F3;
}

/* 点击效果 */
.clr-register-btn:active,
.clr-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 模态框样式 */
.clr-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.clr-modal.clr-modal-open {
    display: block;
}

.clr-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    position: relative;
    animation: clr-fadeIn 0.3s ease-in-out;
    box-sizing: border-box;
}

@keyframes clr-fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.clr-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clr-close:hover,
.clr-close:focus {
    color: black;
    background-color: #f0f0f0;
    text-decoration: none;
}

.clr-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
}

.clr-form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.clr-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.clr-form-group input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.clr-form-group input:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.clr-button-container {
    margin-top: 10px;
}

.clr-submit-btn {
    padding: 14px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    background-color: #2196F3;
    color: white;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    display: block;
}

.clr-submit-btn:hover {
    background-color: #0d8bf2;
}

.clr-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.clr-error-message {
    color: #f44336;
    font-size: 13px;
    margin-top: 5px;
    width: 100%;
    display: none;
}

.clr-error-message.show {
    display: block;
}

.clr-success-message {
    color: #4CAF50;
    font-size: 14px;
    margin-top: 15px;
    width: 100%;
    text-align: center;
    display: none;
    font-weight: 500;
}

/* 第三方链接样式 */
.clr-third-party-links {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.clr-third-party-links h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.clr-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    justify-content: center;
}

.clr-third-party-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 14px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid transparent;
    min-height: 50px;
    flex: 1;
}

.clr-wechat-link {
    background-color: #07c160;
    color: white;
    border-color: #06a952;
}

.clr-wechat-link:hover {
    background-color: #06a952;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(7, 193, 96, 0.2);
    color: white;
}

.clr-qq-link {
    background-color: #12b7f5;
    color: white;
    border-color: #0d8bd9;
}

.clr-qq-link:hover {
    background-color: #0d8bd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(18, 183, 245, 0.2);
    color: white;
}

.clr-charging-link {
    background-color: #9c27b0;
    color: white;
    border-color: #7b1fa2;
}

.clr-charging-link:hover {
    background-color: #7b1fa2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(156, 39, 176, 0.2);
    color: white;
}

/* 加载动画 */
.clr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: clr-spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes clr-spin {
    to { transform: rotate(360deg); }
}

/* 表单状态样式 */
.clr-form-group input.error {
    border-color: #f44336;
}

.clr-form-group input.success {
    border-color: #4CAF50;
}

/* 隐藏元素样式 */
.clr-hidden {
    display: none;
}

/* 二维码预览样式 */
.clr-qr-preview {
    margin-top: 10px;
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
}

/* 上传按钮样式 */
.clr-upload-btn {
    margin-left: 10px;
}

/* 响应式设计 */
@media (max-width: 360px) {
    .clr-main-buttons {
        gap: 8px;
    }
    
    .clr-register-btn,
    .clr-login-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .clr-modal-content {
        padding: 20px;
        margin: 10% auto;
    }
    
    .clr-modal-content h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .clr-links-grid {
        grid-template-columns: 1fr;
    }
    
    .clr-third-party-links a {
        font-size: 13px;
        padding: 12px 15px;
    }
    
    .clr-user-actions {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .clr-modal-content {
        width: 95%;
        margin: 15% auto;
    }
    
    .clr-links-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .clr-third-party-links a {
        font-size: 13px;
        padding: 12px 10px;
    }
    
    .clr-user-actions {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .clr-links-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .clr-third-party-links a {
        font-size: 14px;
        padding: 12px 15px;
    }
}

/* 强制图标显示 */
.clr-charging-action-btn,
.clr-charging-random-btn,
.clr-charging-method-btn {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
}

/* 修复ID重复问题 */
#clr_register_nonce,
#clr_login_nonce {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* 错误状态增强 */
.clr-form-group input.error:focus {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.clr-form-group input.success:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 模态框滚动条修复 */
body.clr-modal-open {
    overflow: hidden;
    padding-right: 15px;
}

/* 旋转动画 */
@keyframes clr-spinning {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.clr-spinning {
    animation: clr-spinning 0.5s ease-in-out;
}

/* 页面特定样式 */
.clr-page-container {
    margin: 50px 0 0 0;
    padding: 0;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.clr-page-card {
    background: #fff;
    border-radius: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.clr-page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: 50px;
    display: flex;
    align-items: center;
}

.clr-page-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.clr-page-nav::-webkit-scrollbar {
    display: none;
}

.clr-nav-item {
    color: #666;
    text-decoration: none;
    padding: 0 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid transparent;
}

.clr-nav-item:hover {
    color: #07c160;
}

.clr-nav-item.active {
    color: #07c160;
    font-weight: 600;
    border-bottom-color: #07c160;
}

.clr-page-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
    text-align: center;
    padding-top: 20px;
}