/* ========================================
   WEEX唯客交易所 - 主样式表
   专业的加密货币交易所网站设计
   ======================================== */

/* CSS变量定义 */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4285f4;
    --secondary-color: #00c853;
    --secondary-dark: #009624;
    --accent-color: #ff6b35;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-light: #80868b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #202124;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 3px rgba(60, 64, 67, 0.15);
    --shadow-md: 0 4px 6px rgba(60, 64, 67, 0.2);
    --shadow-lg: 0 10px 20px rgba(60, 64, 67, 0.25);
    --shadow-xl: 0 20px 40px rgba(60, 64, 67, 0.3);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #00c853 100%);
    --gradient-dark: linear-gradient(135deg, #202124 0%, #2d3238 100%);
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

/* 导航栏样式 */
header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar {
    padding: 15px 0;
}

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

.brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.brand:hover {
    color: var(--primary-dark);
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* 按钮样式 */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Hero主视觉区 */
#hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    padding: 140px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.08) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.1) translate(20px, 30px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

#hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.hero-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-image {
    width: 100%;
    max-width: 900px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 核心特性区 */
#features {
    padding: 80px 0;
    background: white;
}

.section-light {
    background: var(--bg-secondary);
}

#features h2, #services h2, #details h2, #faq h2 {
    text-align: center;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-description {
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1) 0%, rgba(0, 200, 83, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.feature-icon img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 服务介绍区 */
#services {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.services-wrapper {
    margin-top: 50px;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.service-item:nth-child(even) {
    direction: rtl;
}

.service-item:nth-child(even) > * {
    direction: ltr;
}

.service-item.reverse {
    direction: ltr;
}

.service-image {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.service-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.service-image img {
    width: 100%;
    height: auto;
    display: block;
}

.service-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.service-content p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 25px;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
    font-size: 16px;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 18px;
}

/* 详细内容区 */
#details {
    padding: 80px 0;
}

.details-content {
    max-width: 900px;
    margin: 0 auto;
}

.detail-block {
    margin-bottom: 50px;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

.detail-block:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.detail-block h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
}

.detail-block p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 常见问题区 */
#faq {
    padding: 80px 0;
    background: white;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 30px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item h3 {
    padding: 25px 30px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item h3::after {
    content: '▼';
    font-size: 14px;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item:hover h3 {
    background: var(--primary-color);
    color: white;
}

.faq-item:hover h3::after {
    color: white;
}

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

.faq-item.active .faq-content {
    max-height: 1000px;
    padding: 30px;
}

.faq-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.faq-content p strong {
    color: var(--text-primary);
    font-size: 17px;
}

/* 行动号召区(CTA) */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.3;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.cta-section h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
}

.cta-content > p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

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

.cta-buttons .btn-primary {
    background: var(--secondary-color);
}

.cta-buttons .btn-primary:hover {
    background: var(--secondary-dark);
}

.cta-buttons .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.cta-buttons .btn-secondary:hover {
    background: white;
    color: var(--bg-dark);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.cta-features span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* 页脚 */
footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.9);
    padding: 60px 0 0;
}

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

.footer-section h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.footer-section p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 15px;
}

.footer-section a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.download-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 600;
    margin-top: 15px;
}

.download-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
    #hero h1 {
        font-size: 40px;
    }
    
    .hero-description {
        font-size: 18px;
    }
    
    .service-item {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .service-item:nth-child(even) {
        direction: ltr;
    }
    
    .service-content h3 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        gap: 15px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    #hero {
        padding: 120px 0 60px;
        min-height: auto;
    }
    
    #hero h1 {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    #features h2, #services h2, #details h2, #faq h2 {
        font-size: 32px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .service-content h3 {
        font-size: 24px;
    }
    
    .detail-block {
        padding: 30px 20px;
    }
    
    .detail-block h3 {
        font-size: 24px;
    }
    
    .faq-item h3 {
        font-size: 18px;
        padding: 20px;
    }
    
    .cta-section h2 {
        font-size: 32px;
    }
    
    .cta-content > p {
        font-size: 16px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .cta-features {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 28px;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    #features h2, #services h2, #details h2, #faq h2 {
        font-size: 28px;
    }
    
    .section-description {
        font-size: 16px;
    }
    
    .cta-section h2 {
        font-size: 28px;
    }
}

/* 动画效果 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 滚动动画观察者类 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 懒加载图片优化 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 无障碍优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 打印样式 */
@media print {
    header, footer, .cta-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: none;
    }
}