:root {
    --primary-color: #0066cc;
    --secondary-color: #f5f5f5;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

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

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.navbar-hidden {
    transform: translateY(-100%);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 导航链接样式 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #1976d2;
}

/* 导航按钮组样式 */
.nav-buttons {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* 通用按钮样式 */
.nav-btn {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: transparent;
    color: #333;
}

.nav-btn i {
    font-size: 16px;
}

.nav-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 资源按钮样式 */
.resource-btn {
    color: #1976d2;
    border-color: #1976d2;
}

.resource-btn:hover {
    background-color: #f0f7ff;
    border-color: #1976d2;
    color: #1565c0;
}

/* 退出按钮样式 */
.logout-btn {
    color: #666;
}

.logout-btn:hover {
    background-color: #f5f5f5;
    color: #f44336;
    border-color: #f44336;
}

/* 后台管理按钮样式 */
.dashboard-btn {
    color: #1976d2;
    border-color: #1976d2;
}

.dashboard-btn:hover {
    background-color: #f0f7ff;
    border-color: #1976d2;
    color: #1565c0;
}

/* 搜索图标样式 */
.search-icon {
    font-size: 18px;
}

/* 主要横幅样式 */
.hero {
    background: white;
    padding: 1rem 0;
    position: relative;
    overflow: hidden;
}

.hero .container {
    position: relative;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.hero-image {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: auto;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-image img {
    max-width: 90%;
    height: auto;
    max-height: 90%;
    object-fit: contain;
}

.hero-background img {
    max-width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 特点介绍样式 */
.features {
    padding: 0 0 2rem 0;
    background: white;
}

.features .container {
    padding: 0 20px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 1.5rem;
    gap: 1.5rem;
}

.feature-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.feature-item p {
    margin: 0;
    flex: 1;
}

/* 稳定性部分样式 */
.stability {
    padding: 2rem 0 1rem 0;
    background: white;
}

.stability-header {
    text-align: center;
    margin-bottom: 2rem;
}

.stability-header img {
    max-width: 300px;
    height: auto;
}

.stability-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #ebeef5;
}

.stability-image {
    text-align: center;
}

.stability-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.stability-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stability-features img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stability-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .stability-header img {
        max-width: 250px;
    }
    
    .stability-image img {
        max-height: 300px;
    }
    
    .stability-features img {
        max-height: 100px;
    }
}

/* 联系我们样式 */
.contact {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.contact-info a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 0 60px;
    }
    
    .hero .container,
    .features .container {
        padding: 0 60px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .hero .container,
    .features .container {
        padding: 0 20px;
    }
    
    .hero .container {
        min-height: 200px;
    }
}

/* 技术亮点样式 */
.tech-highlights {
    padding: 1rem 0 2rem 0;
    background: white;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tech-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tech-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.tech-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* 信息安全部分样式 */
.security {
    padding: 1rem 0 1rem 0;
    border-top: 1px solid #ebeef5;
    border-bottom: 1px solid #ebeef5;
}

.security h2 {
    text-align: left;
    padding-left: 1rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

.security-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 0 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #ebeef5;
}

.security-image img {
    width: 100%;
    border-radius: 8px;
}

.security-text {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.security-text p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    padding-left: 1.2rem;
    color: #444;
}

.security-text p:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1;
}

.security-text p:last-child {
    margin-bottom: 0;
}

/* 空间利用部分样式 */
.space-usage {
    padding: 1rem 0;
    background: white;
}

.space-usage h2 {
    text-align: left;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

.space-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0 1rem;
    border: 1px solid #ebeef5;
    border-radius: 8px;
}

.space-content img {
    width: 100%;
    border-radius: 8px;
}

.space-text {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.space-text p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #444;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.space-text p:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1;
}

.space-text p:last-child {
    margin-bottom: 0;
}

/* 数据管理部分样式 */
.data-management {
    padding: 1rem 0;
    background: white;
    border-top: 1px solid #ebeef5;
}

.data-management h2 {
    text-align: left;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.8rem;
}

.data-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0 1rem;
    border: 1px solid #ebeef5;
    border-radius: 8px;
}

.data-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.data-text {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.data-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #444;
    position: relative;
    padding-left: 1.5rem;
}

.data-text p:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1;
}

.data-text p:last-child {
    margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .security-content,
    .space-content,
    .data-content {
        grid-template-columns: 1fr;
    }
    
    .security-text,
    .space-text,
    .data-text {
        padding: 1.5rem;
    }
    
    .security-text p,
    .space-text p,
    .data-text p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        padding: 1rem;
        gap: 1rem;
    }
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* 添加登录按钮样式 */
.login-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    margin-left: 2rem;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #0052a3;
}

