/* ===== CSS Variables ===== */
:root {
    /* Colors - Inversa inspired */
    --color-black: #13140e;
    --color-black-2: #181813;
    --color-black-3: #0d0e0a;
    --color-creme: #f4f3e8;
    --color-grey: #595a51;
    --color-grey-2: #404040;
    --color-yellow: #ebfc72;
    --color-yellow-2: #bacd31;
    --color-red: #f1664d;
    --color-green: #00d399;
    --color-purple: #c084fc;
    --color-blue: #60a5fa;

    /* Typography */
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;

    /* Animation - Enhanced timing functions */
    --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
    --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(235, 252, 114, 0.15);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--color-black);
    color: var(--color-creme);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Loader ===== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--color-black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.6s ease-out;
}

/* 光波效果 */
.loader-wave {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(235, 252, 114, 0.3) 0%, rgba(235, 252, 114, 0.1) 40%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    will-change: width, height;
    transition: width 0.1s ease-out, height 0.1s ease-out;
}

.loader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(235, 252, 114, 0.05) 0%, transparent 70%);
    animation: loaderGlow 2s ease-in-out infinite;
}

@keyframes loaderGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.loader-content {
    text-align: center;
    position: relative;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-yellow);
    letter-spacing: 0.5em;
    margin-bottom: var(--space-sm);
    text-shadow: 0 0 60px rgba(235, 252, 114, 0.5);
    position: relative;
    z-index: 10;
}

.loader-subtitle {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-creme);
    letter-spacing: 0.3em;
    margin-bottom: var(--space-lg);
    opacity: 0.8;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.loader-subtitle.fade-out {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
}

/* 飞行logo的样式 */
#flyingLogo {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    will-change: transform;
    white-space: nowrap;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.loader-char {
    display: inline-block;
    animation: loaderPulse 1.2s ease-in-out infinite;
    transform-origin: center bottom;
}

.loader-char:nth-child(2) { animation-delay: 0.15s; }
.loader-char:nth-child(3) { animation-delay: 0.3s; }

@keyframes loaderPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-12px) scale(1.1);
        text-shadow: 0 0 40px rgba(235, 252, 114, 0.8);
    }
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: var(--color-grey-2);
    margin: 0 auto var(--space-md);
    overflow: hidden;
    border-radius: 3px;
    position: relative;
    transition: opacity 0.3s ease-out;
}

.loader-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(235, 252, 114, 0.3), transparent);
    animation: loaderShimmer 1.5s ease-in-out infinite;
}

@keyframes loaderShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-yellow), var(--color-green));
    width: 0;
    transition: width 0.3s ease-out;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(235, 252, 114, 0.5);
}

.loader-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--color-grey);
    letter-spacing: 0.15em;
    transition: opacity 0.3s ease-out;
}

/* Exit animation */
.loader.exit .loader-content {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
}

.loader.exit {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.loader.hidden {
    visibility: hidden;
    pointer-events: none;
}

/* ===== Custom Cursor ===== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    pointer-events: none;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

.cursor-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(244, 243, 232, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease, opacity 0.2s ease;
}

.cursor-progress {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-yellow) calc(var(--scroll-progress, 0) * 360deg),
        transparent calc(var(--scroll-progress, 0) * 360deg)
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
    transition: opacity 0.2s ease;
}

.cursor-text {
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--color-yellow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* 悬停在容器上时隐藏光标 */
.custom-cursor.on-container .cursor-ring,
.custom-cursor.on-container .cursor-progress,
.custom-cursor.on-container .cursor-text {
    opacity: 0;
    transform: scale(0.5);
}

.custom-cursor.hover .cursor-ring {
    border-color: var(--color-yellow);
    transform: scale(1.2);
}

.custom-cursor.hover .cursor-text {
    opacity: 0;
    transform: scale(0.8);
}

@media (max-width: 768px) {
    .custom-cursor {
        display: none;
    }
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, var(--color-black), transparent);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-yellow);
    letter-spacing: 0.1em;
    transition: opacity 0.15s ease-out;
    backface-visibility: hidden;
}

.nav {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-creme);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-yellow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--color-yellow);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-github {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-creme);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav { display: none; }
    .menu-toggle { display: flex; }
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--color-black);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
}

