:root {
    --primary-color: #5d5fef;
    --secondary-color: #a5a6f6;
    --text-color: #1e293b;
    --light-text: #64748b;
    --bg-color: #ffffff;
    --card-bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px; /* 统一全站最大可视宽度 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Header & Navigation (Global Definitive Styles)
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px; /* 固定高度，全站统一 */
    z-index: 2000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

header nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width); /* 强制使用 1200px */
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    transition: var(--transition);
}

.logo-container:hover {
    opacity: 0.8;
}

.logo-img {
    width: 34px;
    height: 34px;
    display: block;
}

.logo-container span {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.8rem; /* 统一导航间距 */
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.05rem; /* 统一文字大小 */
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    width: 100%;
}

/* ==========================================================================
   Container & Layout Unity
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.doc-container {
    max-width: var(--max-width);
    margin: 100px auto 4rem; /* 确保不被固定 header 遮挡 */
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    width: 100%;
}

.sidebar {
    position: sticky;
    top: 6rem;
    height: calc(100vh - 8rem);
    overflow-y: auto;
    padding-right: 1rem;
    border-right: 1px solid #f1f5f9;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--light-text);
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-weight: 700;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(93, 95, 239, 0.08);
    color: var(--primary-color);
}

.doc-content {
    min-width: 0;
}

.doc-section {
    margin-bottom: 4rem;
    scroll-margin-top: 8rem;
}

.doc-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.doc-section h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.doc-section p {
    margin-bottom: 1.2rem;
    color: #475569;
    line-height: 1.8;
}

.doc-section strong {
    color: var(--text-color);
}

.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    position: relative;
}

.code-block::before {
    content: "Terminal";
    position: absolute;
    top: 0;
    right: 1.5rem;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    padding: 0.2rem 0;
}

/* Footer Unity */
/* ==========================================================================
   Footer (Global Unity)
   ========================================================================== */
footer {
    background: #f8fafc;
    padding: 4rem 0 2rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 6rem;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--light-text);
    margin-top: 1rem;
    max-width: 300px;
    line-height: 1.8;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 0.9rem;
}

@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Unity */
.hero {
    padding: 12rem 0 6rem; /* 增加顶部间距，防止 header 遮挡 */
    background: radial-gradient(circle at top right, rgba(93, 95, 239, 0.05), transparent 40%);
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 4rem;
    justify-content: flex-start; /* 改为 flex-start 确保单列时不被推开 */
}

.hero-content {
    flex: 1;
    max-width: 850px; /* 稍微增加宽度，适应长标题 */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    background: linear-gradient(90deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--light-text);
    margin-bottom: 2.5rem;
}

.hero-image-wrapper {
    flex: 0 0 500px; /* 固定宽度或比例，防止挤压文字 */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.software-screenshot {
    width: 100%;
    max-width: 600px;
    border-radius: 1.25rem;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 18px 36px -18px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 5;
    transform: rotateY(-5deg) rotateX(5deg); /* 初始 3D 偏转 */
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.software-screenshot:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.03);
    box-shadow: 0 40px 80px -12px rgba(93, 95, 239, 0.3);
}

.aurora-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(93, 95, 239, 0.3) 0%, rgba(192, 132, 252, 0.2) 40%, transparent 70%);
    filter: blur(60px);
    z-index: 1;
    animation: aurora-move 10s infinite alternate ease-in-out;
}

.floating-logo-box {
    position: absolute;
    bottom: -20px;
    right: -20px;
    z-index: 10;
    animation: float-logo 4s infinite ease-in-out;
}

.hero-logo-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

/* Animations */
@keyframes dynamic-float {
    0% { transform: translateY(0) rotateY(-5deg) rotateX(5deg); }
    100% { transform: translateY(-20px) rotateY(-3deg) rotateX(3deg); }
}

.dynamic-float {
    animation: dynamic-float 6s infinite alternate ease-in-out;
}