/* 修复模态框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    width: 450px;
    max-width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

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

.close-btn {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.login-form {
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.code-group {
    display: flex;
    gap: 0.5rem;
}

.code-group input {
    flex: 1;
}

.send-code-btn {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.send-code-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: #0052a3;
}

.status-bar {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}

.status-bar.success {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-bar.error {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* 修改导航栏在手机端的样式 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .nav-links {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
        padding: 0.5rem;
        margin: 0;
    }
    
    .login-btn {
        margin: 0;
    }
}

/* 调整登录模态框在手机端的样式 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input {
        font-size: 16px; /* 防止iOS自动放大输入框 */
        padding: 0.7rem;
    }
    
    .code-group {
        gap: 0.3rem;
    }
    
    .send-code-btn {
        padding: 0.7rem 0.5rem;
        font-size: 0.9rem;
        min-width: 90px;
    }
    
    .submit-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .status-bar {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
}

/* 添加触摸设备的交互优化 */
@media (hover: none) {
    .login-btn:active,
    .submit-btn:active,
    .send-code-btn:active {
        opacity: 0.8;
    }
}

/* 优化移动端输入体验 */
input[type="tel"],
input[type="text"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 4px;
}

/* 防止页面在手机端缩放 */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding-top: 60px; /* 为固定导航栏留出空间 */
    }

    .navbar-brand img {
        height: 30px;
    }

    .navbar-nav {
        display: none;
    }
}

/* 用户头像和下拉菜单样式 */
.user-profile-container {
    position: relative;
    margin-left: 10px;
}

.user-avatar-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-avatar:hover {
    border-color: #1976d2;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    padding: 12px 0;
    display: none;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.user-dropdown.show {
    display: block;
}

.user-info {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f0f0f0;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-details p {
    margin: 0;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-icon {
    margin-right: 10px;
    font-size: 16px;
}

.logout-item {
    color: #f44336;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.logout-item:hover {
    background-color: #ffebee;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .user-dropdown {
        width: 220px;
        right: -10px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

/* 添加下拉菜单箭头指示器 */
.user-dropdown:before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0,0,0,0.04);
}

/* 登录选项卡样式修复 */
.login-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    outline: none;
}

.tab-btn.active {
    color: #1976d2;
    font-weight: 500;
}

.tab-btn.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1976d2;
}

.tab-content {
    display: none;
}

#phoneLoginTab.active, #wechatLoginTab.active {
    display: block;
}

/* 微信登录样式 */
.wechat-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.qrcode-container {
    width: 100%;
    height: auto;
    min-height: 500px;
    margin-bottom: 15px;
    padding: 0;
    border: none;
    overflow: hidden;
}

.qrcode-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #1976d2;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

.wechat-login-tips {
    text-align: center;
}

.wechat-login-tips p {
    margin: 5px 0;
    color: #333;
}

.wechat-login-subtitle {
    font-size: 14px;
    color: #666 !important;
}

/* 二维码图片样式 */
.qrcode-img {
    max-width: 100%;
    max-height: 100%;
}

/* 二维码过期样式 */
.qrcode-expired {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.qrcode-expired p {
    margin: 10px 0;
    color: #666;
}

.refresh-btn {
    padding: 8px 16px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

/* qrcode.js 生成的二维码样式 */
#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode img {
    display: block;
    margin: 0 auto;
}

/* 二维码错误样式 */
.qrcode-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.qrcode-error p {
    margin-bottom: 15px;
    color: #f44336;
}

/* 美化关闭按钮样式 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 500;
}

.close {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #666;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    padding: 0;
    line-height: 1;
}

.close:hover {
    background-color: #e0e0e0;
    color: #333;
    transform: rotate(90deg);
}

.close:active {
    background-color: #d5d5d5;
    transform: rotate(90deg) scale(0.95);
}

/* 微信登录框架样式 */
.wechat-login-frame {
    width: 100%;
    height: 450px;
    border: none;
    overflow: hidden;
    border-radius: 8px;
}

/* 打开链接按钮样式 */
.open-link-container {
    margin-top: 15px;
    text-align: center;
}

.open-link-container p {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.open-link-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #07C160;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.open-link-btn:hover {
    background-color: #06AD56;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Toast消息样式 */
.toast-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
    display: block;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-message.success {
    background-color: #4caf50;
}

.toast-message.error {
    background-color: #f44336;
}

.toast-message.info {
    background-color: #2196f3;
}

.toast-message.warning {
    background-color: #ff9800;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-message {
        width: 90%;
        padding: 10px 16px;
        font-size: 13px;
        top: 60px;
    }
}

