/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: #ff6b6b;
}

/* 预加载动画 */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

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

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #ff6b6b;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 主视觉 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a, #1a0d1a);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ff6b6b, #ffd93d, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(to right, #ff6b6b, #ff4757);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid #ff6b6b;
}

.btn-secondary:hover {
    background: rgba(255, 107, 107, 0.1);
    transform: translateY(-3px);
}

.hero-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-icons i {
    font-size: 4rem;
    margin: 0 1.5rem;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-icons i:nth-child(1) { animation-delay: 0s; color: #ff6b6b; }
.floating-icons i:nth-child(2) { animation-delay: 1.5s; color: #4ecdc4; }
.floating-icons i:nth-child(3) { animation-delay: 3s; color: #ffd93d; }
.floating-icons i:nth-child(4) { animation-delay: 4.5s; color: #9b59b6; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ff6b6b, transparent);
    top: -200px;
    left: -200px;
}

.shape2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #4ecdc4, transparent);
    bottom: -100px;
    right: -100px;
}

.shape3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ffd93d, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 特性区域 */
.section {
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-description {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 107, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* 架构区域 */
.bg-light {
    background-color: rgba(10, 10, 10, 0.3);
}

.architecture-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    align-items: start;
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.arch-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.step-number {
    background: linear-gradient(to right, #ff6b6b, #ff4757);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.architecture-code {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 1.5rem;
    overflow-x: auto;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.architecture-code pre {
    font-family: 'Courier New', monospace;
    color: #a0a0a0;
}

/* 对话格式区域 */
.format-tabs {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 1.2rem;
    background: transparent;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
}

.tab-btn.active {
    color: white;
    background: rgba(255, 107, 107, 0.2);
    border-bottom: 3px solid #ff6b6b;
}

.tab-content {
    display: none;
    padding: 2.5rem;
}

.tab-content.active {
    display: block;
}

.format-example {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.format-example pre {
    font-family: 'Courier New', monospace;
    color: #a0a0a0;
}

.comparison-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
}

.comparison-table th {
    background: rgba(255, 107, 107, 0.2);
    font-weight: 600;
    width: 20%;
}

.comparison-table td {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.comparison-table tr:hover td {
    background: rgba(255, 107, 107, 0.1);
}

/* 快速开始区域 */
.quickstart-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.step-number {
    background: linear-gradient(to right, #ff6b6b, #ff4757);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.step-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.step-card pre {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.step-card pre code {
    font-family: 'Courier New', monospace;
    color: #a0a0a0;
}

.step-features {
    list-style: none;
    margin-top: 1rem;
}

.step-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
}

.step-features li::before {
    content: "✓";
    color: #ff6b6b;
    font-weight: bold;
}

.chat-demo {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.chat-message {
    margin-bottom: 1.5rem;
    max-width: 80%;
}

.chat-message.user {
    background: rgba(255, 107, 107, 0.2);
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.chat-message.assistant {
    background: rgba(78, 205, 196, 0.2);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.chat-message p {
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-size: 1rem;
}

/* 页脚 */
.footer {
    background-color: #050505;
    padding: 4rem 5% 2rem;
}

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

.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #ff6b6b;
}

.footer-section p {
    opacity: 0.7;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: translateY(-3px);
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

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

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    color: #ff6b6b;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* AttnRes 详解区域 */
.attnres-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    align-items: start;
}

.attnres-explanation h3 {
    color: #ff6b6b;
    margin-bottom: 1.5rem;
}

.innovation-points {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.point {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 3px solid #ff6b6b;
}

.point h4 {
    color: #ffd93d;
    margin-bottom: 0.8rem;
}

.gate-mechanism, .info-flow {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
}

.gate-formula {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    color: #a0a0a0;
}

.info-flow p {
    background: rgba(255, 107, 107, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-links.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        padding: 2rem 5%;
        gap: 1.5rem;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .attnres-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .architecture-container,
    .quickstart-steps,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .chat-message {
        max-width: 90%;
    }
    
    .attnres-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .feature-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .architecture-container,
    .quickstart-steps,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .chat-message {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .feature-card {
        padding: 2rem;
    }
}