/* Cursor 汉化工具主题页专用样式 */

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.04);
    color: var(--foreground-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
    transition: background var(--t-fast) var(--ease-expo-out), border-color var(--t-fast) var(--ease-expo-out), color var(--t-fast) var(--ease-expo-out), transform var(--t-fast) var(--ease-expo-out);
}

.theme-toggle:hover {
    color: var(--foreground);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}

.theme-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.55), 0 0 0 4px rgba(5, 5, 6, 0.95);
}

.theme-toggle i {
    font-size: 16px;
    line-height: 1;
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .fa-sun {
    display: inline-block;
}

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

@media (min-width: 769px) {
    .header-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .header-left {
        justify-self: start;
    }

    .nav {
        justify-self: center;
    }

    .header-actions {
        justify-self: end;
    }
}

.nav a {
    font-weight: 600;
}

.github-link {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.04);
    color: var(--foreground-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
    transition: background var(--t-fast) var(--ease-expo-out), border-color var(--t-fast) var(--ease-expo-out), color var(--t-fast) var(--ease-expo-out), transform var(--t-fast) var(--ease-expo-out);
}

.github-link:hover {
    color: var(--foreground);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}

.github-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.55), 0 0 0 4px rgba(5, 5, 6, 0.95);
}

.github-link i {
    font-size: 18px;
    line-height: 1;
}

.mobile-nav-github {
    width: 100%;
    min-height: 48px;
}

@media (max-width: 768px) {
    .mobile-nav-links a {
        font-weight: 600;
    }

    .mobile-nav-github {
        font-size: 16px;
        font-weight: 600;
    }

    .theme-toggle--mobile {
        width: 100%;
        min-height: 46px;
        height: auto;
        padding: 12px 14px;
        justify-content: center;
        gap: 10px;
        border-radius: 12px;
    }

    .theme-toggle--mobile .theme-toggle-label {
        font-size: 16px;
        color: var(--foreground);
    }

    .theme-toggle:not(.theme-toggle--mobile) {
        display: none;
    }
}

.header.is-scrolled {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 18px 60px rgba(0, 0, 0, 0.55);
}

.brand-tag-icon {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    filter: brightness(0) invert(1);
    opacity: 0.72;
    vertical-align: -2px;
}

.hero {
    background: transparent;
    border-bottom: 1px solid var(--border-default);
    padding: 84px 0 72px;
    text-align: center;
    position: relative;
    overflow: clip;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-stripes {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.035) 2px,
        rgba(255, 255, 255, 0.035) 4px
    );
    mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
}

.hero-bg-mesh {
    position: absolute;
    inset: -15%;
    background:
        radial-gradient(ellipse 68% 42% at 50% -4%, rgba(255, 255, 255, 0.06), transparent 72%),
        radial-gradient(ellipse 36% 28% at 50% 92%, rgba(255, 255, 255, 0.03), transparent 76%);
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(ellipse 92% 72% at 50% 28%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 92% 72% at 50% 28%, #000 0%, transparent 78%);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    will-change: transform;
    animation: hero-orb-float 14s ease-in-out infinite;
}

.hero-orb--1 {
    width: 520px;
    height: 380px;
    left: calc(50% - 260px);
    top: -10%;
    background: rgba(255, 255, 255, 0.05);
}

.hero-orb--2 {
    width: 300px;
    height: 300px;
    left: 4%;
    top: 32%;
    background: rgba(255, 255, 255, 0.03);
    animation-delay: -4.5s;
}

.hero-orb--3 {
    width: 340px;
    height: 340px;
    right: 2%;
    top: 24%;
    background: rgba(255, 255, 255, 0.025);
    animation-delay: -9s;
}

.hero-bg-beam {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(960px, 86%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0.08),
        transparent
    );
    box-shadow:
        0 0 40px 16px rgba(255, 255, 255, 0.03),
        0 0 80px 32px rgba(255, 255, 255, 0.02);
}

.hero-bg-fade {
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--background-base));
}

@keyframes hero-orb-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, -22px, 0) scale(1.05); }
}

.hero::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background:
        radial-gradient(480px circle at var(--hx, 50%) var(--hy, 35%), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 48%, transparent 68%);
    mix-blend-mode: screen;
    animation: hero-ambient 11s ease-in-out infinite;
    z-index: 1;
}

@keyframes hero-ambient {
    0%, 100% { filter: saturate(1) brightness(1); transform: translate3d(0,0,0); }
    50% { filter: saturate(1.15) brightness(1.06); transform: translate3d(0, -2px, 0); }
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-container--stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
}

.hero-content {
    max-width: 720px;
    width: 100%;
}