.mobile-nav-link {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(244, 243, 232, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(244, 243, 232, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--color-yellow);
    top: -200px;
    right: -100px;
    opacity: 0.15;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: var(--color-green);
    bottom: -100px;
    left: -100px;
    opacity: 0.1;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--color-grey-2);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.fork-link {
    color: var(--color-yellow);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.fork-link:hover {
    color: var(--color-green);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-green);
    border-radius: 50%;
}

.badge-dot.blink {
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
}

.title-highlight {
    color: var(--color-yellow);
    font-family: var(--font-mono);
}

.hero-text {
    font-size: 1.125rem;
    color: rgba(244, 243, 232, 0.7);
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-text strong {
    color: var(--color-yellow);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--color-yellow);
    color: var(--color-black);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    box-shadow: 0 4px 20px rgba(235, 252, 114, 0.3);
}

.btn-primary:hover {
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
    background: var(--color-yellow-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(235, 252, 114, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(235, 252, 114, 0.3);
}

.btn-secondary {
    border: 1px solid var(--color-grey);
    color: var(--color-creme);
}

.btn-secondary:hover {
    border-color: var(--color-yellow);
    color: var(--color-yellow);
}

.btn-outline {
    border: 1px solid var(--color-grey);
    color: var(--color-creme);
}

.btn-outline:hover {
    border-color: var(--color-yellow);
    color: var(--color-yellow);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

/* ===== Stats ===== */
.hero-stats {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-yellow);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-grey);
}

/* ===== Terminal ===== */
.hero-terminal {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.terminal {
    background: var(--color-black-2);
    border: 1px solid var(--color-grey-2);
    border-radius: 8px;
    overflow: hidden;
    width: 500px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5);
}

.terminal-large {
    width: 100%;
    max-width: 700px;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-black-3);
    border-bottom: 1px solid var(--color-grey-2);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-grey);
}

.terminal-body {
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
}

.terminal-line {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.prompt {
    color: var(--color-green);
    user-select: none;
}

.command {
    color: var(--color-creme);
}

.command.highlight {
    color: var(--color-yellow);
}

.output {
    padding-left: var(--space-md);
}

.output.error {
    color: var(--color-red);
}

.output.success {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.suggestion {
    color: var(--color-green);
}

.hint {
    color: var(--color-grey);
    font-size: 0.75rem;
}

@media (max-width: 1200px) {
    .hero-terminal {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: var(--space-2xl);
    }

    .terminal {
        width: 100%;
        max-width: 500px;
    }
}

/* ===== Sections ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-yellow);
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.section-text {
    color: rgba(244, 243, 232, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Features Section ===== */
.features {
    padding: var(--space-3xl) 0;
    background: var(--color-black-2);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-grey-2), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-xl);
    border: 1px solid var(--color-grey-2);
    border-radius: 12px;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    background: var(--color-black);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-green) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: var(--color-black);
    z-index: 1;
    transition: background 0.4s ease;
}

.feature-card > * {
    position: relative;
    z-index: 2;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover::after {
    background: var(--color-black-2);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(235, 252, 114, 0.15), rgba(0, 211, 153, 0.1));
    border-radius: 12px;
    margin-bottom: var(--space-md);
    color: var(--color-yellow);
    transition: all 0.4s var(--ease-smooth);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 0 20px rgba(235, 252, 114, 0.3);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-text {
    color: rgba(244, 243, 232, 0.7);
    font-size: 0.9375rem;
}

/* ===== Demo Section ===== */
.demo {
    padding: var(--space-3xl) 0;
}

.demo-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    align-items: start;
}

@media (max-width: 900px) {
    .demo-content {
        grid-template-columns: 1fr;
    }
}

.demo-examples {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.demo-example {
    padding: var(--space-md);
    border: 1px solid var(--color-grey-2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-example:hover,
.demo-example.active {
    border-color: var(--color-yellow);
    background: rgba(235, 252, 114, 0.05);
}

.demo-example-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
}

.demo-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-yellow);
}

.demo-name {
    font-weight: 600;
}

.demo-desc {
    font-size: 0.875rem;
    color: var(--color-grey);
}

