/**
 * style.css - 金臻酒汇主样式文件
 * 包含全局样式、布局、组件、动画效果和机器人小臻样式
 */

/* ========================================
   CSS变量定义
   ======================================== */

:root {
    /* 主色调 */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #00b0ff;
    --dark-bg: #0d0d3d;
    --light-bg: #f8fafc;
    
    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-dark: #333333;
    
    /* 间距 */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    /* 圆角 */
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-xl: 20px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   全局样式
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #0d0d3d 0%, #1a1a4d 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   容器布局
   ======================================== */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-main {
    min-height: calc(100vh - 200px);
}

/* ========================================
   头部样式
   ======================================== */

.site-header {
    background: rgba(13, 13, 61, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-normal);
}

.site-brand:hover {
    transform: scale(1.05);
}

/* PC端导航 */
.site-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-normal);
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-normal);
}

.nav-list a:hover {
    color: var(--accent-color);
}

.nav-list a:hover::after {
    width: 100%;
}

/* ========================================
   页脚样式
   ======================================== */

.site-footer {
    background: rgba(13, 13, 61, 0.95);
    padding: 30px 0;
    text-align: center;
    margin-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.beian-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-normal);
}

.beian-link:hover {
    color: var(--accent-color);
}

/* ========================================
   轮播图样式
   ======================================== */

.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播导航按钮 */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-normal);
    border-radius: var(--radius-sm);
}

.carousel-nav:hover {
    background: rgba(0, 176, 255, 0.8);
}

.carousel-nav-prev {
    left: 20px;
}

.carousel-nav-next {
    right: 20px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
}

.indicator.active,
.indicator:hover {
    background: var(--accent-color);
    transform: scale(1.2);
}

/* ========================================
   内容区域样式
   ======================================== */

.hero-content-below {
    text-align: center;
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.02);
}

.hero-title-below {
    font-size: 36px;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub-below {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.hero-cta {
    margin-top: var(--spacing-lg);
}

/* ========================================
   按钮样式
   ======================================== */

.cta-button,
.btn {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.cta-button:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.cta-button:active,
.btn:active {
    transform: translateY(-1px);
}

.cta-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   优势区域样式
   ======================================== */

.advantages {
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.02);
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: var(--spacing-lg);
}

.advantage-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}

.advantage-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

.advantage-card h3 {
    font-size: 22px;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.advantage-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   分销制度区域
   ======================================== */

.system {
    padding: var(--spacing-xl) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.system-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.system-text h3 {
    font-size: 24px;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.system-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.system-text ul {
    list-style: none;
    padding-left: 0;
}

.system-text li {
    padding-left: 25px;
    position: relative;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.system-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.system-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   加入区域
   ======================================== */

.join {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

.join h2 {
    font-size: 32px;
    margin-bottom: var(--spacing-md);
}

.join p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   卡片区域
   ======================================== */

.cards-section,
.info-section {
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.02);
}

.cards-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: var(--spacing-lg);
}

.card,
.nav-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}

.card:hover,
.nav-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

.card h3,
.nav-card h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 22px;
}

.card p,
.nav-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.nav-card a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-normal);
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-md);
}

.nav-card a:hover {
    background: rgba(0, 176, 255, 0.1);
    border-color: var(--accent-color);
}

/* ========================================
   模态框样式
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.modal[aria-hidden="false"] {
    display: flex !important;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-body {
    position: relative;
    z-index: 100000;
    background: var(--dark-bg);
    border-radius: var(--radius-lg);
    max-width: 90%;
    width: 400px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-lg);
    margin: 20px;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    padding: 40px 30px 30px;
    text-align: center;
}

.modal-content h3 {
    color: var(--text-primary);
    margin: 0 0 15px;
    font-size: 24px;
}

.modal-content p {
    color: var(--text-secondary);
    margin: 10px 0;
    line-height: 1.6;
}

.modal-content img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 20px auto;
    display: block;
    border-radius: var(--radius-md);
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #333;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.modal-close:hover {
    background: #ff4444;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

/* ========================================
   机器人小臻样式
   ======================================== */

#xiaozhen-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.xiaozhen-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: xiaozhen-entrance 3s ease-out forwards;
    transform: scale(0);
    padding: 5px;
}

@keyframes xiaozhen-entrance {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.xiaozhen-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.xiaozhen-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.xiaozhen-dialog {
    position: absolute;
    bottom: 100px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    max-height: 500px;
    overflow: hidden;
}

.xiaozhen-dialog.show {
    display: flex;
    animation: xiaozhen-dialog-show 0.3s ease-out;
}

@keyframes xiaozhen-dialog-show {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.xiaozhen-dialog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.xiaozhen-title {
    font-weight: bold;
    font-size: 16px;
}

.xiaozhen-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.xiaozhen-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.xiaozhen-dialog-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #f8f9fa;
    max-height: 350px;
}

.xiaozhen-dialog-footer {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    border-radius: 0 0 15px 15px;
}

.xiaozhen-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.xiaozhen-input:focus {
    border-color: #667eea;
}

.xiaozhen-send-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.xiaozhen-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.xiaozhen-send-btn:active {
    transform: translateY(0);
}

.xiaozhen-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.xiaozhen-message {
    margin-bottom: 15px;
    animation: message-slide-in 0.3s ease-out;
    display: flex;
    align-items: flex-start;
}

.xiaozhen-message.user {
    flex-direction: row-reverse;
}

@keyframes message-slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.xiaozhen-message-content {
    background: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    word-wrap: break-word;
}

.xiaozhen-message.user .xiaozhen-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.xiaozhen-message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 10px;
    flex-shrink: 0;
}

.xiaozhen-message-text {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.xiaozhen-message.user .xiaozhen-message-text {
    color: #fff;
}

.xiaozhen-message-image {
    max-width: 100%;
    width: 200px;
    height: auto;
    margin-top: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
    border: 2px solid #e0e0e0;
}

.xiaozhen-message-image:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.xiaozhen-message-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.xiaozhen-typing {
    display: flex;
    align-items: center;
    padding: 10px;
    color: #999;
    font-size: 13px;
}

.xiaozhen-typing-dots {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.xiaozhen-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typing-bounce 1.4s infinite;
}

.xiaozhen-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.xiaozhen-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* ========================================
   滚动动画
   ======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 768px) {
    .hero-title-below {
        font-size: 28px;
    }
    
    .hero-sub-below {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .system-content {
        grid-template-columns: 1fr;
    }
    
    .carousel-container {
        height: 300px;
    }
    
    .carousel-nav {
        padding: 10px 15px;
        font-size: 18px;
    }
    
    .carousel-nav-prev {
        left: 10px;
    }
    
    .carousel-nav-next {
        right: 10px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .advantages-grid,
    .cards-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* 小臻移动端适配 */
    #xiaozhen-container {
        bottom: 15px;
        right: 15px;
    }
    
    .xiaozhen-avatar {
        width: 60px;
        height: 60px;
    }
    
    .xiaozhen-dialog {
        width: calc(100vw - 30px);
        bottom: 85px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .cta-button,
    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .modal-body {
        width: 95%;
    }
}

/* ========================================
   打印样式
   ======================================== */

@media print {
    .site-header,
    .site-footer,
    #xiaozhen-container,
    .modal,
    .carousel-nav,
    .carousel-indicators {
        display: none !important;
    }
}
