:root {
    --primary-color: #2E7D32;
    --secondary-color: #1A237E;
    --text-color: #333;
    --background-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    text-align: center;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;     /* 左右两端对齐 */
    background-color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding: 10px 16px;
    overflow: hidden;
}

.nav-left a,
.nav-right a {
    color: white;
    text-decoration: none;
    padding: 16px 24px;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-left a:hover,
.nav-right a:hover {
    background-color: var(--primary-color);
}

.nav-left a.active {
    background-color: var(--primary-color);
    font-weight: bold;
}

/* 右侧用户链接如果想和左侧风格区分可在这里加样式 */
.nav-right a {
    font-weight: normal;
}

/* 突出用户名 */
#userName {
    font-weight: bold;
    /*text-decoration: underline;*/
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeIn 0.5s ease-in;
}

/* 分页容器 */
/* 分页整体一行布局 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: nowrap;       /* 不换行 */
    /*white-space: nowrap;*/
}

/* 普通按钮样式 */
.pagination button {
    flex: none;
    width: auto;
    min-width: 0;
    padding: 4px 10px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    /*padding: 6px 12px;*/
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* 禁用按钮半透明，不可点击 */
.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 悬停效果（非禁用） */
.pagination button:not(:disabled):hover {
    background-color: #f5f5f5;
}

/* 当前页：字体加粗 */
.pagination button.active {
    font-weight: 700;
}



.page {
    display: none;
}

.page.active {
    display: block;
}

.product-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.product-card .product-img {
    width: 240px;
    height: 240px;
    object-fit: cover;      /* 保持比例充满并裁切 */
    object-position: center;
    border-radius: 6px;     /* 可去掉圆角 */
    display: block;
    margin: 0 auto;         /* block + auto 实现水平居中 */
}

/*.blockchain-info {*/
/*    background: #f3f4f6;*/
/*    padding: 15px;*/
/*    border-radius: 6px;*/
/*    margin: 15px 0;*/
/*}*/

.jump-btn {
    display: inline-block;
    padding: 6px 16px;
    background-color: #ff4444; /* 红色背景 */
    color: white;
    border-radius: 4px;
    text-decoration: none;
    margin: 12px 0;
}

.jump-btn:hover {
    background-color: #ff6666;
    cursor: pointer;
}

.product-desc {
    color: #000;           /* 黑色文本 */
    background-color: #f0f0f0;  /* 浅灰色背景 */
    padding: 8px 12px;     /* 内边距，使文本与边框有距离 */
    border-radius: 4px;    /* 圆角边框 */
    margin: 8px 0;         /* 保持原有外边距 */
}

footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 60px;
}

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

/* 关于我们页面样式 */
.company-profile {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 用户反馈页面样式 */
.review-card {
    background: white;
    margin: 20px 0;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rating {
    /*color: #FFC107;*/
    color: #f5a623;
    font-size: 1.2em;
    letter-spacing: 2px;
}

/*!* 简易分页栏 *!*/
/*.pager { margin-top:20px; text-align:center; }*/
/*.pager a, .pager span {*/
/*    display:inline-block;*/
/*    padding:4px 8px;*/
/*    margin:0 2px;*/
/*    border:1px solid #ddd;*/
/*    border-radius:4px;*/
/*    cursor:pointer;*/
/*}*/
/*.pager a.active {*/
/*    background:#4caf50;*/
/*    color:#fff;*/
/*    border-color:#4caf50;*/
/*    cursor:default;*/
/*}*/

/* ========= 分页栏（美化版） ========= */
.pager {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    user-select: none;          /* 禁止选中文字，体验更像按钮 */
}

.pager a,           /* 普通页码按钮 */
.pager span {       /* 用 span 表示不可点击的当前页也可复用样式 */
    display: inline-block;
    min-width: 32px;
    padding: 6px 12px;
    margin: 0 4px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background: #fff;
    color: #000;                /* 始终黑色数字 */
    text-decoration: none;      /* 去掉下划线 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all .2s ease;
}

/* 悬浮 / 聚焦效果 */
.pager a:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* 当前激活页 */
.pager a.active,
.pager span.active {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
    cursor: default;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 禁用状态（如第一页的«或最后一页的»） */
.pager a.disabled {
    color: #aaa;
    border-color: #eee;
    background: #fafafa;
    cursor: not-allowed;
    box-shadow: none;
}


@media (max-width: 768px) {
    .nav a {
        float: none;
        display: block;
        width: 100%;
    }
}

/* NFT表单 */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.submit-btn {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: #fff;
    font-size: 1em;
    cursor: pointer;
}

.submit-btn:hover {
    background: #1e5e25;
}

/* Modal 通用样式 */
/*.modal {*/
/*    position: fixed;*/
/*    top: 0; left: 0;*/
/*    width: 100vw; height: 100vh;*/
/*    background: rgba(0,0,0,0.5);*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    z-index: 1000;*/
/*}*/
/*.modal.hidden {*/
/*    display: none;*/
/*}*/
/*.modal-content {*/
/*    background: #fff;*/
/*    padding: 32px;*/
/*    width: 360px;*/
/*    border-radius: 8px;*/
/*    position: relative;*/
/*    box-shadow: 0 4px 12px rgba(0,0,0,0.15);*/
/*}*/
/*.modal-content .close {*/
/*    position: absolute;*/
/*    top: 12px; right: 12px;*/
/*    font-size: 24px;*/
/*    cursor: pointer;*/
/*}*/
/*.error {*/
/*    color: #d32f2f;*/
/*    margin-bottom: 12px;*/
/*    min-height: 18px;*/
/*}*/
/* 整体遮罩 */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.hidden {
    display: none;
}

/* 弹层主体 */
.modal-content {
    background: #fff;
    padding: 32px;
    width: 360px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* 关闭按钮 */
.modal-content .close {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-content .close:hover {
    color: #333;
}

/* 标题居中 */
.modal-content h2 {
    text-align: center;
    margin: 0 0 24px;
    font-size: 24px;
    color: #333;
}

/* 错误提示 */
.error {
    color: #d32f2f;
    margin-bottom: 12px;
    min-height: 18px;
    font-size: 14px;
}

/* 表单行 */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
}

/* 通用按钮 */
button {
    display: block;
    width: 100%;
    padding: 12px 0;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}
button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}
button:active {
    transform: translateY(0);
}

/* "去注册/去登录" 链接 */
.switch-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}
.switch-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.switch-link a:hover {
    text-decoration: underline;
}

/* 注销弹层的按钮组（右对齐，差异化配色） */
.logout-actions {
    text-align: right;
    margin-top: 24px;
}
.logout-actions button {
    width: auto;
    min-width: 80px;
    padding: 8px 16px;
    margin-left: 8px;
    font-size: 14px;
}
#logoutCancelBtn {
    background-color: #6c757d;
    color: #fff;
}
#logoutCancelBtn:hover {
    background-color: #5a6268;
}
#logoutConfirmBtn {
    background-color: #dc3545;
    color: #fff;
}
#logoutConfirmBtn:hover {
    background-color: #c82333;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

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

