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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #0a0a0f;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏 */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00f0ff;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00f0ff;
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #00f0ff;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* 英雄区域 */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    padding: 0 2rem;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 240, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

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

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #00f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }
    to { text-shadow: 0 0 20px rgba(0, 240, 255, 0.8), 0 0 30px rgba(0, 240, 255, 0.3); }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #b0b0b0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: #00f0ff;
    color: #0a0a0f;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    background-color: #00d4e0;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
    transform: translateY(-3px);
}

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

.btn-secondary:hover {
    background-color: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transform: translateY(-3px);
}

.hero-svg {
    z-index: 2;
    flex-shrink: 0;
}

/* SVG动画 */
.floating-icon {
    animation: iconFloat 15s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.particle {
    animation: particleFloat 8s ease-in-out infinite;
}

.particle:nth-child(1) { animation-delay: 0s; }
.particle:nth-child(2) { animation-delay: 2s; }
.particle:nth-child(3) { animation-delay: 4s; }
.particle:nth-child(4) { animation-delay: 6s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.8; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 1; }
}

/* 内容板块 */
.content-section {
    padding: 6rem 2rem;
    background-color: #0a0a0f;
}

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

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #00f0ff;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

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

.card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00f0ff, #0080ff);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    margin-bottom: 1.5rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.card-description {
    color: #b0b0b0;
    margin-bottom: 1.5rem;
}

.card-link {
    display: inline-block;
    color: #00f0ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.card-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: margin-left 0.3s ease;
}

.card-link:hover {
    color: #00d4e0;
}

.card-link:hover::after {
    margin-left: 1rem;
}

/* 特色区域 */
.features {
    padding: 6rem 2rem;
    background-color: #1a1a2e;
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
}

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

.feature-item {
    text-align: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.1);
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #00f0ff;
}

.feature-description {
    color: #b0b0b0;
}

/* 页脚 */
.footer {
    background-color: #0f0f23;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(0, 240, 255, 0.2);
}

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

.footer-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #00f0ff;
}

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

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

.footer-section ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: #00f0ff;
    padding-left: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
}

/* 文档页面样式 */
.doc-page {
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    background-color: #0a0a0f;
}

.doc-container {
    max-width: 1200px;
    margin: 0 auto;
}

.doc-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.doc-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #00f0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.doc-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    animation: titleUnderline 3s ease-in-out infinite;
}

@keyframes titleUnderline {
    0%, 100% { width: 100px; }
    50% { width: 150px; }
}

.doc-subtitle {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
}

/* 模块化卡片布局 */
.modular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .modular-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (min-width: 1024px) {
    .modular-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

.module-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(0, 240, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 240, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.3);
}

.module-card:hover::before {
    opacity: 1;
}

.module-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.module-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background-color: rgba(0, 240, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.3s ease;
}

.module-card:hover .module-icon {
    background-color: rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.module-icon svg {
    width: 40px;
    height: 40px;
}

.module-info {
    flex: 1;
}

.module-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    transition: color 0.3s ease;
}

.module-card:hover .module-title {
    color: #00f0ff;
}

.module-description {
    color: #b0b0b0;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.module-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #00f0ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.module-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00f0ff;
    transition: width 0.3s ease;
}

.module-link:hover {
    color: #00d4e0;
    gap: 0.75rem;
}

.module-link:hover::after {
    width: 100%;
}

/* 页面特定颜色方案 */
/* 常识名词页面 */
.docsue-page .module-icon {
    background-color: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.2);
}

.docsue-page .module-card:hover .module-icon {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* 蓝图知识体系页面 */
.book-page .module-icon {
    background-color: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.2);
}

.book-page .module-card:hover .module-icon {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.book-page .doc-title::after {
    background-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* 入门教程页面 */
.learnbase-page .module-icon {
    background-color: rgba(255, 136, 0, 0.1);
    border-color: rgba(255, 136, 0, 0.2);
}

.learnbase-page .module-card:hover .module-icon {
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.3);
}

.learnbase-page .doc-title::after {
    background-color: #ff8800;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

/* 应用案例页面 */
.examples-page .module-icon {
    background-color: rgba(255, 0, 255, 0.1);
    border-color: rgba(255, 0, 255, 0.2);
}

.examples-page .module-card:hover .module-icon {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.examples-page .doc-title::after {
    background-color: #ff00ff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* SVG图标动画 */
.icon-animation {
    animation: iconAnimation 3s ease-in-out infinite;
}

@keyframes iconAnimation {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.05); }
    75% { transform: rotate(-5deg) scale(1.05); }
}

/* 图标加载动画 */
.icon-loading {
    animation: iconLoading 2s ease-in-out infinite;
}

@keyframes iconLoading {
    0% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.3; transform: scale(0.8); }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 4rem 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-svg {
        margin-top: 2rem;
        max-width: 100%;
    }
    
    .doc-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .hero {
        padding: 4rem 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .content-section,
    .features {
        padding: 4rem 1rem;
    }
    
    .doc-page {
        padding: 6rem 1rem 2rem;
    }
    
    .doc-title {
        font-size: 2rem;
    }
    
    .modular-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .module-card {
        padding: 1.5rem;
    }
    
    .module-icon {
        width: 50px;
        height: 50px;
    }
    
    .module-icon svg {
        width: 30px;
        height: 30px;
    }
}