.brand-tag--hero {
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(36px, 4.8vw, 56px);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0.96) 42%, rgba(255,255,255,0.84));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 10px rgba(0,0,0,0.22);
}

.hero-title .text-primary {
    background: linear-gradient(
        90deg,
        rgba(96, 118, 255, 1),
        rgba(212, 222, 255, 1),
        rgba(72, 82, 198, 1)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 260% 100%;
    animation: accent-shimmer 5200ms linear infinite;
}

@keyframes accent-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    margin: 24px 0 20px;
    color: rgba(237, 237, 239, 0.78);
    font-size: 17px;
    line-height: 1.65;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: rgba(237, 237, 239, 0.52);
}

.hero-meta li {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.hero-meta li:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin-left: 24px;
    background: rgba(255, 255, 255, 0.12);
}

.hero-meta strong {
    color: rgba(237, 237, 239, 0.82);
    font-weight: 600;
}

body.is-ready .hero-title,
body.is-ready .hero-subtitle,
body.is-ready .hero-meta,
body.is-ready .hero-cta-row,
body.is-ready .hero-showcase {
    animation: hero-in 720ms var(--ease-expo-out) both;
}

body.is-ready .brand-tag--hero { animation: hero-in 720ms var(--ease-expo-out) both; animation-delay: 0ms; }
body.is-ready .hero-title { animation-delay: 60ms; }
body.is-ready .hero-subtitle { animation-delay: 120ms; }
body.is-ready .hero-meta { animation-delay: 150ms; }
body.is-ready .hero-cta-row { animation-delay: 200ms; }
body.is-ready .hero-showcase { animation-delay: 260ms; }

@keyframes hero-in {
    from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.99); filter: blur(6px); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0px); }
}

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

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.hero-note {
    margin: 0;
    font-size: 13px;
    color: rgba(237, 237, 239, 0.52);
}

.hero-showcase {
    position: relative;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.hero-showcase-frame {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 8px;
    background: transparent;
    filter:
        drop-shadow(0 20px 56px rgba(0, 0, 0, 0.34))
        drop-shadow(0 8px 22px rgba(0, 0, 0, 0.20));
}

.hero-showcase-frame::before {
    display: none;
}

.hero-carousel {
    position: relative;
}

.hero-carousel-track {
    position: relative;
}

.hero-carousel-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 640ms var(--ease-expo-out), visibility 640ms;
}

.hero-carousel-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-carousel-slide:not(.is-active) {
    position: absolute;
    inset: 0;
}

.hero-carousel-slide img {
    display: block;
    width: 100%;
    height: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    clip-path: inset(1.4% 1.4% 1.4% 1.4% round 6px);
}

.hero-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
}

.hero-carousel-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease, width 200ms ease;
}

.hero-carousel-dot.is-active {
    width: 22px;
    border-radius: 4px;
    background: var(--accent, #5e6ad2);
}

.hero-carousel-dot:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.42);
}

.scroll-down-hint {
    width: 50px;
    height: 50px;
    margin: 48px auto 0;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(237,237,239,0.94);
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.08), 0 10px 28px rgba(0,0,0,0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: arrow-float 1600ms ease-in-out infinite;
}

@keyframes arrow-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.intro-panel {
    padding: 32px 34px;
    text-align: left;
}

.intro-lead {
    color: rgba(237, 237, 239, 0.82);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 18px;
}

.intro-lead:last-of-type {
    margin-bottom: 28px;
}

.intro-coverage h3 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-default);
}

.coverage-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.coverage-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: rgba(237, 237, 239, 0.78);
    line-height: 1.6;
}

.coverage-list i {
    margin-top: 4px;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--foreground-muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-default);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.10);
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tags span {
    font-size: 12px;
    color: rgba(255,255,255,0.82);
    background: rgba(94,106,210,0.10);
    border: 1px solid rgba(94,106,210,0.24);
    border-radius: 999px;
    padding: 3px 10px;
    font-weight: 700;
}

.feature-card--wide {
    grid-column: 1 / -1;
}

@media (min-width: 769px) {
    .feature-card--wide {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 18px;
        align-items: start;
    }

    .feature-card--wide .feature-icon {
        grid-row: 1 / span 2;
        margin-bottom: 0;
    }

    .feature-card--wide h3 {
        grid-column: 2;
        margin-bottom: 0;
    }

    .feature-card--wide p {
        grid-column: 2;
    }

    .feature-card--wide .feature-tags {
        grid-column: 2;
    }
}

.guide-flow {
    margin: 0 auto;
    padding: 34px 38px 38px;
    text-align: left;
}

.guide-flow.card:hover {
    transform: none;
}

.guide-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-timeline-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 18px 22px;
    padding-bottom: 28px;
    position: relative;
}

