:root {
    --primary-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --accent: #2c9aff;

    /* Light Theme */
    --bg: #fafafa;
    --text: #1d1d1f;
    --text-muted: #86868b;
    --glass: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    --wallpaper:
        radial-gradient(circle at 10% 20%, rgba(200, 230, 255, 0.8) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(240, 200, 255, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 250, 230, 0.5) 0%, transparent 60%),
        #eef2f5;
    --card-bg: rgba(255, 255, 255, 0.5);
}

body.dark-mode {
    --bg: #000000;
    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --glass: rgba(30, 30, 30, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    --wallpaper:
        radial-gradient(circle at 15% 25%, rgba(0, 80, 160, 0.7) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(120, 20, 100, 0.5) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(10, 20, 40, 0.8) 0%, transparent 70%),
        #0a0a0d;
    --card-bg: rgba(20, 20, 20, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--primary-font);
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.tip-gray {
    color: var(--text-muted) !important;
}

/* ----------------------
   Nav (Retrofit from DockMinimize)
   ---------------------- */
.top-nav {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.top-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

body.dark-mode .logo-img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.2));
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-actions {
    display: flex;
    gap: 12px;
}

.nav-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0;
    width: 40px;
    height: 34px;
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.2, 0, 0.4, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

#lang-toggle {
    width: 48px;
}

.nav-btn:hover {
    background: rgba(128, 128, 128, 0.1);
    transform: translateY(-1px);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text);
    opacity: 0.8;
}

.lang-text {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.8;
}

/* ----------------------
   Playground (The Interactive Hero)
   ---------------------- */
.playground {
    padding-top: 120px;
    padding-bottom: 40px;
}

.simulator {
    height: 480px;
    position: relative;
    background: var(--wallpaper);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Softer shadow, no border */
    overflow: hidden;
    margin-bottom: 50px;
}

/* Hitbox Triggers */
.left-trigger,
.right-trigger {
    position: absolute;
    top: 0;
    width: 120px;
    /* Generous hover area */
    height: 100%;
    z-index: 50;
    cursor: auto;
    display: none;
}

.simulator.docked-left .left-trigger {
    display: block;
    left: 0;
}

.simulator.docked-right .right-trigger {
    display: block;
    right: 0;
}

.mac-window {
    width: 420px;
    height: 300px;
    background: var(--glass);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: absolute;
    display: flex;
    flex-direction: column;
    z-index: 45;

    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
}

.mac-window.no-transition {
    transition: none !important;
}

/* 2. 快照条 (与窗口一样高) */
.sidebar-indicator {
    position: absolute;
    height: 300px;
    /* 同高 */
    width: 6px;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    /* 交给 left-trigger 捕获鼠标 */
    transition: opacity 0.3s ease;
}

.sidebar-indicator.left {
    left: 0;
}

.sidebar-indicator.right {
    right: 0;
}

.indicator-line {
    width: 100%;
    height: 100%;
    background: var(--glass);
    backdrop-filter: blur(10px);
    animation: breatheLine 3s infinite ease-in-out;
    transform-origin: center center;
}

body.dark-mode .indicator-line {
    background: rgba(255, 255, 255, 0.4);
}

.sidebar-indicator.left .indicator-line {
    border-radius: 0 6px 6px 0;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.05);
}

.sidebar-indicator.right .indicator-line {
    border-radius: 6px 0 0 6px;
    box-shadow: -1px 0 5px rgba(0, 0, 0, 0.05);
}

@keyframes breatheLine {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.96);
    }
}


/* -- Javascript 驱动的折叠状态 -- */

/* Docked Left */
.simulator.docked-left .mac-window {
    transform: translateX(-450px) !important;
    opacity: 0;
    pointer-events: none;
}

.simulator.docked-left .sidebar-indicator.left {
    opacity: 0.8;
}

