/**
 * 登录注册样式
 * 
 * @package L0x7c
 * @since 1.0
 */

/* 登录图标按钮（社交媒体样式） */
.auth-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
}

.auth-login-icon:hover {
    color: #000;
    border-color: #333;
}

.auth-login-icon svg {
    width: 20px;
    height: 20px;
}

/* 用户信息卡片 */
.user-profile-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

/* 登录后的个人中心（替换原头像区域） */
.user-profile-card.logged-in-profile {
    margin-top: 0;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* 登录后，profile-section 使用垂直居中 */
.profile-section.logged-in-state {
    justify-content: center;
}

.user-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

/* 登录后个人中心的头像区域 */
.logged-in-profile .user-profile-header {
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    text-align: center;
}

.user-profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* 登录后个人中心的大头像 */
.logged-in-profile .user-profile-avatar {
    width: 120px;
    height: 120px;
    margin-right: 0;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.logged-in-profile .user-profile-avatar:hover {
    transform: none;
    border-color: #999;
}

.user-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 登录后个人中心的用户名 */
.logged-in-profile .user-profile-info h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
}

.user-profile-info p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 登录后个人中心的邮箱 */
.logged-in-profile .user-profile-info p {
    font-size: 12px;
    color: #999;
}

.user-profile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 登录后个人中心的菜单 */
.logged-in-profile .user-profile-menu {
    margin-top: 25px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    width: 100%;
    max-width: 280px;
}

.user-profile-menu li {
    margin: 8px 0;
    border-bottom: none;
}

.user-profile-menu li:last-child {
    border-bottom: none;
}

.user-profile-menu a {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
}

/* 登录后个人中心的菜单项 */
.logged-in-profile .user-profile-menu a {
    padding: 8px 0;
    border-radius: 0;
}

.user-profile-menu a:hover {
    color: #000;
}

/* 登录后个人中心的菜单项悬停效果 */
.logged-in-profile .user-profile-menu a:hover {
    background: transparent;
    color: #000;
}

.user-profile-menu svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.6;
}

.user-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin-top: 20px;
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 登录后个人中心的退出按钮 */
.logged-in-profile .user-logout-btn {
    margin-top: 20px;
    padding: 8px 16px;
    font-weight: 400;
    width: auto;
}

.user-logout-btn:hover {
    background: transparent;
    color: #666;
    border-color: #999;
}

.user-logout-btn svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* 模态框 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.auth-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 460px;
    padding: 50px 45px;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 40px 80px rgba(0, 0, 0, 0.1);
}

@keyframes slideUp {
    from {
        transform: translateY(60px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    font-size: 22px;
    line-height: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
    transform: rotate(90deg);
}

.auth-modal-title {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    letter-spacing: -0.5px;
}

/* 添加副标题样式 */
.auth-modal-subtitle {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* 表单样式 */
.auth-form-group {
    margin-bottom: 24px;
}

.auth-form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.2px;
}

.auth-form-label .required {
    color: #ef4444;
    margin-left: 2px;
    font-weight: 400;
}

.auth-form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: #fafafa;
}

.auth-form-input:hover {
    border-color: #d0d0d0;
    background: #ffffff;
}

.auth-form-input:focus {
    outline: none;
    border-color: #1a1a1a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.auth-form-input::placeholder {
    color: #aaa;
}

/* 验证码输入框 */
.verification-code-group {
    display: flex;
    gap: 10px;
}

.verification-code-group .auth-form-input {
    flex: 1;
}

.send-code-btn {
    padding: 14px 22px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.send-code-btn:hover:not(:disabled) {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.send-code-btn:active:not(:disabled) {
    transform: translateY(0);
}

.send-code-btn:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 记住我复选框 */
.auth-form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.auth-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #1a1a1a;
}

.auth-form-checkbox label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.auth-submit-btn:hover:not(:disabled) {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 切换链接 */
.auth-switch-link {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: #999;
}

.auth-switch-link a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1.5px solid transparent;
    padding-bottom: 2px;
}

.auth-switch-link a:hover {
    color: #000;
    border-bottom-color: #000;
}

/* 消息提示 */
.auth-message {
    padding: 14px 18px;
    margin-bottom: 24px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    animation: messageSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.auth-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #86efac;
}

.auth-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fecaca;
}

/* 暗色模式 */
body.dark-mode .auth-login-icon {
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .auth-login-icon:hover {
    color: #fff;
    border-color: #666;
}

body.dark-mode .auth-modal {
    background: rgba(0, 0, 0, 0.65);
}

body.dark-mode .auth-modal-content {
    background: #1a1a1a;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 40px 80px rgba(0, 0, 0, 0.3);
}

body.dark-mode .auth-modal-close {
    background: rgba(255, 255, 255, 0.05);
    color: #999;
}

body.dark-mode .auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-mode .auth-modal-title {
    color: #f5f5f5;
}

body.dark-mode .auth-modal-subtitle {
    color: #888;
}

body.dark-mode .auth-form-label {
    color: #d0d0d0;
}

body.dark-mode .auth-form-input {
    background: #252525;
    border-color: #333;
    color: #f5f5f5;
}

body.dark-mode .auth-form-input:hover {
    border-color: #444;
    background: #2a2a2a;
}

body.dark-mode .auth-form-input:focus {
    border-color: #666;
    background: #2a2a2a;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

body.dark-mode .auth-form-input::placeholder {
    color: #666;
}

body.dark-mode .send-code-btn {
    background: #f5f5f5;
    color: #1a1a1a;
}

body.dark-mode .send-code-btn:hover:not(:disabled) {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

body.dark-mode .send-code-btn:disabled {
    background: #2a2a2a;
    color: #666;
}

body.dark-mode .auth-submit-btn {
    background: #f5f5f5;
    color: #1a1a1a;
}

body.dark-mode .auth-submit-btn:hover:not(:disabled) {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

body.dark-mode .auth-submit-btn:disabled {
    background: #2a2a2a;
    color: #666;
}

body.dark-mode .auth-form-checkbox input[type="checkbox"] {
    accent-color: #f5f5f5;
}

body.dark-mode .auth-form-checkbox label {
    color: #aaa;
}

body.dark-mode .auth-switch-link {
    color: #888;
}

body.dark-mode .auth-switch-link a {
    color: #f5f5f5;
}

body.dark-mode .auth-switch-link a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

body.dark-mode .auth-message.success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

body.dark-mode .auth-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark-mode .user-profile-card {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .logged-in-profile {
    background: transparent;
}

body.dark-mode .logged-in-profile .user-profile-menu {
    background: transparent;
}

body.dark-mode .user-profile-menu li {
    border-bottom: none;
}

body.dark-mode .user-profile-menu a {
    color: #e0e0e0;
}

body.dark-mode .user-profile-menu a:hover {
    color: #fff;
}

body.dark-mode .logged-in-profile .user-profile-info h3 {
    color: #e0e0e0;
}

body.dark-mode .logged-in-profile .user-profile-info p {
    color: #888;
}

body.dark-mode .logged-in-profile .user-profile-avatar {
    border-color: #444;
}

body.dark-mode .logged-in-profile .user-profile-avatar:hover {
    border-color: #666;
}

body.dark-mode .user-logout-btn {
    background: transparent;
    border-color: #444;
    color: #888;
}

body.dark-mode .user-logout-btn:hover {
    background: transparent;
    border-color: #666;
    color: #aaa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-modal-content {
        padding: 30px 20px;
    }
    
    .auth-modal-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .verification-code-group {
        flex-direction: column;
    }
    
    .send-code-btn {
        width: 100%;
    }
}

