/* Extension landing: extension.html — 浅色底 #F3EFE6，与首页品牌色对齐 */

body.extension-landing {
    --brand: #dc2626;
    --brand-hover: #b91c1c;
    --bg-color: #f3efe6;
    --bg-elevated: #faf8f4;
    --text-color: #1a1a1a;
    --title-color: #0a0a0a;
    --secondary-text-color: #404040;
    --muted-text-color: #5c5c5c;
    --border-color: #e4ddd2;
    --link-color: #dc2626;
    --link-hover-color: #b91c1c;
    --card-bg: #fffcf7;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --bar-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    --chrome-frame: #ece8e0;
    --chrome-bar: #f0ebe3;
    font-family:
        'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: 3.5rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
    width: 100%;
}

html.dark-mode body.extension-landing {
    --bg-color: #1a1816;
    --bg-elevated: #22201d;
    --text-color: rgba(240, 236, 230, 0.9);
    --title-color: rgba(255, 252, 248, 0.96);
    --secondary-text-color: rgba(200, 195, 188, 0.75);
    --muted-text-color: rgba(150, 145, 138, 0.65);
    --border-color: #3a3530;
    --link-color: #f87171;
    --link-hover-color: #fca5a5;
    --card-bg: #242220;
    --shadow-color: rgba(0, 0, 0, 0.45);
    --chrome-frame: #2c2926;
    --chrome-bar: #32302c;
}

html:lang(zh-CN) body.extension-landing {
    font-family:
        'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei',
        'Noto Sans SC', ui-sans-serif, system-ui, sans-serif;
}

html:lang(zh-TW) body.extension-landing {
    font-family:
        'Inter', 'PingFang TC', 'Hiragino Sans TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei',
        'Noto Sans TC', ui-sans-serif, system-ui, sans-serif;
}

html:lang(ja) body.extension-landing {
    font-family:
        'Inter', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', YuGothic,
        Meiryo, ui-sans-serif, system-ui, sans-serif;
}

html:lang(ru) body.extension-landing {
    font-family:
        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
        ui-sans-serif, system-ui, sans-serif;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--bar-shadow);
}

.site-header a.site-brand {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.02em;
}

.site-header a.site-brand:hover {
    color: var(--link-color);
}

.site-header-inner {
    max-width: min(72rem, 97vw);
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.site-header-tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ext-site-brand .ext-site-brand__hover {
    display: none;
}

.ext-site-brand:hover .ext-site-brand__idle,
.ext-site-brand:focus-visible .ext-site-brand__idle {
    display: none;
}

.ext-site-brand:hover .ext-site-brand__hover,
.ext-site-brand:focus-visible .ext-site-brand__hover {
    display: inline;
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
}

.theme-switch:hover {
    border-color: var(--link-color);
    color: var(--link-color);
}

.theme-switch svg {
    width: 1.1rem;
    height: 1.1rem;
}

.theme-switch .sun-icon,
.theme-switch .moon-icon,
.theme-switch .auto-icon {
    display: none;
}

.theme-switch[data-theme-pref="light"] .sun-icon { display: block; }
.theme-switch[data-theme-pref="dark"] .moon-icon { display: block; }
.theme-switch[data-theme-pref="auto"] .auto-icon { display: block; }

.language-switch-wrapper {
    position: relative;
}

.language-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
}

.language-switch:hover {
    border-color: var(--link-color);
    color: var(--link-color);
}

.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    min-width: 12rem;
    max-height: 18rem;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px var(--shadow-color);
    z-index: 1200;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--bg-elevated);
}

.language-option.active {
    color: var(--link-color);
    font-weight: 600;
}

.ext-main {
    max-width: min(48rem, 94vw);
    margin: 0 auto;
    padding: 1.25rem 1.25rem 3rem;
}

.ext-hero {
    text-align: center;
    margin-bottom: 1.75rem;
}

/* Hero 主预览：透视 + 悬停抬升 + 视差倾角 */
.ext-hero-tilt {
    perspective: 1000px;
    perspective-origin: 50% 50%;
    max-width: min(100%, 44rem);
    margin: 0 auto 1.5rem;
    padding: 0.35rem;
}

.ext-hero-tilt-inner {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    border-radius: 12px;
    will-change: transform;
}