.toast.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 导航栏用户状态样式 */
.nav-right span {
    color: white;
    margin-right: 20px;
    font-weight: bold;
}

.nav-right a#logoutBtn {
    color: #ff4444;
    transition: color 0.3s;
}

.nav-right a#logoutBtn:hover {
    background-color: #d32f2f;
}

/* 公众号推文页面样式 */
.wechat-article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.wechat-article-container h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
}

.iframe-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.iframe-container iframe {
    display: block;
    border: none;
    width: 100%;
    min-height: 800px;
    background: white;
}

.iframe-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 40px;
    text-align: center;
}

.iframe-loading p {
    margin: 10px 0;
    color: #666;
    font-size: 16px;
}

.iframe-loading a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.iframe-loading a:hover {
    text-decoration: underline;
}

.iframe-loading.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wechat-article-container {
        padding: 10px;
    }
    
    .iframe-container iframe {
        min-height: 600px;
    }
    
    .wechat-article-container h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .iframe-loading {
        padding: 20px;
    }
    
    .iframe-loading p {
        font-size: 14px;
    }
}

/* 浮窗样式 */
.floating-widget {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
}

.floating-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 80px;
    text-align: center;
}

.floating-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.floating-icon {
    font-size: 24px;
    line-height: 1;
}

.floating-text {
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.qr-popup {
    position: absolute;
    left: 100px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 30px;
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

.qr-popup.show {
    opacity: 1;
    visibility: visible;
    left: 90px;
}

.qr-content {
    text-align: center;
}

.qr-content h3 {
    margin: 0 0 15px 0;
    color: var(--secondary-color);
    font-size: 16px;
}

.qr-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid #f0f0f0;
}

.qr-content p {
    margin: 15px 0 0 0;
    font-size: 14px;
    color: #666;
}

.qr-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.qr-close:hover {
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-widget {
        left: 10px;
    }
    
    .floating-button {
        padding: 12px 16px;
        min-width: 70px;
    }
    
    .floating-icon {
        font-size: 20px;
    }
    
    .floating-text {
        font-size: 10px;
    }
    
    .qr-popup {
        left: 80px;
        min-width: 180px;
        padding: 15px;
    }
    
    .qr-popup.show {
        left: 70px;
    }
    
    .qr-image {
        width: 120px;
        height: 120px;
    }
}

/* 图片切换样式 */
.image-container {
    position: relative;
    width: 350px;
    max-width: 100%;
}

.image-slider {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide-image.active {
    opacity: 1;
}



/* 响应式设计 */
@media (max-width: 768px) {
    .image-container {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .image-slider {
        height: 250px;
    }
}

/* 公众号推文样式 */
.wechat-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wechat-article-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.wechat-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.wechat-article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wechat-article-card:hover::before {
    opacity: 1;
}

.article-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.wechat-article-card h3 {
    color: var(--secondary-color);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.4;
}

.wechat-article-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 12px;
    color: #999;
}

.article-date {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.article-views {
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
    color: #1976d2;
}

.article-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.article-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    color: white;
    text-decoration: none;
}

.article-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.article-link:hover::before {
    left: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wechat-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
    
    .wechat-article-card {
        padding: 20px;
    }
    
    .article-icon {
        font-size: 36px;
    }
    
    .wechat-article-card h3 {
        font-size: 18px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