.demo-terminal {
    position: sticky;
    top: 100px;
}

/* ===== Rules Section ===== */
.rules {
    padding: var(--space-3xl) 0;
    background: var(--color-black-2);
}

.rules-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.rule-category {
    padding: var(--space-lg);
    border: 1px solid var(--color-grey-2);
    border-radius: 8px;
    background: var(--color-black);
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(235, 252, 114, 0.1);
    border-radius: 8px;
    color: var(--color-yellow);
}

.category-icon svg {
    width: 20px;
    height: 20px;
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag {
    padding: 4px 12px;
    background: var(--color-black-2);
    border: 1px solid var(--color-grey-2);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-creme);
}

.rules-cta {
    text-align: center;
}

/* ===== Install Section ===== */
.install {
    padding: var(--space-3xl) 0;
}

.install-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.install-method {
    padding: var(--space-lg);
    border: 1px solid var(--color-grey-2);
    border-radius: 8px;
    background: var(--color-black-2);
}

.install-primary {
    border-color: var(--color-yellow);
    background: rgba(235, 252, 114, 0.05);
}

.method-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.method-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.method-badge {
    padding: 4px 12px;
    background: var(--color-yellow);
    color: var(--color-black);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.code-block {
    position: relative;
    background: var(--color-black);
    border: 1px solid var(--color-grey-2);
    border-radius: 8px;
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.code-block pre {
    padding: var(--space-md);
    padding-right: var(--space-2xl);
    overflow-x: auto;
    white-space: pre;
    scrollbar-width: thin;
    scrollbar-color: var(--color-grey-2) transparent;
    margin: 0;
}

.code-block pre::-webkit-scrollbar {
    height: 4px;
}

.code-block pre::-webkit-scrollbar-track {
    background: transparent;
}

.code-block pre::-webkit-scrollbar-thumb {
    background: var(--color-grey-2);
    border-radius: 2px;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-green);
    line-height: 1.6;
    white-space: pre;
}

.copy-btn {
    position: absolute;
    top: 50%;
    right: var(--space-sm);
    transform: translateY(-50%);
    padding: var(--space-xs);
    color: var(--color-grey);
    transition: color 0.3s ease;
}

.copy-btn:hover {
    color: var(--color-yellow);
}

.copy-btn.copied {
    color: var(--color-green);
}

.method-note {
    font-size: 0.8125rem;
    color: var(--color-grey);
}

.install-tip {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(235, 252, 114, 0.05);
    border: 1px solid var(--color-yellow);
    border-radius: 8px;
    margin-top: var(--space-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tip-icon {
    color: var(--color-yellow);
    flex-shrink: 0;
}

.tip-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.tip-text {
    font-size: 0.875rem;
    color: rgba(244, 243, 232, 0.7);
}

.tip-text code {
    font-family: var(--font-mono);
    background: var(--color-black);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8125rem;
}

/* ===== CTA Section ===== */
.cta {
    padding: var(--space-3xl) 0;
    background: linear-gradient(to bottom, var(--color-black-2), var(--color-black));
    text-align: center;
}

.cta-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.cta-text {
    color: rgba(244, 243, 232, 0.7);
    margin-bottom: var(--space-xl);
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid var(--color-grey-2);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-yellow);
    display: block;
    margin-bottom: var(--space-sm);
}

.footer-tagline {
    color: var(--color-grey);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-grey);
    margin-bottom: var(--space-xs);
}

.footer-col a {
    font-size: 0.875rem;
    color: var(--color-creme);
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--color-yellow);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-grey-2);
    font-size: 0.8125rem;
    color: var(--color-grey);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.credit a {
    color: var(--color-yellow);
}

/* ===== Utilities ===== */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.3; }
}

/* Initially hidden elements - 由 JS 控制入场动画 */
.hero-badge,
.hero-title,
.hero-text,
.hero-actions,
.hero-stats,
.hero-terminal {
    opacity: 0;
    transform: translateY(40px);
}

.header {
    opacity: 0;
    transform: translateY(-15px);
}

.grid-pattern {
    opacity: 0;
}

/* Loaded state - header 和背景 */
body.loaded .header {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s var(--ease-smooth);
}