.simulator.docked-left .left-trigger:hover~.mac-window,
.simulator.docked-left .mac-window:hover {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.simulator.docked-left .left-trigger:hover~.sidebar-indicator.left,
.simulator.docked-left .mac-window:hover~.sidebar-indicator.left {
    opacity: 0 !important;
}

/* Docked Right */
.simulator.docked-right .mac-window {
    transform: translateX(450px) !important;
    opacity: 0;
    pointer-events: none;
}

.simulator.docked-right .sidebar-indicator.right {
    opacity: 0.8;
}

.simulator.docked-right .right-trigger:hover~.mac-window,
.simulator.docked-right .mac-window:hover {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.simulator.docked-right .right-trigger:hover~.sidebar-indicator.right,
.simulator.docked-right .mac-window:hover~.sidebar-indicator.right {
    opacity: 0 !important;
}

/* 演示窗体内部的假UI */
.window-header {
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: grab;
    position: relative;
}

.window-header:active {
    cursor: grabbing;
}

/* Drag Hint Orb */
.drag-hint-orb {
    position: absolute;
    right: 50%;
    top: 50%;
    transform: translate(50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(44, 154, 255, 0.7);
    animation: pingHint 2s infinite ease-in-out;
    opacity: 0.9;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drag-hint-orb.hidden {
    opacity: 0 !important;
    animation: none !important;
}

@keyframes pingHint {
    0% {
        transform: translate(50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(44, 154, 255, 0.7);
    }

    70% {
        transform: translate(50%, -50%) scale(1);
        box-shadow: 0 0 0 15px rgba(44, 154, 255, 0);
    }

    100% {
        transform: translate(50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(44, 154, 255, 0);
    }
}

.traffic-lights {
    display: flex;
    gap: 8px;
}

.light {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.light.red {
    background: #ff5f56;
}

.light.yellow {
    background: #ffbd2e;
}

.light.green {
    background: #27c93f;
}

.window-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 48px;
    pointer-events: none;
}

.window-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-line {
    height: 10px;
    background: rgba(128, 128, 128, 0.1);
    border-radius: 6px;
    width: 85%;
}

.text-line.highlight {
    background: rgba(44, 154, 255, 0.15);
    width: 60%;
    height: 14px;
    margin-bottom: 6px;
}

.text-line.sh {
    width: 40%;
}

.text-line.long {
    width: 95%;
}

/* 提示语 */
.demo-prompt {
    position: absolute;
    bottom: 30px;
    right: 40px;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.4);
    opacity: 0;
    animation: fadeInPrompt 1s ease 1.5s forwards;
}

@keyframes fadeInPrompt {
    to {
        opacity: 0.8;
    }
}

.prompt-text-group {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-left: 20px;
    min-width: 380px;
    max-width: 450px;
    white-space: normal;
    /* Space reserved for the dot */
}

.prompt-dot-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 100%;
}

.pulse-dot {
    position: absolute;
    top: 9px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
    transition: top 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.4);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.prompt-line {
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    transform-origin: left center;
}

.prompt-line.line-1 {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.prompt-line.line-2 {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.simulator.docked-left .demo-prompt .prompt-line.line-1,
.simulator.docked-right .demo-prompt .prompt-line.line-1 {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.simulator.docked-left .demo-prompt .prompt-line.line-2,
.simulator.docked-right .demo-prompt .prompt-line.line-2 {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.simulator.docked-left .demo-prompt .pulse-dot,
.simulator.docked-right .demo-prompt .pulse-dot {
    top: 32px;
}

.demo-hint-text {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: -36px;
    margin-bottom: 40px;
    padding-right: 18px;
    font-style: italic;
}


/* Hero CTA */
h1 {
    font-size: 3.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: -0.01em;
    max-width: 600px;
    line-height: 1.6;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.main-cta {
    background: var(--text);
    color: var(--bg);
    padding: 14px 36px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: transform 0.2s;
}

.main-cta:hover {
    transform: scale(1.03);
}

.tip {
    font-size: 0.85rem;
}


/* ----------------------
   Bento Grids (Features)
   ---------------------- */
.features {
    padding: 40px 0 80px 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.06);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(44, 154, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 800px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.2rem;
    }
}


/* ----------------------
   Section Headers
   ---------------------- */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}


/* ----------------------
   Footer (Retrofit)
   ---------------------- */
footer {
    padding: 60px 0 30px 0;
}

.footer-content {
    margin-bottom: 40px;
    padding: 40px 24px;
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.footer-text,
.footer-links {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.footer-highlight {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.footer-highlight:hover {
    text-decoration: underline;
    color: var(--text);
}

.beian {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    opacity: 0.7;
}

.beian a {
    color: inherit;
    text-decoration: none;
    font-weight: 400;
}

.beian a:hover {
    text-decoration: underline;
}