.ext-hero-tilt.is-active .ext-hero-tilt-inner {
    box-shadow: 0 20px 50px var(--shadow-color);
}

.ext-hero-tilt .browser-chrome {
    margin: 0;
    transition: box-shadow 0.3s ease;
}

.ext-hero h1 {
    font-size: clamp(1.5rem, 4.5vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 0.65rem;
    color: var(--title-color);
}

.ext-hero .ext-lead {
    font-size: 1.05rem;
    color: var(--secondary-text-color);
    margin: 0 auto 1.25rem;
    max-width: 38rem;
}

.ext-muted,
.ext-instructions,
.ext-footer-mini {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--muted-text-color);
}

.ext-cta-chrome-icon {
    flex-shrink: 0;
    display: block;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.ext-cta-block {
    max-width: 32rem;
    margin: 0 auto;
}

.ext-cta-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.ext-cta-primary,
.ext-cta-secondary {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    font-weight: 600;
    font-size: 0.94rem;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s;
}

.ext-cta-primary--with-icon {
    gap: 0.5rem;
}

.ext-cta-primary {
    background: var(--brand);
    color: #fff !important;
    border: 2px solid var(--brand);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.28);
}

.ext-cta-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    box-shadow: 0 5px 16px rgba(220, 38, 38, 0.38);
    transform: translateY(-1px);
}

.ext-cta-secondary {
    color: var(--text-color) !important;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    font-weight: 600;
}

.ext-cta-secondary:hover {
    border-color: var(--link-color);
    color: var(--link-color) !important;
    transform: translateY(-1px);
}

.ext-instructions {
    margin-top: 1.5rem;
    text-align: left;
}

.ext-steps-block {
    margin-bottom: 1.1rem;
    padding: 0.9rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.ext-steps-block:last-child {
    margin-bottom: 0;
}

.ext-steps-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-text-color);
    margin: 0 0 0.4rem;
}

.ext-steps-body {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--muted-text-color);
}

.ext-steps-body .ext-ol,
.ext-ol {
    margin: 0;
    padding-left: 1.1rem;
}

.ext-steps-body .ext-ol li,
.ext-ol li {
    margin: 0.2rem 0;
}

.ext-steps-body strong,
.ext-ol strong {
    color: var(--secondary-text-color);
    font-weight: 600;
}

.ext-steps-body code,
.ext-ol code {
    font-size: 0.85em;
    padding: 0.1em 0.3em;
    border-radius: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--secondary-text-color);
}

.ext-blog-notes {
    margin-top: 2.25rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem 0.5rem;
    text-align: left;
}

.ext-blog-notes-body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--secondary-text-color);
}

.ext-blog-notes-body a {
    color: var(--link-color);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.ext-blog-notes-body a:hover {
    color: var(--link-hover-color);
}

.ext-blog-notes-body cite {
    font-style: normal;
}

/* macOS 风格「浏览器」窗框 */
.browser-chrome {
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--chrome-frame);
    box-shadow: 0 12px 40px var(--shadow-color);
    max-width: 100%;
}

.browser-chrome .browser-titlebar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.4rem;
    padding: 0.45rem 0.75rem;
    background: var(--chrome-bar);
    border-bottom: 1px solid var(--border-color);
}

.browser-chrome .traffic {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.browser-chrome .traffic span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: block;
}

.browser-chrome .traffic .t-red { background: #ff5f57; }
.browser-chrome .traffic .t-yellow { background: #febc2e; }
.browser-chrome .traffic .t-green { background: #28c840; }

.browser-chrome .fake-url {
    flex: 1;
    min-width: 0;
    font-size: 0.7rem;
    color: var(--muted-text-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browser-chrome .browser-viewport {
    line-height: 0;
    background: #fff;
}

html.dark-mode .browser-chrome .browser-viewport {
    background: #0f0f0f;
}

.browser-chrome .browser-viewport img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.ext-footer-mini {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.ext-footer-mini a {
    color: var(--link-color);
}

@media (max-width: 640px) {
    .ext-cta-row {
        flex-direction: column;
    }
}

.ext-hero-tilt .browser-chrome {
    box-shadow: 0 8px 28px var(--shadow-color);
}
