/* ================== 全局重置 ================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    background: #fafbfc;
    color: #111827;
    line-height: 1.5;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1;
    display: block;
}
a {
    text-decoration: none;
    color: inherit;
}
img {
    max-width: 100%;
}

/* ================== 顶部导航栏 ================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 20px;
    font-weight: 600;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav-item {
    font-size: 14px;
    color: #333;
    position: relative;
    padding: 6px 2px;
}
.nav-item::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: #000;
    opacity: 0;
    transform: scaleX(0.6);
    transition: all 0.25s ease;
}
.nav-item:hover::after {
    opacity: 1;
    transform: scaleX(1);
}
.nav-divider {
    width: 1px;
    height: 16px;
    background: rgba(0,0,0,0.1);
}
.nav-user {
    font-size: 14px;
    color: #555;
}
.nav-register {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.05);
}
.nav-register:hover {
    background: rgba(0,0,0,0.1);
}

/* ================== 首页 ================== */
.home-hero {
    padding: 100px 0 50px;
    text-align: center;
}
.home-title {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 12px;
}
.home-subtitle {
    font-size: 18px;
    color: #666;
}
.home-nav {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 0 20px;
}
.home-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.home-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}
.home-card p {
    font-size: 14px;
    color: #666;
}
.home-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* ================== 个股页面 ================== */
.stock-title {
    font-size: 32px;
    font-weight: 600;
    margin: 32px auto 24px;
    max-width: 1200px;
    padding: 0 20px;
}
.stock-module {
    max-width: 1200px;
    margin: 0 auto 32px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.05);
}
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.module-header h2 {
    font-size: 20px;
    font-weight: 600;
}
.toggle-chart {
    background: #f0f0f0;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.module-table {
    overflow-x: auto;
    margin-bottom: 16px;
}
.module-table table {
    width: 100%;
    border-collapse: collapse;
}
.module-table th, .module-table td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
}
.text-right {
    text-align: right !important;
}
.text-center {
    text-align: center !important;
}

/* 图表布局 */
.module-chart {
    transition: max-height 0.4s ease, opacity 0.3s ease;
    overflow: hidden;
}
.module-chart.is-hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}
.chart-item {
    height: 360px;
    animation: fadeUp 0.4s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}
.tag-green { background: #e6f4ea; color: #1e7f43; }
.tag-orange { background: #fff3e0; color: #b26a00; }
.tag-blue { background: #e8f1ff; color: #1a5fd0; }

/* ================== 登录页 - 最终完美版（无滚动条） ================== */
.login-page {
    display: flex;
    height: calc(100vh - 72px - 50px); /* 减去导航 + 页脚 预留空间 */
    max-height: calc(100vh - 122px);
    background: #f7f8fa;
    overflow: hidden;
}
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-brand h1 {
    font-size: 32px;
    font-weight: 700;
}
.login-brand p {
    font-size: 15px;
    color: #d1d5db;
}

/* 轮播 */
.login-carousel {
    position: relative;
    text-align: center;
    margin: 20px 0;
}
.carousel-item {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fade 0.8s ease;
}
.carousel-item.active {
    display: flex;
}
.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.carousel-item h3 {
    font-size: 19px;
    margin-bottom: 6px;
}
.carousel-item p {
    font-size: 14px;
    color: #d1d5db;
    max-width: 320px;
    line-height: 1.5;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
}
.dot.active {
    background: white;
}
.value-slogan {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    margin: 10px 0;
}
.login-partners {
    font-size: 12px;
    color: #9ca3af;
}
.partner-list {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

/* 右侧登录卡片 - 上移 */
.login-right {
    width: 420px;
    background: white;
    display: flex;
    align-items: flex-start; /* 登录框上移 */
    justify-content: center;
    padding: 40px 20px 0;
}
.login-card-wrapper {
    width: 100%;
    max-width: 340px;
}

/* 登录卡片 */
.login-card {
    background: #fff;
    padding: 28px 24px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.07);
}
.login-card h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}
.card-desc {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}
.login-card input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
}
.login-card button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
}
.login-card button:hover {
    background: #1d4ed8;
}
.login-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
}
.login-footer a {
    color: #2563eb;
    margin-left: 6px;
}

/* 二维码区域 - 大幅下移 + 美化 */
.login-qrcode-section {
    width: 100%;
    text-align: center;
    /* 往下挪更多，拉开与登录卡片的距离 */
    margin-top: 120px;
    /* 增加顶部分隔线，更精致 */
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}
.qrcode-title {
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}
.qrcode-grid {
    display: flex;
    justify-content: center;
    gap: 32px; /* 二维码间距更大 */
}
.qrcode-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    /*  hover 微动效 */
    transition: transform 0.2s ease;
}
.qrcode-item:hover {
    transform: translateY(-3px);
}
.qrcode-item img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #eee;
    /* 轻微阴影，更立体 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.qrcode-item span {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

/* ================== 消息提示 ================== */
.flash-messages {
    margin-bottom: 12px;
}
.flash {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}
.flash.error {
    background: #fef2f2;
    color: #dc2626;
}
.flash.success {
    background: #f0fdf4;
    color: #16a34a;
}

/* ================== 页脚 ================== */
.site-footer {
    flex-shrink: 0;
    height: 50px;
    line-height: 50px;
    padding: 0;
    font-size: 12px;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
    color: #666;
}
.site-footer a {
    color: #666;
}
.site-footer a:hover {
    color: #111;
}
.footer-sep {
    margin: 0 6px;
    color: #ccc;
}
/* 页脚备案图标缩小优化 */
.footer-police img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    display: inline-block;
}
/* ================== 响应式 ================== */
@media (max-width: 900px) {
    .login-page {
        flex-direction: column;
        height: auto;
    }
    .login-left {
        display: none;
    }
    .login-right {
        width: 100%;
        padding: 30px 20px;
    }
}
@media (max-width: 768px) {
        .login-page {
        flex-direction: column; /* 手机自动上下布局 */
        min-height: auto;
        padding: 40px 20px;
    }
    .login-left, .login-right {
        width: 100%;
        max-width: 400px;
    }
    .home-title {
        font-size: 32px;
    }
    .home-nav {
        grid-template-columns: 1fr;
    }
    .chart-grid {
        grid-template-columns: 1fr;
    }
    .chart-item {
        height: 300px;
    }
}

/* ================== 底部联系我们（新增） ================== */
.contact-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 30px 0;
    margin-top: 40px;
}
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.contact-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
}
.contact-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.contact-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.contact-item img:hover {
    transform: scale(1.05);
}
.contact-item span {
    font-size: 13px;
    color: #666;
}