/* 登录页面样式 */

/* CSS变量定义 - 便于主题统一管理 */
:root {
    --primary-color: #ff4d4f;
    --primary-hover: #ff7875;
    --secondary-color: #1890ff;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --border-color: #e8e8e8;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f7fa;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}
.logo img {
    max-width: 200px;
    max-height: 60px;
    object-fit: contain;
    transition: opacity 0.3s ease;
    vertical-align: middle;
}
/* 基础动画类 */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.7s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 可访问性优化 */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* 头部导航样式 */
.site-header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.top-nav ul {
    display: flex;
    list-style: none;
}

.top-nav li {
    margin-left: 20px;
}

.top-nav a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.top-nav a:hover {
    color: #333;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 160px);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 登录页面特定样式 */
.login-section {
    width: 100%;
    max-width: 400px;
}

.login-form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.register-link {
    text-align: center;
    margin-bottom: 25px;
    font-size: 13px;
    color: #666;
}

.register-link a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.register-link a:hover {
    color: #0056b3;
}

/* 登录表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group input::placeholder {
    color: #999;
}

/* 密码输入容器样式 */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #333;
}

/* 登录选项样式 */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
}

.remember-me input {
    width: auto;
    margin-right: 8px;
}

.forgot-password {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #0056b3;
}

/* 登录按钮样式 */
.login-btn {
    width: 100%;
    padding: 12px 0;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #1a252f;
}

.login-btn:active {
    transform: translateY(1px);
}

/* 错误信息样式 */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* 底部导航样式 */
.site-footer {
    background-color: #fff;
    padding: 15px 0;
    border-top: 1px solid #eaeaea;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
}

.bottom-nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.nav-item:hover {
    color: #007bff;
}

.nav-item.active {
    color: #007bff;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    position: relative;
    display: block;
    object-fit: contain;
}

.nav-item span {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 60px 20px;
    }
    
    .login-form-container {
        padding: 20px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .form-group input {
        padding: 10px 12px;
    }
    
    .login-btn {
        padding: 10px 0;
    }
     .logo img {
        max-width: 150px;
        max-height: 45px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .top-nav li {
        margin-left: 15px;
    }
    
    .login-section {
        max-width: 100%;
    }
     .logo img {
        max-width: 150px;
        max-height: 45px;
    }
}

/* 主要内容区域添加底部内边距，防止被底部导航和版权信息遮挡 */
.home-content,
.main-content,
.profile-content,
.tutorial-content,
.payment-success-container,
.product-detail-container {
    padding-bottom: 160px; /* 底部导航高度 + 版权信息高度 */
}

/* 针对showQrCode页面的特殊处理 */
.showQrCode-body {
    padding-bottom: 160px;
}

/* 版权信息样式 */
.footer-copyright {
    margin-bottom: 100px;
    background-color: #fff;
    padding: 20px 15px;
    border-top: 1px solid #eaeaea;
    text-align: center;
    font-size: 12px;
    color: #666;
    line-height: 1.8;
    margin-top: 0;
    position: relative;
    z-index: 10; /* 确保在底部导航上方显示 */
}

/* 针对有底部导航的页面，调整版权信息位置 */
.site-footer + .footer-copyright {
    margin-top: 60px; /* 为底部导航留出空间 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-copyright {
        padding: 15px 10px;
        font-size: 11px;
    }
}