@keyframes float-logo {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes aurora-move {
    0% { transform: translate(-10%, -10%) scale(1); opacity: 0.5; }
    100% { transform: translate(10%, 10%) scale(1.2); opacity: 0.8; }
}

@media (max-width: 968px) {
    .hero-image-wrapper {
        margin-top: 3rem;
    }
    .aurora-glow {
        width: 300px;
        height: 300px;
    }
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(93, 95, 239, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93, 95, 239, 0.4);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e5e5e5;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    background-color: #ffffff;
    box-shadow: var(--shadow);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Unified Detailed Footer */
/* Innovative Download Hero Styles */
.dl-hero-innovative {
    flex: 0 0 500px; /* 锁定宽度，防止挤压文字 */
    position: relative;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    margin-left: auto;
}

.device-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.device-item {
    position: absolute;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
    object-fit: cover;
}

.device-main {
    width: 380px; /* 缩小尺寸 */
    z-index: 3;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotateY(-20deg) rotateX(10deg);
    animation: float-main 5s infinite alternate ease-in-out;
}

.device-sub-1 {
    width: 280px; /* 缩小尺寸 */
    z-index: 2;
    left: -10%;
    top: 10%;
    opacity: 0.6;
    transform: rotateY(25deg) translateZ(-150px);
    animation: float-sub-1 7s infinite alternate ease-in-out;
}

.device-sub-2 {
    width: 240px; /* 缩小尺寸 */
    z-index: 1;
    left: 5%;
    bottom: 5%;
    opacity: 0.4;
    transform: rotateY(15deg) translateZ(-250px);
    animation: float-sub-2 6s infinite alternate ease-in-out;
}

.tech-grid-bg {
    position: absolute;
    width: 120%;
    height: 120%;
    background-image: 
        linear-gradient(rgba(93, 95, 239, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(93, 95, 239, 0.08) 1px, transparent 1px);
    background-size: 30px 30px;
    transform: rotateX(70deg) translateZ(-200px);
    z-index: 0;
    opacity: 0.5;
}

@keyframes float-main {
    from { transform: translateY(-50%) rotateY(-20deg) rotateX(10deg); }
    to { transform: translateY(-55%) rotateY(-15deg) rotateX(5deg); }
}

@keyframes float-sub-1 {
    from { transform: rotateY(25deg) translateZ(-150px) translateY(0); }
    to { transform: rotateY(30deg) translateZ(-120px) translateY(20px); }
}

@keyframes float-sub-2 {
    from { transform: rotateY(15deg) translateZ(-250px) translateX(0); }
    to { transform: rotateY(20deg) translateZ(-220px) translateX(-15px); }
}


/* Download Page Specific */
.dl-section {
    background: var(--white);
    border-radius: 2rem;
    padding: 3.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.dl-section.featured {
    border: 2px solid var(--primary-color);
}

.dl-badge {
    position: absolute;
    top: 22px;
    right: -45px;
    background: var(--primary-color);
    color: white;
    width: 180px;
    text-align: center;
    line-height: 32px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.dl-badge.archived {
    background: #94a3b8;
}

.dl-badge.core {
    background: #10b981;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.platform-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1.25rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.platform-card:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.platform-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.github-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.github-link:hover {
    color: var(--primary-color);
}

.github-desc {
    font-size: 0.85rem;
    color: var(--light-text);
    max-width: 600px;
}

/* Changelog Styles */
.changelog-container {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.changelog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.changelog-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed #f1f5f9;
}

.changelog-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.version-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: underline;
}

.version-date {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0.3rem 0 0.8rem;
}

.version-content {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.7;
}

/* New User-Friendly Download Table */
.notice-box {
    background: #1a1500;
    border: 1px solid #332b00;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #e2e8f0;
}

.notice-title {
    color: #fbbf24;
    font-weight: 700;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notice-list {
    list-style: none;
    padding-left: 0;
}

.notice-list li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.2rem;
}

.notice-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #fbbf24;
}

.dl-table-container {
    background: #111827;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 3rem;
}

.dl-table {
    width: 100%;
    border-collapse: collapse;
    color: #f3f4f6;
}

.dl-table th {
    text-align: left;
    padding: 1.2rem 1.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid #374151;
}

.dl-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #1f2937;
    vertical-align: middle;
}

.arch-badge {
    background: #374151;
    color: #9ca3af;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.how-to-choose {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #9ca3af;
}

.how-to-choose strong {
    color: #f3f4f6;
}

.btn-dl-pink {
    background: #d946ef;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.package-manager {
    margin-top: 3rem;
}

.pm-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pm-label {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.pm-code {
    background: #000;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.8rem;
    }
    .hero-btns {
        justify-content: center;
    }
    .hero-image::after {
        width: 300px;
        height: 300px;
    }
}

/* Tutorial Sidebar Layout */
.tutorial-layout {
    max-width: 1300px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    padding: 0 2rem;
    align-items: flex-start;
}

.tutorial-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
    padding-right: 1.5rem;
}

.sidebar-group {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: block;
    padding: 0.6rem 1rem;
    color: #64748b;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    background: #f1f5f9;
    color: var(--primary-color);
    font-weight: 600;
}

.tutorial-content {
    background: #fff;
    padding: 2rem 3rem;
    border-radius: 1rem;
    min-height: 800px;
}

.tutorial-right-nav {
    position: sticky;
    top: 100px;
    padding-left: 1.5rem;
    border-left: 1px solid #e2e8f0;
}

.right-nav-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 1200px) {
    .tutorial-layout {
        grid-template-columns: 240px 1fr;
    }
    .tutorial-right-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .tutorial-layout {
        grid-template-columns: 1fr;
    }
    .tutorial-sidebar {
        display: none;
    }
}

/* End of CSS */