.guide-timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(94, 106, 210, 0.38), rgba(94, 106, 210, 0.08));
    border-radius: 999px;
}

.guide-timeline-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: rgba(210, 220, 255, 0.98);
    background: rgba(94, 106, 210, 0.18);
    border: 1px solid rgba(94, 106, 210, 0.32);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.guide-timeline-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.35;
}

.guide-timeline-body p {
    font-size: 15px;
    color: var(--foreground-muted);
    line-height: 1.7;
    margin: 0;
}

.guide-supplement {
    padding-top: 8px;
    border-top: 1px solid var(--border-default);
}

.guide-supplement-label {
    margin: 0 0 22px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(237, 237, 239, 0.42);
}

.guide-supplement-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 26px;
}

.guide-supplement-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 14px 18px;
    align-items: start;
}

.guide-supplement-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 15px;
    margin-top: 2px;
}

.guide-supplement-body h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.guide-supplement-body p {
    margin: 0;
    font-size: 15px;
    color: var(--foreground-muted);
    line-height: 1.7;
}

.guide-supplement-body ol {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
    color: rgba(237, 237, 239, 0.78);
    font-size: 15px;
    line-height: 1.65;
}

code,
kbd {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(210, 220, 255, 0.95);
}

.code-block {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-default);
    overflow-x: auto;
}

.code-block code {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre;
    display: block;
}

.faq-container {
    margin: 0 auto;
    padding: 34px 38px 38px;
    overflow: hidden;
    text-align: left;
}

.faq-container.card:hover {
    transform: none;
}

.faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    counter-reset: faq-counter;
}

.faq-item + .faq-item {
    border-top: 1px solid var(--border-default);
    margin-top: 22px;
    padding-top: 22px;
}

.faq-body h3::before {
    counter-increment: faq-counter;
    content: counter(faq-counter) ". ";
    color: var(--accent);
}

.faq-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.faq-body {
    min-width: 0;
}

.faq-body p {
    margin: 0;
    color: var(--foreground-muted);
    font-size: 15px;
    line-height: 1.7;
}

.faq-body .code-block {
    margin-top: 14px;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 76px;
        padding-bottom: 48px;
    }

    .hero-container--stacked {
        gap: 32px;
    }

    .hero-orb--1 {
        width: 360px;
        height: 260px;
        left: calc(50% - 180px);
    }

    .hero-orb--2,
    .hero-orb--3 {
        width: 220px;
        height: 220px;
        opacity: 0.75;
    }

    .hero-title {
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        color: #f2f5ff;
        -webkit-text-fill-color: #f2f5ff;
    }

    .hero-title .text-primary {
        background: none;
        -webkit-background-clip: border-box;
        background-clip: border-box;
        color: #bcc8ff;
        -webkit-text-fill-color: #bcc8ff;
        animation: none;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-meta {
        gap: 8px 16px;
        margin-bottom: 22px;
        font-size: 12px;
    }

    .hero-meta li:not(:last-child)::after {
        margin-left: 16px;
    }

    .brand-tag--hero {
        margin-bottom: 18px;
    }

    .intro-panel {
        padding: 22px 18px;
    }

    .guide-flow {
        padding: 22px 18px 24px;
    }

    .faq-container {
        padding: 18px 16px 20px;
        overflow: visible;
    }

    .faq-item + .faq-item {
        margin-top: 18px;
        padding-top: 18px;
    }

    .faq-body h3 {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 6px;
    }

    .faq-body p {
        font-size: 14px;
        line-height: 1.65;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .faq-body kbd {
        font-size: 0.82em;
        padding: 1px 5px;
        vertical-align: baseline;
    }

    .faq-body p code {
        font-size: 0.88em;
        padding: 1px 5px;
        word-break: break-all;
    }

    .faq-body .code-block {
        margin-top: 12px;
        padding: 12px 14px;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .faq-body .code-block code {
        font-size: 11px;
        line-height: 1.55;
        white-space: pre-wrap;
        word-break: break-all;
    }

    .guide-timeline-item {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 14px 16px;
    }

    .guide-timeline-marker {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .guide-timeline-item:not(:last-child)::after {
        left: 17px;
        top: 40px;
    }

    .feature-card--wide {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-title .text-primary,
    body.is-ready .hero-title,
    body.is-ready .hero-subtitle,
    body.is-ready .hero-meta,
    body.is-ready .hero-cta-row,
    body.is-ready .hero-showcase,
    body.is-ready .brand-tag--hero {
        animation: none;
    }

    .hero::before {
        animation: none;
    }

    .hero-orb {
        animation: none;
    }

    .scroll-down-hint {
        animation: none;
    }

    .hero-carousel-slide {
        transition: none;
    }
}
