/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 浅色模式颜色 */
    --bg-color: #f5f5f5;
    --text-color: #333;
    --navbar-bg: #fff;
    --navbar-shadow: rgba(0,0,0,0.06);
    --card-bg: #fff;
    --card-shadow: rgba(0,0,0,0.08);
    --hero-bg: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    --hero-text: #2c3e50;
    --link-color: #333;
    --link-hover: #e74c3c;
    --btn-primary: #ff6b6b;
    --btn-secondary: #3498db;
    --footer-bg: #2c3e50;
    --footer-text: #fff;
    --footer-border: rgba(255,255,255,0.1);
}

/* 深色模式颜色 */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --navbar-bg: #2c2c2c;
        --navbar-shadow: rgba(0,0,0,0.3);
        --card-bg: #333;
        --card-shadow: rgba(0,0,0,0.4);
        --hero-bg: linear-gradient(135deg, #1a2a3a 0%, #2a3a4a 100%);
        --hero-text: #ffffff;
        --link-color: #e0e0e0;
        --link-hover: #ff6b6b;
        --btn-primary: #ff6b6b;
        --btn-secondary: #3498db;
        --footer-bg: #1a1a1a;
        --footer-text: #e0e0e0;
        --footer-border: rgba(255,255,255,0.1);
    }
}

/* 手动切换深色模式 */
:root[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --navbar-bg: #2c2c2c;
    --navbar-shadow: rgba(0,0,0,0.3);
    --card-bg: #333;
    --card-shadow: rgba(0,0,0,0.4);
    --hero-bg: linear-gradient(135deg, #1a2a3a 0%, #2a3a4a 100%);
    --hero-text: #ffffff;
    --link-color: #e0e0e0;
    --link-hover: #ff6b6b;
    --btn-primary: #ff6b6b;
    --btn-secondary: #3498db;
    --footer-bg: #1a1a1a;
    --footer-text: #e0e0e0;
    --footer-border: rgba(255,255,255,0.1);
}

/* 手动切换浅色模式 */
:root[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-color: #333;
    --navbar-bg: #fff;
    --navbar-shadow: rgba(0,0,0,0.06);
    --card-bg: #fff;
    --card-shadow: rgba(0,0,0,0.08);
    --hero-bg: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    --hero-text: #2c3e50;
    --link-color: #333;
    --link-hover: #e74c3c;
    --btn-primary: #ff6b6b;
    --btn-secondary: #3498db;
    --footer-bg: #2c3e50;
    --footer-text: #fff;
    --footer-border: rgba(255,255,255,0.1);
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ==================== 导航栏 ==================== */
.navbar {
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 8px var(--navbar-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: var(--navbar-bg);
    box-shadow: 0 4px 15px var(--navbar-shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    min-height: 60px;
}

.logo h1 {
    color: var(--btn-primary);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.nav-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--link-color);
    padding: 5px 8px;
}

.floating-toolbar {
    position: fixed;
    right: 10px;
    top: 55%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toolbar-item {
    width: 50px;
    height: 50px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--link-color);
    position: relative;
}

.qrcode-container {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 15px;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--card-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    text-align: center;
}

.qrcode-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-10px);
}

.qrcode {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.qrcode-container p {
    margin: 0;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .qrcode {
        width: 120px;
        height: 120px;
    }
    
    .qrcode-container {
        padding: 10px;
    }
}

.toolbar-item:hover {
    background-color: var(--btn-primary);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px var(--card-shadow);
}

.toolbar-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.toolbar-item span {
    font-size: 10px;
    font-weight: 500;
}

/* 回到顶部按钮特殊处理 */
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .floating-toolbar {
        right: 5px;
        gap: 8px;
    }
    
    .toolbar-item {
        width: 45px;
        height: 45px;
    }
    
    .toolbar-item i {
        font-size: 18px;
    }
    
    .toolbar-item span {
        font-size: 9px;
    }
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--link-hover);
}

