/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-alt: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--bg-alt);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.nav-link.disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

.coming-soon {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: normal;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* 主页Hero区域 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 2rem 0;
}

.hero-tagline {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 1);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.15em;
    font-style: italic;
    position: relative;
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border-left: 4px solid rgba(255, 255, 255, 0.8);
    border-right: 4px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.8;
    max-width: 700px;
    text-align: center;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.floating-card p {
    font-size: 1.2rem;
    font-weight: 600;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 理论知识卡片 */
.theory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.theory-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.theory-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon i {
    font-size: 1.8rem;
    color: white;
}

.theory-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.theory-card > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.card-content ul {
    list-style: none;
    padding-left: 0;
}

.card-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.card-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.formula {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
}

.formula * {
    font-weight: bold;
}

/* 环境配置步骤 */
.setup-steps {
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.step-card:hover {
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.step-content > p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.step-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.step-note a {
    color: var(--primary-color);
    text-decoration: none;
}

.step-note a:hover {
    text-decoration: underline;
}

/* 代码块 */
.code-block {
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.code-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #1e293b;
    color: white;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.code-block code::selection {
    background: rgba(99, 102, 241, 0.3);
}

.setup-tips {
    max-width: 900px;
    margin: 3rem auto 0;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.setup-tips h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.setup-tips i {
    color: var(--primary-color);
}

.setup-tips ul {
    list-style: none;
    padding-left: 0;
}

.setup-tips li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.setup-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.setup-tips code {
    background: var(--bg-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.setup-tips a {
    color: var(--primary-color);
    text-decoration: none;
}

.setup-tips a:hover {
    text-decoration: underline;
}

/* 主布局（全局侧边栏 + 内容区域） */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* 全局侧边栏 */
.global-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 内容区域 */
.content-area {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 2rem;
    min-height: 600px;
}

/* 内容页面 */
.content-page {
    animation: fadeIn 0.3s ease;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* 页面访问量统计样式 */
.page-view-count {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1rem;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.page-view-count i {
    color: var(--primary-color);
    font-size: 1rem;
}

.page-view-count .view-text {
    color: var(--text-light);
}

.page-view-count .view-text strong {
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 4px;
}

.page-view-count .view-separator {
    color: var(--border-color);
    margin: 0 4px;
}

@media (max-width: 768px) {
    .page-view-count {
        flex-wrap: wrap;
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .page-view-count .view-separator {
        display: none;
    }
}

.page-content {
    padding: 1rem 0;
}

/* Demo演示部分（保留兼容性） */
.demo-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

/* 侧边栏 */
.demo-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: default;
}

.sidebar-title.sidebar-toggle {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: var(--bg-alt);
    border-bottom: none;
}

.sidebar-title.sidebar-toggle:hover {
    background: var(--border-color);
}

.sidebar-title.sidebar-toggle.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-title.sidebar-toggle.active i {
    color: white;
}

.sidebar-title i {
    color: var(--primary-color);
    transition: transform 0.2s;
}

.sidebar-title.sidebar-toggle .fa-chevron-down,
.sidebar-title.sidebar-toggle .fa-chevron-right {
    font-size: 0.75rem;
    margin-right: 0.25rem;
    transition: transform 0.2s;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.sidebar-item:hover {
    background: var(--bg-alt);
    color: var(--primary-color);
}

.sidebar-item:hover i {
    color: var(--primary-color);
}

.sidebar-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow);
}

.sidebar-item.active i {
    color: white;
}

/* 全局侧边栏样式（与demo-sidebar共享） */
.global-sidebar .sidebar-section,
.global-sidebar .sidebar-title,
.global-sidebar .sidebar-menu,
.global-sidebar .sidebar-item {
    /* 继承demo-sidebar的样式 */
}

/* 主内容区 */
.demo-main {
    min-height: 500px;
}

.demo-content {
    display: none;
}

.demo-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-description {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.demo-description h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.demo-description p {
    color: var(--text-light);
}

.demo-code {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.demo-run {
    margin-top: 2rem;
}

.demo-output {
    margin-top: 1rem;
    padding: 1rem;
    background: #1e293b;
    border-radius: 8px;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    display: none;
}

.demo-output.active {
    display: block;
}

.demo-output::before {
    content: '输出:';
    display: block;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* 页脚 */
.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-tagline {
        font-size: 1.8rem;
        padding: 0.6rem 1.5rem;
        letter-spacing: 0.1em;
    }

    .hero-description {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .theory-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }

    .main-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .global-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
        max-height: none;
    }

    .demo-layout {
        grid-template-columns: 1fr;
    }

    .demo-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-tagline {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
        letter-spacing: 0.08em;
    }

    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Grid World 网格样式 */
.grid-world-container {
    display: inline-block;
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.grid-world-table {
    border-collapse: separate;
    border-spacing: 2px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
}

.grid-world-table td {
    width: 65px;
    height: 65px;
    border: none;
    text-align: center;
    vertical-align: middle;
    background-color: #ffffff;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.grid-world-table td.start {
    background: linear-gradient(135deg, #a8dadc 0%, #7fb8c0 100%);
    color: #1d3557;
    box-shadow: 0 2px 6px rgba(168, 218, 220, 0.3);
}

.grid-world-table td.goal {
    background: linear-gradient(135deg, #b8e6b8 0%, #9dd89d 100%);
    color: #1d3557;
    box-shadow: 0 2px 6px rgba(184, 230, 184, 0.3);
}

.grid-world-table td.hole {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    color: #374151;
    box-shadow: 0 2px 6px rgba(156, 163, 175, 0.2);
}

.grid-world-table td.empty {
    background-color: #ffffff;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.grid-world-table td.agent {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    color: #78350f;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.3);
}

.grid-world-table td.value {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    font-size: 13px;
    color: #3730a3;
    font-weight: 500;
}

.grid-world-legend {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #4b5563;
}

.grid-world-legend span {
    display: inline-block;
    margin: 5px 8px;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

/* 新增样式: 美化入门教程 */

/* 1. Feature Cards Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* 2. Concept Flow (Timeline/Flowchart) */
.concept-flow {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 3rem 0;
    position: relative;
}

.flow-step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--border-color);
    transition: all 0.3s ease;
}

.flow-step:hover {
    border-left-color: var(--primary-color);
    transform: translateX(10px);
}

.flow-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.flow-content {
    flex: 1;
    min-width: 0;
}

.flow-code {
    margin-top: 1rem;
    background: #1e293b;
    border-radius: 8px;
    padding: 1.2rem;
    color: #e2e8f0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    border-left: 4px solid var(--primary-color);
    overflow-x: auto;
}

/* 简单的语法高亮类 */
.k { color: #c586c0; } /* keyword */
.f { color: #dcdcaa; } /* function */
.s { color: #ce9178; } /* string */
.c { color: #6a9955; font-style: italic; } /* comment */
.n { color: #9cdcfe; } /* variable */
.v { color: #b5cea8; } /* value */

.flow-arrow {
    position: absolute;
    left: 50%;
    bottom: -2rem;
    font-size: 1.5rem;
    color: var(--text-light);
    z-index: 1;
}

/* 3. Code Window */
.code-window {
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    margin: 2rem 0;
}

.window-header {
    background: #0f172a;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.window-title {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-left: 1rem;
    font-family: monospace;
}

/* 4. Interactive Playground (Placeholder style) */
.playground-area {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    color: #64748b;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.playground-area::after {
    content: 'Interactive Demo Area';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    opacity: 0.5;
}