body.loaded .grid-pattern {
    opacity: 1;
    transition: opacity 0.8s ease 0.1s;
}

/* Glow animation */
body.loaded .glow-1 {
    animation: glowPulse 4s ease-in-out infinite;
}

body.loaded .glow-2 {
    animation: glowPulse 5s ease-in-out infinite 1s;
}

/* Terminal cursor blink */
.terminal .command.typing::after {
    content: '▋';
    animation: cursorBlink 1s step-end infinite;
    margin-left: 2px;
    color: var(--color-yellow);
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Smooth scroll reveal for sections */
.features,
.demo,
.rules,
.install,
.cta {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-smooth);
}

.features.visible,
.demo.visible,
.rules.visible,
.install.visible,
.cta.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button hover effects enhancement */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Page transition overlay */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--color-yellow);
    z-index: 9998;
    transform: scaleY(0);
    transform-origin: bottom;
    pointer-events: none;
}

/* ===== Enhanced Mobile Styles ===== */
@media (max-width: 768px) {
    /* Better mobile header */
    .header {
        padding: var(--space-sm) var(--space-md);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background: rgba(19, 20, 14, 0.9);
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Mobile menu enhancements */
    .mobile-menu {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background: rgba(19, 20, 14, 0.95);
    }

    .mobile-nav-link {
        font-size: 1.75rem;
        padding: var(--space-sm) 0;
        position: relative;
        overflow: hidden;
    }

    .mobile-nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--color-yellow);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .mobile-nav-link:hover::after,
    .mobile-nav-link:active::after {
        width: 60px;
    }

    /* Hero section mobile */
    .hero {
        padding: var(--space-2xl) var(--space-md);
        min-height: auto;
        padding-top: 100px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .title-highlight {
        font-size: 2.5rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: var(--space-lg);
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Terminal mobile */
    .terminal {
        width: 100%;
        border-radius: 12px;
    }

    .terminal-body {
        font-size: 0.75rem;
        padding: var(--space-sm);
        overflow-x: auto;
    }

    /* Features grid mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .feature-card {
        padding: var(--space-lg);
    }

    /* Demo section mobile */
    .demo-content {
        grid-template-columns: 1fr;
    }

    .demo-examples {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .demo-example {
        flex: 1;
        min-width: 120px;
        padding: var(--space-sm);
        text-align: center;
    }

    .demo-example-title {
        font-size: 0.875rem;
    }

    /* Install section mobile */
    .install-methods {
        grid-template-columns: 1fr;
    }

    .install-method {
        padding: var(--space-md);
    }

    .code-block {
        font-size: 0.75rem;
        padding: var(--space-sm);
    }

    .install-tip {
        flex-direction: column;
        text-align: center;
    }

    /* Footer mobile */
    .footer-top {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        gap: var(--space-lg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2rem;
        --space-2xl: 3rem;
        --space-3xl: 5rem;
    }

    .hero-title {
        font-size: 1.875rem;
    }

    .title-highlight {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .terminal-body {
        font-size: 0.6875rem;
    }

    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8125rem;
    }
}

/* ===== Scroll-triggered Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-smooth);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s var(--ease-smooth);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s var(--ease-smooth);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s var(--ease-smooth);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s var(--ease-smooth);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Floating Animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: linear-gradient(135deg, var(--color-yellow), var(--color-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Glassmorphism ===== */
.glass {
    background: rgba(24, 24, 19, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 243, 232, 0.1);
}

/* ===== Enhanced Terminal Glow ===== */
.terminal {
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(244, 243, 232, 0.05);
}

.terminal:hover {
    box-shadow:
        0 60px 120px -20px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(235, 252, 114, 0.1),
        inset 0 1px 0 rgba(244, 243, 232, 0.08);
    transform: translateY(-4px);
    transition: all 0.4s var(--ease-smooth);
}

/* ===== Touch-friendly enhancements ===== */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .feature-card:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.98);
    }

    .feature-card:active {
        transform: scale(0.98);
    }

    /* Larger tap targets */
    .nav-link,
    .mobile-nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===== Print styles ===== */
@media print {
    .loader,
    .custom-cursor,
    .header,
    .mobile-menu {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