.nav-links .login-btn {
    background-color: var(--btn-primary);
    color: white;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 15px;
}

.nav-links .login-btn:hover {
    background-color: #c0392b;
}

/* ==================== 手机端菜单 ==================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--navbar-bg);
        flex-direction: column;
        align-items: center;
        padding: 25px 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 999;
        gap: 8px;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        width: 90%;
        text-align: center;
        padding: 14px 0;
        font-size: 17px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }
}

/* ==================== 英雄区域 ==================== */
.hero {
    background: var(--hero-bg);
    padding: 80px 0 60px;
    margin-top: 20px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    transform: rotate(2deg);
    transition: all 0.3s ease;
}

.hero-image:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.hero-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.hero-image:hover img {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.hero h2 {
    font-size: 52px;
    font-weight: 700;
    color: var(--hero-text);
    margin-bottom: 10px;
}

.hero .subtitle {
    font-size: 26px;
    color: var(--btn-secondary);
    margin-bottom: 20px;
}

.hero .description {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-buttons .btn,
.cta-buttons .btn {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #fff;
    background-color: var(--btn-secondary);
}

.btn:not(.btn-orange):not(.btn-blue):not(.btn-white):not(.btn-outline):not(.btn-register) {
    background-color: var(--btn-secondary);
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-orange { background-color: var(--btn-primary); color: #fff; }
.btn-blue { background-color: var(--btn-secondary); color: #fff; }
.btn-white { background-color: var(--card-bg); color: var(--btn-primary); }
.btn-outline { background-color: var(--btn-secondary); color: #fff; border: 2px solid var(--btn-secondary); }
.btn-register { 
    background-color: var(--btn-primary); 
    color: #fff; 
    padding: 16px 32px; 
    font-size: 18px; 
    display: block;
    margin: 60px auto 0;
    text-align: center;
    max-width: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 英雄区域信息 */
.hero-info {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.operators {
    display: flex;
    align-items: center;
    gap: -10px;
}

.operator-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: -10px;
    transition: transform 0.3s ease;
}

.operator-logo:first-child {
    margin-left: 0;
}

.operator-logo:hover {
    transform: scale(1.1);
    z-index: 1;
}

.rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rating-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
}

.rating-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.rating-source {
    font-size: 14px;
    color: var(--text-color);
    margin-top: 5px;
}

/* ==================== 公共区域样式 ==================== */
.products, .advantages, .agent, .contact {
    padding: 60px 0;
}

h3 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    color: var(--text-color);
    font-size: 16px;
}

.products-grid, .agent-benefits, .contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

@media (max-width: 1200px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .advantages-grid {
        grid-template-columns: 1fr;
    }
}

.product-item, .advantage-item, .benefit-item, .contact-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px var(--card-shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.product-item:hover, .advantage-item:hover, .benefit-item:hover, .contact-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--btn-primary);
    margin: 15px 0;
}

.icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--btn-primary);
}

/* CTA 区域 */
.cta-section {
    background-color: var(--btn-primary);
    color: #fff;
    padding: 70px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.cta-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* 代理加盟新样式 */
.agent-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.agent-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.agent-text {
    display: flex;
    flex-direction: column;
}

.agent-subtitle {
    color: var(--btn-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.agent-text h3 {
    text-align: left;
    margin-bottom: 15px;
}

.agent-description {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.agent-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.feature-item i {
    color: var(--btn-primary);
    font-size: 20px;
    margin-top: 5px;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.feature-item p {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

.agent-text .btn-register {
    display: inline-block;
    margin: 0;
    width: auto;
}

@media (max-width: 992px) {
    .agent-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .agent-image {
        order: 2;
    }
    
    .agent-text {
        order: 1;
    }
}

/* FAQ 部分样式 */
.faq {
    padding: 60px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-color);
}

.faq-question:hover {
    background-color: rgba(0,0,0,0.02);
}

.faq-question i {
    font-size: 16px;
    color: var(--btn-primary);
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 25px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 25px 20px;
}

@media (max-width: 768px) {
    .faq-question {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .faq-answer {
        padding: 0 20px 0;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 15px;
    }
    
    .faq-answer p {
        font-size: 14px;
    }
}

/* ==================== 佣金政策样式 ==================== */
.commission {
    padding: 60px 0;
    background-color: var(--bg-color);
}

.commission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.commission-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.commission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px var(--card-shadow);
}

.commission-card.featured {
    border: 3px solid var(--btn-primary);
    transform: scale(1.02);
}

.commission-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background-color: var(--btn-primary);
    color: white;
    padding: 5px 40px;
    font-size: 12px;
    font-weight: 600;
    transform: rotate(45deg);
}

.commission-header {
    text-align: center;
    margin-bottom: 25px;
}

.commission-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.commission-icon i {
    font-size: 24px;
    color: white;
}

.commission-header h4 {
    font-size: 22px;
    color: var(--text-color);
    margin: 0;
}

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

.commission-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--btn-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.commission-amount .currency {
    font-size: 24px;
    margin-right: 5px;
}

.commission-amount .number {
    font-size: 48px;
}

.commission-amount .unit {
    font-size: 16px;
    margin-left: 5px;
    color: var(--text-color);
}

.commission-desc {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.commission-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
    text-align: left;
}

.commission-features li {
    padding: 8px 0;
    color: var(--text-color);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.commission-features li i {
    color: var(--btn-primary);
    margin-right: 10px;
    font-size: 16px;
}

.commission-card .btn {
    width: 100%;
    margin-top: 10px;
}

.commission-notice {
    background-color: var(--card-bg);
    border-left: 4px solid var(--btn-primary);
    border-radius: 8px;
    padding: 25px 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.notice-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: var(--btn-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-icon i {
    font-size: 24px;
    color: white;
}

.notice-content h4 {
    font-size: 18px;
    color: var(--text-color);
    margin: 0 0 10px;
}

.notice-content p {
    font-size: 14px;
    color: var(--text-color);
    margin: 0;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .commission-grid {
        grid-template-columns: 1fr;
    }
    
    .commission-card.featured {
        transform: scale(1);
    }
    
    .commission-amount {
        font-size: 36px;
    }
    
    .commission-amount .number {
        font-size: 36px;
    }
    
    .commission-notice {
        flex-direction: column;
        text-align: center;
    }
}

/* 代理加盟按钮居中 */
.agent .btn-register {
    display: block;
    margin: 0 auto;
    text-align: center;
}

/* 大屏幕CTA按钮大小调整 */
@media (min-width: 769px) {
    .cta-buttons .btn {
        padding: 14px 28px;
        font-size: 16px;
    }
}

/* 页脚 */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 30px;
}



.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--btn-primary);
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--btn-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid var(--footer-border);
}

.footer-left p {
    margin: 0;
    color: var(--footer-text);
    font-size: 14px;
}

.footer-right .friendship-links {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.footer-right .friendship-links span {
    color: var(--footer-text);
}

.footer-right .friendship-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-right .friendship-links a:hover {
    color: var(--btn-primary);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-right .friendship-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 响应式优化 */
@media (max-width: 768px) {
    .navbar .container {
        padding: 8px 15px;
        min-height: 52px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .hero h2 { font-size: 38px; }
    .hero .subtitle { font-size: 22px; }
    
    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        max-width: none;
    }
    
    .hero-buttons,
    .cta-buttons {
        width: 100%;
    }
    
    .hero-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .rating {
        align-items: center;
    }
    
    /* 小屏幕代理加盟按钮占满一行 */
    .btn-register {
        width: 100%;
        max-width: none;
    }
}

/* 大屏幕按钮大小调整 */
@media (min-width: 769px) {
    .cta-buttons .btn,
    .btn-register {
        padding: 16px 32px;
        font-size: 18px;
        max-width: 300px;
    }
}