/* ==========================================================
   DouYinVideo 茶茶 — Cinematic Editorial Theme
   A warm, atmospheric interface with film-grain texture,
   amber/coral accents, and editorial typography.
   Supports both Dark (default) and Light modes.
   ========================================================== */

/* ===== Custom Properties — Dark Theme (default) ===== */
:root {
    --c-bg: #08080c;
    --c-surface: #111118;
    --c-surface-2: #18182200;
    --c-surface-hi: #1e1e2a;
    --c-border: rgba(255, 255, 255, 0.06);
    --c-border-hi: rgba(240, 160, 80, 0.25);
    --c-accent: #f0a050;
    --c-accent-2: #e8634a;
    --c-accent-soft: rgba(240, 160, 80, 0.12);
    --c-text: #e4e0db;
    --c-text-dim: #807a72;
    --c-text-muted: #5a564f;
    --c-success: #5ad89a;
    --c-warning: #f0a050;
    --c-danger: #e85454;
    --radius: 14px;
    --radius-sm: 8px;
    --font-display: 'DM Serif Display', 'Noto Serif SC', Georgia, serif;
    --font-body: 'Outfit', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Theme-specific extras */
    --c-input-bg: rgba(255, 255, 255, 0.03);
    --c-navbar-bg: rgba(8, 8, 12, 0.7);
    --c-grain-opacity: 0.35;
    --c-glow-warm: rgba(240, 160, 80, 0.06);
    --c-glow-coral: rgba(232, 99, 74, 0.04);
    --c-shadow: rgba(0, 0, 0, 0.4);
    --c-scrollbar: rgba(240, 160, 80, 0.2);
    --c-selection: rgba(240, 160, 80, 0.25);
    --c-code-bg: rgba(255, 255, 255, 0.05);
    --c-overlay: rgba(0, 0, 0, 0.7);
    --c-json-bg: rgba(0, 0, 0, 0.3);
    --c-json-text: #a09888;
    --c-badge-text: #fff;
    --c-step-bg: rgba(240, 160, 80, 0.03);
    --c-step-border: rgba(240, 160, 80, 0.08);
    --c-method-bg: rgba(255, 255, 255, 0.02);
    --c-method-border: rgba(255, 255, 255, 0.06);
    --c-tab-active-bg: linear-gradient(135deg, var(--c-accent), #e86030);
    --c-mobile-step-bg: rgba(255, 255, 255, 0.02);
    --c-qr-wrap-bg: #fff;
}

/* ===== Custom Properties — Light Theme ===== */
[data-theme="light"] {
    --c-bg: #f6f3ee;
    --c-surface: #ffffff;
    --c-surface-2: #faf8f5;
    --c-surface-hi: #f0ece6;
    --c-border: rgba(0, 0, 0, 0.08);
    --c-border-hi: rgba(200, 120, 40, 0.3);
    --c-accent: #c87830;
    --c-accent-2: #c0503a;
    --c-accent-soft: rgba(200, 120, 48, 0.1);
    --c-text: #2a2520;
    --c-text-dim: #7a7068;
    --c-text-muted: #a09890;
    --c-success: #2a9d5c;
    --c-warning: #c87830;
    --c-danger: #c43c3c;

    --c-input-bg: rgba(0, 0, 0, 0.025);
    --c-navbar-bg: rgba(246, 243, 238, 0.85);
    --c-grain-opacity: 0.08;
    --c-glow-warm: rgba(200, 120, 48, 0.05);
    --c-glow-coral: rgba(192, 80, 58, 0.03);
    --c-shadow: rgba(0, 0, 0, 0.08);
    --c-scrollbar: rgba(200, 120, 48, 0.25);
    --c-selection: rgba(200, 120, 48, 0.2);
    --c-code-bg: rgba(0, 0, 0, 0.04);
    --c-overlay: rgba(255, 255, 255, 0.85);
    --c-json-bg: rgba(0, 0, 0, 0.03);
    --c-json-text: #6a5f55;
    --c-badge-text: #fff;
    --c-step-bg: rgba(200, 120, 48, 0.04);
    --c-step-border: rgba(200, 120, 48, 0.1);
    --c-method-bg: rgba(0, 0, 0, 0.015);
    --c-method-border: rgba(0, 0, 0, 0.06);
    --c-tab-active-bg: linear-gradient(135deg, var(--c-accent), #c0503a);
    --c-mobile-step-bg: rgba(0, 0, 0, 0.02);
    --c-qr-wrap-bg: #fff;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Atmospheric background: radial warmth + noise grain */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, var(--c-glow-warm) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 90%, var(--c-glow-coral) 0%, transparent 60%);
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: var(--c-grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 128px 128px;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--c-scrollbar);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--c-accent);
}

/* Links */
a {
    color: var(--c-accent);
    text-decoration: none;
    transition: color .25s;
}

a:hover {
    color: var(--c-accent-2);
}

::selection {
    background: var(--c-selection);
    color: var(--c-text);
}

/* ===== Typography helpers ===== */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--c-text);
    letter-spacing: 0.01em;
}

.text-muted {
    color: var(--c-text-muted);
}

code {
    background: var(--c-code-bg);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== Keyframes ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navigation ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 2rem;
    background: var(--c-navbar-bg);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--c-border);
    animation: slideDown .5s var(--ease-out) both;
    transition: background .35s, border-color .35s;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240, 160, 80, 0.3), transparent);
}

.nav-brand a {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--c-text);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.02em;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    border-radius: 7px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    min-width: 0;
}

.nav-links a {
    color: var(--c-text-dim);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all .25s var(--ease-out);
    position: relative;
    border: 1px solid transparent;
}

.nav-more-trigger {
    color: var(--c-text-dim);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all .25s var(--ease-out);
    position: relative;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-body);
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-more {
    position: relative;
}

.nav-more-caret {
    font-size: 0.72rem;
    opacity: 0.85;
    transition: transform .2s var(--ease-out);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-more-trigger:hover,
.nav-more-trigger:focus-visible {
    color: var(--c-text);
    background: linear-gradient(135deg, rgba(240, 160, 80, 0.2), rgba(232, 99, 74, 0.12));
    border-color: rgba(240, 160, 80, 0.45);
    box-shadow: 0 6px 16px -10px rgba(240, 160, 80, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    outline: none;
}

.nav-links a.active {
    color: var(--c-accent);
    background: var(--c-accent-soft);
    border-color: rgba(240, 160, 80, 0.35);
}

.nav-more-trigger.active {
    color: var(--c-accent);
    background: var(--c-accent-soft);
    border-color: rgba(240, 160, 80, 0.35);
}

.nav-links a:active {
    transform: translateY(1px);
}

.nav-more-trigger:active {
    transform: translateY(1px);
}

.nav-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 132px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: color-mix(in srgb, var(--c-surface) 92%, transparent);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 120;
}

.nav-more-menu a {
    padding: 7px 10px;
}

.nav-more.open .nav-more-menu {
    display: flex;
}

.nav-more.open .nav-more-caret {
    transform: rotate(180deg);
}

/* ===== Container ===== */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 60px - 56px);
}

/* ===== Hero Parse (首屏核心区) ===== */
.hero-parse {
    text-align: center;
    padding: 3.5rem 0 2rem;
    animation: fadeUp .6s var(--ease-out) both;
    position: relative;
}

/* 顶部装饰光晕 */
.hero-parse::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 240px;
    background: radial-gradient(ellipse, rgba(240, 160, 80, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-parse-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--c-accent) 0%, #f7c891 40%, var(--c-accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.hero-parse-sub {
    color: var(--c-text-dim);
    font-size: 1rem;
    margin-bottom: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.04em;
}

/* 搜索输入框组 */
.hero-parse-form {
    max-width: 640px;
    margin: 0 auto;
}

.hero-input-wrap {
    display: flex;
    align-items: stretch;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
    box-shadow: 0 4px 32px -8px var(--c-shadow);
}

.hero-input-wrap:focus-within {
    border-color: rgba(240, 160, 80, 0.45);
    box-shadow:
        0 4px 32px -8px var(--c-shadow),
        0 0 0 4px rgba(240, 160, 80, 0.06),
        0 0 40px -8px rgba(240, 160, 80, 0.12);
}

/* 输入框区域（包裹 input + 清空按钮）*/
.hero-input-field {
    position: relative;
    flex: 1;
    display: flex;
    min-width: 0;
}

.hero-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px 24px;
    font-size: 1.02rem;
    color: var(--c-text);
    font-family: var(--font-body);
    outline: none;
    min-width: 0;
}

.hero-input-wrap input::placeholder {
    color: var(--c-text-muted);
    font-weight: 300;
}

/* 清空按钮 — 定位在输入框区域右上角内侧 */
.input-clear-btn {
    position: absolute;
    top: 4px;
    right: 2px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--c-text-muted);
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
    transition:
        opacity .2s var(--ease-out),
        transform .2s var(--ease-spring),
        background .15s,
        color .15s;
}

/* 有内容 + 鼠标悬停在输入框区域时显现 */
.hero-input-field.has-text:hover .input-clear-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* 按钮本身 hover：琥珀圆底 */
.input-clear-btn:hover {
    background: rgba(240, 160, 80, 0.15);
    color: var(--c-accent);
}

.input-clear-btn:active {
    transform: scale(0.82);
    background: rgba(240, 160, 80, 0.25);
}

.hero-parse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 28px;
    border: none;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter .2s, box-shadow .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-parse-btn:hover {
    filter: brightness(1.1);
}

.hero-parse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hero-parse-btn .btn-loading {
    display: inline-flex;
    align-items: center;
}

/* 解析结果区 */
.hero-result {
    max-width: 640px;
    margin: 1.4rem auto 0;
    padding: 1.2rem 1.4rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    text-align: left;
    animation: fadeUp .35s var(--ease-out) both;
}

.hero-result.parsing {
    text-align: center;
}

.hero-result .loading-text {
    color: var(--c-text-dim);
    font-size: 0.92rem;
    margin: 0;
    animation: glow-pulse 1.5s ease-in-out infinite;
}

.hero-result .error-text {
    color: var(--c-danger);
    font-size: 0.92rem;
    text-align: center;
    margin: 0;
}

/* 解析卡片 */
.parse-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.parse-cover {
    flex-shrink: 0;
    width: 160px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--c-surface-hi);
}

.parse-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parse-info {
    flex: 1;
    min-width: 220px;
    position: relative;
    padding-right: 54px;
}

.parse-desc {
    margin: 0 0 6px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--c-text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.parse-meta {
    margin: 0 0 6px;
    color: var(--c-text-dim);
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.parse-author {
    color: var(--c-accent);
    font-weight: 500;
}

.parse-dot {
    opacity: 0.4;
}

.parse-stats {
    margin: 0 0 12px;
    color: var(--c-text-muted);
    font-size: 0.8rem;
    display: flex;
    gap: 12px;
}

.parse-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.favorite-heart-btn,
.parse-favorite-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(28, 28, 28, 0.45);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s var(--ease-out), border-color .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.favorite-heart-btn .heart-icon,
.parse-favorite-btn .heart-icon {
    width: 18px;
    height: 18px;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill .2s ease, stroke .2s ease, transform .2s ease;
}

.favorite-heart-btn:hover,
.parse-favorite-btn:hover {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 8px 18px -10px rgba(240, 160, 80, 0.45);
}

.favorite-heart-btn.is-active,
.parse-favorite-btn.is-active {
    border-color: rgba(231, 76, 60, 0.55);
    background: rgba(231, 76, 60, 0.14);
    color: #e74c3c;
}

.favorite-heart-btn.is-active .heart-icon,
.parse-favorite-btn.is-active .heart-icon {
    fill: #e74c3c;
    stroke: #e74c3c;
}

.favorite-heart-btn.is-loading,
.parse-favorite-btn.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.favorite-heart-btn.is-loading .heart-icon,
.parse-favorite-btn.is-loading .heart-icon {
    transform: scale(0.9);
}

.detail-info {
    position: relative;
    padding-right: 54px;
}

.detail-favorite-btn {
    position: absolute;
    top: 0;
    right: 0;
}

.save-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s var(--ease-out);
    box-shadow: 0 2px 12px -2px rgba(240, 160, 80, 0.3);
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px -2px rgba(240, 160, 80, 0.4);
    filter: brightness(1.08);
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.save-btn.done {
    background: var(--c-success);
    box-shadow: 0 2px 12px -2px rgba(90, 216, 154, 0.3);
}

.dl-status {
    color: var(--c-text-dim);
    font-size: 0.82rem;
}

/* ===== 旧版 Hero（保留兼容）===== */
.hero {
    text-align: center;
    padding: 4rem 0 2.5rem;
    animation: fadeUp .7s var(--ease-out) both;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--c-accent) 0%, #f7c891 40%, var(--c-accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.6rem;
    line-height: 1.15;
}

.hero-sub {
    color: var(--c-text-dim);
    font-size: 1.05rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 300;
}

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    animation: fadeUp .7s var(--ease-out) .1s both;
}

.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.4rem 1.2rem;
    text-align: center;
    transition: border-color .3s, box-shadow .3s, transform .3s var(--ease-out);
}

.stat-card:hover {
    border-color: var(--c-border-hi);
    box-shadow: 0 0 40px -12px rgba(240, 160, 80, 0.1);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--c-accent);
    line-height: 1.1;
}

.stat-label {
    color: var(--c-text-dim);
    margin-top: 0.4rem;
    font-size: 0.88rem;
}

.stat-status {
    font-size: 1.15rem;
    font-weight: 600;
}

.status-ok {
    color: var(--c-success);
}

.status-warn {
    color: var(--c-warning);
}

/* Clickable stat card */
a.stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.stat-card-link:hover {
    transform: translateY(-3px);
    border-color: rgba(240, 160, 80, 0.45);
    box-shadow: 0 8px 28px -8px rgba(240, 160, 80, 0.18), 0 0 0 1px rgba(240, 160, 80, 0.08);
}

a.stat-card-link .stat-label {
    transition: color .25s;
}

a.stat-card-link:hover .stat-label {
    color: var(--c-accent);
}

/* ===== Feature Grid ===== */
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.4rem 0 1rem;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.section-head p {
    margin: 0;
    color: var(--c-text-dim);
    font-size: 0.84rem;
    letter-spacing: 0.02em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.feature-card {
    position: relative;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.6rem 1.3rem;
    color: var(--c-text);
    transition: all .35s var(--ease-out);
    cursor: pointer;
    overflow: hidden;
    animation: fadeUp .6s var(--ease-out) both;
}

.feature-card:nth-child(1) {
    animation-delay: .12s;
}

.feature-card:nth-child(2) {
    animation-delay: .18s;
}

.feature-card:nth-child(3) {
    animation-delay: .24s;
}

.feature-card:nth-child(4) {
    animation-delay: .30s;
}

.feature-card:nth-child(5) {
    animation-delay: .36s;
}

.feature-card:nth-child(6) {
    animation-delay: .42s;
}

/* Warm glow on hover */
.feature-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(240, 160, 80, 0.15), rgba(232, 99, 74, 0.08));
    opacity: 0;
    transition: opacity .35s;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    border-color: var(--c-border-hi);
    transform: translateY(-3px);
    box-shadow:
        0 12px 40px -8px rgba(240, 160, 80, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

.feature-card:focus-visible {
    outline: none;
    border-color: rgba(240, 160, 80, 0.5);
    box-shadow: 0 0 0 3px rgba(240, 160, 80, 0.18);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 0.7rem;
    position: relative;
    z-index: 1;
    filter: grayscale(0.15);
    width: 3.4rem;
    height: 3.4rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.feature-card:hover .feature-icon {
    filter: grayscale(0);
}

.feature-logo {
    width: 3.4rem;
    height: 3.4rem;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.65);
}

.feature-card h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.02rem;
    margin-bottom: 0.35rem;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--c-text-dim);
    font-size: 0.82rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.parse-doc-btn {
    margin-left: 8px;
}

.result-help-text {
    margin-top: 8px;
    font-size: 0.82rem;
}

.result-help-link {
    color: var(--c-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ===== Card (generic) ===== */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.6rem;
    margin-bottom: 1.5rem;
    animation: fadeUp .6s var(--ease-out) .2s both;
}

/* ===== Quick Parse Section ===== */
.quick-parse {
    position: relative;
}

.quick-parse h2 {
    font-family: var(--font-display);
}

.quick-parse p {
    color: var(--c-text-dim);
    font-size: 0.92rem;
    margin-bottom: 0;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--c-text-dim);
    font-size: 0.88rem;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 11px 15px;
    background: var(--c-input-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color .25s, box-shadow .25s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(240, 160, 80, 0.4);
    box-shadow: 0 0 0 3px rgba(240, 160, 80, 0.08), 0 0 20px -4px rgba(240, 160, 80, 0.12);
}

.input-lg {
    padding: 13px 18px;
    font-size: 1.05rem;
}

small {
    display: block;
    margin-top: 4px;
    color: var(--c-text-muted);
    font-size: 0.8rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--c-text-dim);
    opacity: 0.7;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

.form-row .flex-2 {
    flex: 2;
}

.form-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.inline-form {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.inline-form input {
    flex: 1;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    box-shadow: 0 2px 12px -2px rgba(240, 160, 80, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px -2px rgba(240, 160, 80, 0.4);
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.btn-success {
    background: var(--c-success);
    color: #111;
}

.btn-success:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--c-danger);
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-info {
    background: linear-gradient(135deg, #5b9bd5, #3a7cc2);
    color: #fff;
    box-shadow: 0 2px 12px -2px rgba(58, 124, 194, 0.3);
}

.btn-info:hover {
    box-shadow: 0 4px 20px -2px rgba(58, 124, 194, 0.4);
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--c-border);
    color: var(--c-text);
}

.btn-outline:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
}

.btn-sm {
    padding: 6px 13px;
    font-size: 0.82rem;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Alerts ===== */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.alert-error {
    background: rgba(232, 84, 84, 0.1);
    border: 1px solid rgba(232, 84, 84, 0.2);
    color: #f08080;
}

.alert-success {
    background: rgba(90, 216, 154, 0.1);
    border: 1px solid rgba(90, 216, 154, 0.2);
    color: var(--c-success);
}

/* ===== Page Title ===== */
.page-title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

/* ===== Detail Result ===== */
.detail-result .detail-header {
    display: flex;
    gap: 1.5rem;
}

.detail-cover {
    flex-shrink: 0;
    width: 240px;
}

.detail-cover img {
    width: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.detail-info {
    flex: 1;
}

.detail-desc {
    font-size: 1.08rem;
    margin-bottom: 1rem;
    line-height: 1.55;
}

.detail-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
    color: var(--c-text-dim);
    font-size: 0.88rem;
}

.badge {
    display: inline-block;
    padding: 3px 11px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.detail-author {
    margin-bottom: 0.8rem;
    font-size: 0.92rem;
}

.detail-stats {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
    font-size: 0.88rem;
}

.detail-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: var(--c-accent-soft);
    color: var(--c-accent);
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

.detail-links {
    display: flex;
    gap: 0.5rem;
}

/* ===== Work Grid ===== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.work-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s var(--ease-out);
}

.work-card:hover {
    border-color: var(--c-border-hi);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -8px var(--c-shadow);
}

.work-cover {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--ease-out);
}

.work-card:hover .work-cover img {
    transform: scale(1.05);
}

.work-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--c-overlay);
    backdrop-filter: blur(8px);
    color: var(--c-accent);
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
}

.work-info {
    padding: 0.9rem 1rem;
}

.work-desc {
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.work-meta {
    display: flex;
    gap: 0.8rem;
    font-size: 0.78rem;
    color: var(--c-text-dim);
}

/* ===== Data Table ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
    font-size: 0.88rem;
}

.data-table th {
    color: var(--c-text-dim);
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background .2s;
}

.data-table tbody tr:hover {
    background: rgba(240, 160, 80, 0.03);
}

.text-ellipsis {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Profile Styles ===== */
.profile-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-basic {
    flex: 1;
}

.profile-nickname {
    margin: 0 0 0.3rem;
    font-size: 1.4rem;
}

.profile-signature {
    color: var(--c-text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.5rem 0 0;
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(240, 160, 80, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(240, 160, 80, 0.1);
}

.stat-item {
    text-align: center;
    min-width: 70px;
}

.stat-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--c-accent);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--c-text-dim);
}

@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }
}

/* ===== Comment Styles ===== */
.comment-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.comment-result-header .section-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.comment-nickname {
    font-weight: 600;
    color: var(--c-accent);
}

.comment-text {
    max-width: 360px;
    line-height: 1.5;
}

.comment-img {
    display: block;
    max-width: 80px;
    max-height: 80px;
    margin-top: 0.3rem;
    border-radius: 4px;
    cursor: pointer;
}

.comment-sticker {
    display: inline-block;
    max-width: 40px;
    max-height: 40px;
    vertical-align: middle;
    margin-left: 0.3rem;
}

.comment-list {
    overflow-x: auto;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--c-text-dim);
}

/* ===== Comment Top 3 — Cinematic Podium ===== */
.data-table tbody tr.top-1,
.data-table tbody tr.top-2,
.data-table tbody tr.top-3 {
    position: relative;
    transition: background .4s, box-shadow .4s;
}

.data-table tbody tr.top-1 {
    background: linear-gradient(100deg, rgba(218, 165, 32, 0.14) 0%, rgba(218, 165, 32, 0.02) 60%);
    box-shadow: inset 3px 0 0 #daa520;
}

.data-table tbody tr.top-2 {
    background: linear-gradient(100deg, rgba(160, 170, 185, 0.12) 0%, rgba(160, 170, 185, 0.02) 60%);
    box-shadow: inset 3px 0 0 #8a9aad;
}

.data-table tbody tr.top-3 {
    background: linear-gradient(100deg, rgba(180, 120, 70, 0.12) 0%, rgba(180, 120, 70, 0.02) 60%);
    box-shadow: inset 3px 0 0 #b47846;
}

.data-table tbody tr.top-1:hover {
    background: linear-gradient(100deg, rgba(218, 165, 32, 0.22) 0%, rgba(218, 165, 32, 0.04) 60%);
}

.data-table tbody tr.top-2:hover {
    background: linear-gradient(100deg, rgba(160, 170, 185, 0.20) 0%, rgba(160, 170, 185, 0.04) 60%);
}

.data-table tbody tr.top-3:hover {
    background: linear-gradient(100deg, rgba(180, 120, 70, 0.20) 0%, rgba(180, 120, 70, 0.04) 60%);
}

/* Rank badge — replaces emoji with styled pill */
.col-idx {
    position: relative;
}

.data-table tbody tr.top-1 .col-idx,
.data-table tbody tr.top-2 .col-idx,
.data-table tbody tr.top-3 .col-idx {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    margin-right: 2px;
}

.rank-badge-1 {
    background: linear-gradient(135deg, #daa520 0%, #f5d060 50%, #c89018 100%);
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.35);
}

.rank-badge-2 {
    background: linear-gradient(135deg, #7a8a9d 0%, #b0bec5 50%, #6a7a8d 100%);
    box-shadow: 0 2px 8px rgba(130, 145, 160, 0.30);
}

.rank-badge-3 {
    background: linear-gradient(135deg, #a06030 0%, #cc8844 50%, #8a5020 100%);
    box-shadow: 0 2px 8px rgba(180, 120, 70, 0.30);
}

/* Likes highlight on podium rows */
.data-table tbody tr.top-1 .digg-count {
    color: #daa520;
    font-weight: 700;
}

.data-table tbody tr.top-2 .digg-count {
    color: #8a9aad;
    font-weight: 700;
}

.data-table tbody tr.top-3 .digg-count {
    color: #b47846;
    font-weight: 700;
}

/* ===== Comment Sort & Reset Buttons ===== */
.comment-actions {
    display: inline-flex;
    gap: 0.5rem;
}

.btn-sm.btn-filter,
.btn-sm.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    background: transparent;
    color: var(--c-text-dim);
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
}

.btn-sm.btn-filter:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
}

.btn-sm.btn-filter.active {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(240, 160, 80, 0.25);
}

.btn-sm.btn-reset {
    border-color: rgba(220, 60, 60, 0.25);
    color: var(--c-text-dim);
}

.btn-sm.btn-reset:hover {
    color: #dc3c3c;
    border-color: #dc3c3c;
    background: rgba(220, 60, 60, 0.06);
}

/* ===== JSON View ===== */
.json-toggle {
    cursor: pointer;
    color: var(--c-text-dim);
    padding: 8px 0;
    font-size: 0.88rem;
}

.json-toggle:hover {
    color: var(--c-text);
}

.json-view {
    background: var(--c-json-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    color: var(--c-json-text);
}

/* ===== Result Box ===== */
.result-box {
    margin-top: 1.2rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    animation: fadeUp .4s var(--ease-out) both;
}

.result-box .loading {
    color: var(--c-text-dim);
}

.result-box .success {
    color: var(--c-success);
}

.result-box .error {
    color: var(--c-danger);
}

/* ===== Video To Doc ===== */
.video-doc-dropzone {
    border: 2px dashed var(--c-accent);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(240, 160, 80, 0.14), rgba(240, 160, 80, 0.06)),
        var(--c-step-bg);
    box-shadow: inset 0 0 0 1px rgba(240, 160, 80, 0.22), 0 8px 20px rgba(0, 0, 0, 0.05);
    padding: 1.55rem 1.1rem;
    min-height: 156px;
    text-align: center;
    transition: border-color .25s, background .25s, box-shadow .25s, transform .2s;
}

.video-doc-dropzone.dragover {
    border-color: #ffbf77;
    background:
        linear-gradient(180deg, rgba(240, 160, 80, 0.18), rgba(240, 160, 80, 0.09)),
        var(--c-step-bg);
    box-shadow: inset 0 0 0 1px rgba(240, 160, 80, 0.32), 0 10px 24px rgba(240, 160, 80, 0.2);
    transform: translateY(-1px);
}

.video-doc-dropzone.disabled {
    opacity: 0.55;
    filter: grayscale(0.2);
    pointer-events: none;
}

.video-doc-drop-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--c-accent);
    margin-bottom: 0.42rem;
}

.video-doc-drop-sub {
    color: var(--c-text-dim);
    font-size: 0.88rem;
    margin-bottom: 0.95rem;
}

.video-doc-drop-actions {
    display: inline-flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.video-doc-file-meta {
    margin-top: 0.9rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface-2);
    font-size: 0.86rem;
    color: var(--c-text-dim);
    display: grid;
    gap: 0.35rem;
}

.video-doc-preview {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    max-height: 70vh;
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-code-bg);
    color: var(--c-text);
    line-height: 1.65;
    font-size: 0.86rem;
}

.video-doc-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--c-text-dim);
}

.video-doc-progress {
    margin-top: 0.5rem;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--c-input-bg);
    border: 1px solid var(--c-border);
    overflow: hidden;
}

.video-doc-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    transition: width .3s ease;
}

.video-doc-mode-select {
    min-width: 170px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
    padding: 0 10px;
    font-size: 0.86rem;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--c-text-dim);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 1.6rem 2rem;
    color: var(--c-text-muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--c-border);
    letter-spacing: 0.04em;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 0.7rem 1rem;
        gap: 0.4rem;
    }

    .nav-brand a {
        font-size: 1.18rem;
    }

    .nav-links {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .nav-more-trigger {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .nav-more-menu {
        position: static;
        min-width: 0;
        margin-top: 6px;
        padding: 0;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: transparent;
    }

    .nav-more.open .nav-more-menu {
        display: inline-flex;
        flex-direction: row;
        gap: 6px;
    }

    .nav-more-menu a {
        white-space: nowrap;
        padding: 6px 10px;
    }

    .container {
        padding: 1.2rem 1rem;
    }

    .hero-parse {
        padding: 2rem 0 1.5rem;
    }

    .hero-parse-title {
        font-size: 2rem;
    }

    .hero-parse-sub {
        font-size: 0.88rem;
        margin-bottom: 1.2rem;
    }

    .hero-input-wrap {
        border-radius: 14px;
        flex-direction: column;
    }

    .hero-input-wrap input {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .hero-parse-btn {
        padding: 13px 24px;
    }

    .hero-result {
        margin-left: 0;
        margin-right: 0;
        padding: 1rem;
    }

    .parse-cover {
        width: 100%;
        height: 160px;
    }

    .parse-card {
        flex-direction: column;
    }

    .hero {
        padding: 2.5rem 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-sub {
        font-size: 0.85rem;
        letter-spacing: 0.1em;
    }

    .detail-result .detail-header {
        flex-direction: column;
    }

    .detail-cover {
        width: 100%;
        max-height: 280px;
    }

    .form-row {
        flex-direction: column;
    }

    .inline-form {
        flex-direction: column;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
        margin-bottom: 0.85rem;
    }

    .section-head h2 {
        font-size: 1.08rem;
    }

    .section-head p {
        font-size: 0.8rem;
    }

    .feature-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .feature-icon,
    .feature-logo {
        width: 2.8rem;
        height: 2.8rem;
    }
}

@media (max-width: 480px) {
    .hero-parse-title {
        font-size: 1.7rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
    }

    .feature-card {
        padding: 1.1rem 1rem;
    }

    .feature-icon,
    .feature-logo {
        width: 2.45rem;
        height: 2.45rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .parse-doc-btn {
        margin-left: 0;
        margin-top: 8px;
    }

    .parse-info {
        padding-right: 44px;
    }

    .favorite-heart-btn,
    .parse-favorite-btn {
        width: 34px;
        height: 34px;
        top: 0;
        right: 0;
    }

    .detail-info {
        padding-right: 44px;
    }
}

/* ========== Cookie 引导样式 ========== */
.cookie-guide {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.guide-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 10px;
    background: var(--c-step-bg);
    border: 1px solid var(--c-step-border);
    transition: border-color 0.3s;
}

.guide-step:hover {
    border-color: var(--c-border-hi);
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-accent), #e86030);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content {
    flex: 1;
}

.step-content strong {
    font-size: 0.95rem;
    color: var(--c-text);
}

.step-content p {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
    color: var(--c-text-dim);
    line-height: 1.5;
}

.step-content kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    background: var(--c-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: inherit;
    color: var(--c-accent);
}

.btn-copy {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-copy:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.06);
}

/* Cookie 获取方式切换 */
.cookie-method {
    border: 1px solid var(--c-method-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.cookie-method:hover {
    border-color: var(--c-border-hi);
}

.method-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    background: var(--c-method-bg);
    transition: background 0.2s;
    user-select: none;
}

.method-header:hover {
    background: var(--c-step-bg);
}

.method-header strong {
    font-size: 0.92rem;
    color: var(--c-text);
}

.method-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: var(--c-surface);
    color: var(--c-text-dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.method-tag.recommended {
    background: linear-gradient(135deg, var(--c-accent), #e86030);
    color: #fff;
    border: none;
}

.method-toggle {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--c-text-dim);
    transition: transform 0.2s;
}

.method-body {
    padding: 0.6rem 1rem 1rem;
}

/* 书签按钮样式 */
.bookmarklet-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4a9eff, #6c5ce7);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    text-decoration: none;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.bookmarklet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 158, 255, 0.3);
}

.bookmarklet-btn:active {
    cursor: grabbing;
}

/* 设备类型切换 Tab */
.device-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    background: var(--c-surface);
}

.device-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: none;
    color: var(--c-text-dim);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
}

.device-tab.active {
    background: linear-gradient(135deg, var(--c-accent), #e86030);
    color: #fff;
    font-weight: 600;
}

.device-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.04);
}

/* OS 切换 Tab */
.os-tabs {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.8rem;
}

.os-tab {
    flex: 1;
    padding: 7px 12px;
    border: none;
    background: none;
    color: var(--c-text-dim);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.os-tab.active {
    background: rgba(74, 158, 255, 0.12);
    color: #4a9eff;
    font-weight: 600;
}

.os-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.03);
}

/* 移动端步骤 */
.mobile-steps {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mobile-step {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.85rem;
    color: var(--c-text-dim);
    line-height: 1.6;
}

.mobile-step-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    border-radius: 5px;
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
    font-size: 0.72rem;
    font-weight: 700;
}

.mobile-step strong {
    color: var(--c-text);
}

/* ========== 导航栏VIP入口 ========== */
.nav-vip-link {
    color: var(--c-accent) !important;
    font-weight: 600 !important;
}

.nav-vip-icon {
    margin-right: 2px;
    font-size: 0.8rem;
}

/* ========== 导航栏用户信息 ========== */
.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    padding-left: 0.8rem;
    border-left: 1px solid var(--c-border);
}

.nav-vip-badge {
    font-size: 0.8rem;
    filter: drop-shadow(0 1px 4px rgba(240, 160, 80, 0.4));
}

.nav-user-name {
    font-size: 0.82rem;
    color: var(--c-accent);
    font-weight: 500;
}

.nav-logout-btn {
    font-size: 0.75rem !important;
    padding: 3px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 4px !important;
    color: var(--c-text-dim) !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}

.nav-logout-btn:hover {
    border-color: rgba(239, 83, 80, 0.3) !important;
    color: #ef5350 !important;
    background: rgba(239, 83, 80, 0.05) !important;
}

/* ========== 扫码登录样式 ========== */
.qr-login-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
}

.qr-start-btn {
    font-size: 1rem;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-start-icon {
    font-size: 1.2rem;
}

.qr-code-wrap {
    position: relative;
    display: inline-block;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.qr-code-img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: contain;
    border-radius: 4px;
}

.qr-overlay {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-overlay-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.qr-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

.qr-status-icon {
    font-size: 1.3rem;
}

.qr-status-text {
    font-size: 0.9rem;
    color: var(--c-text-dim);
    transition: color 0.3s;
}

.qr-countdown {
    font-size: 0.78rem;
    color: var(--c-text-dim);
    margin-top: 0.4rem;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

.qr-success {
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 热榜样式 ========== */
.hot-board-card {
    margin-bottom: 1rem;
}

.hot-board-card .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hot-board-icon {
    font-size: 1.2rem;
}

.hot-list {
    overflow-x: auto;
}

.hot-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--c-surface);
    color: var(--c-text-dim);
}

.hot-rank-top {
    background: linear-gradient(135deg, #f0a050, #e86030);
    color: #fff;
}

.hot-word {
    font-weight: 500;
    max-width: 360px;
}

.hot-word-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.hot-word-link:hover {
    color: var(--c-accent);
    text-decoration: underline;
}

.hot-top .hot-word {
    font-weight: 700;
}

.hot-top .hot-word-link {
    color: var(--c-accent);
}

.hot-value {
    font-variant-numeric: tabular-nums;
    color: var(--c-accent);
    font-weight: 600;
}

.hot-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    border: 1px solid var(--c-step-border);
}

/* ===========================================================
   Theme Toggle — inline icon, same size as nav links
   =========================================================== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    line-height: 1;
    color: var(--c-text-dim);
    transition: all .25s var(--ease-out);
    position: relative;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--c-accent);
    background: var(--c-accent-soft);
}

/* Dark mode: show sun icon (click to go light) */
.theme-toggle .icon-sun {
    display: inline;
}

.theme-toggle .icon-moon {
    display: none;
}

/* Light mode: show moon icon (click to go dark) */
[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

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

/* ===========================================================
   Light theme: additional overrides for hardcoded rgba values
   =========================================================== */
[data-theme="light"] body::after {
    mix-blend-mode: soft-light;
}

[data-theme="light"] .navbar::after {
    background: linear-gradient(90deg, transparent, rgba(200, 120, 48, 0.25), transparent);
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a:focus-visible,
[data-theme="light"] .nav-more-trigger:hover,
[data-theme="light"] .nav-more-trigger:focus-visible {
    background: linear-gradient(135deg, rgba(200, 120, 48, 0.16), rgba(192, 80, 58, 0.1));
    border-color: rgba(200, 120, 48, 0.35);
    box-shadow: 0 6px 16px -10px rgba(200, 120, 48, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .nav-more-menu {
    background: color-mix(in srgb, var(--c-surface) 96%, #fff 4%);
    box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .feature-card::before {
    background: linear-gradient(135deg, rgba(200, 120, 48, 0.1), rgba(192, 80, 58, 0.06));
}

[data-theme="light"] .feature-card:hover {
    box-shadow: 0 12px 40px -8px rgba(200, 120, 48, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hero-parse::before {
    background: radial-gradient(ellipse, rgba(200, 120, 48, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .hero-parse-title {
    background: linear-gradient(135deg, #b06820 0%, #d49050 40%, #c0503a 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(135deg, #b06820 0%, #d49050 40%, #c0503a 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .stat-card:hover {
    box-shadow: 0 0 40px -12px rgba(200, 120, 48, 0.08);
}

[data-theme="light"] .save-btn {
    box-shadow: 0 2px 12px -2px rgba(200, 120, 48, 0.2);
}

[data-theme="light"] .save-btn:hover {
    box-shadow: 0 4px 20px -2px rgba(200, 120, 48, 0.25);
}

[data-theme="light"] .btn-primary {
    box-shadow: 0 2px 12px -2px rgba(200, 120, 48, 0.2);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 4px 20px -2px rgba(200, 120, 48, 0.25);
}

[data-theme="light"] .qr-code-wrap {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .qr-overlay {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
}

[data-theme="light"] .qr-overlay-text {
    color: #2a2520;
}

[data-theme="light"] .alert-error {
    background: rgba(196, 60, 60, 0.06);
    border-color: rgba(196, 60, 60, 0.15);
    color: #c43c3c;
}

[data-theme="light"] .alert-success {
    background: rgba(42, 157, 92, 0.06);
    border-color: rgba(42, 157, 92, 0.15);
    color: #2a9d5c;
}

[data-theme="light"] .profile-stats {
    background: rgba(200, 120, 48, 0.04);
    border-color: rgba(200, 120, 48, 0.1);
}

[data-theme="light"] .step-content kbd {
    background: var(--c-surface-2);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-logout-btn {
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--c-text-dim) !important;
}

[data-theme="light"] .nav-logout-btn:hover {
    border-color: rgba(196, 60, 60, 0.25) !important;
    color: #c43c3c !important;
    background: rgba(196, 60, 60, 0.04) !important;
}

[data-theme="light"] .device-tabs {
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .os-tabs {
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .result-box {
    background: rgba(0, 0, 0, 0.015);
}

/* ===========================================================
   VIP 会员定价页
   =========================================================== */
.vip-page {
    animation: fadeUp .6s var(--ease-out) both;
}

.vip-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.vip-crown {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 16px rgba(240, 160, 80, 0.3));
}

.vip-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    background: linear-gradient(135deg, var(--c-accent) 0%, #f7c891 40%, var(--c-accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

.vip-subtitle {
    color: var(--c-text-dim);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.vip-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 12px 20px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(240, 160, 80, 0.08), rgba(232, 99, 74, 0.05));
    border: 1px solid rgba(240, 160, 80, 0.2);
    border-radius: var(--radius);
    animation: fadeUp .5s var(--ease-out) .1s both;
}

.vip-badge-active {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}

.vip-expire-text {
    color: var(--c-text-dim);
    font-size: 0.88rem;
}

.vip-expire-text strong {
    color: var(--c-text);
}

/* 套餐卡片 */
.vip-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.plan-card {
    position: relative;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all .35s var(--ease-out);
    animation: fadeUp .6s var(--ease-out) both;
    overflow: hidden;
}

.plan-card:nth-child(1) {
    animation-delay: .1s;
}

.plan-card:nth-child(2) {
    animation-delay: .2s;
}

.plan-card:nth-child(3) {
    animation-delay: .3s;
}

.plan-card:hover {
    border-color: var(--c-border-hi);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -8px rgba(240, 160, 80, 0.12);
}

.plan-featured {
    border-color: rgba(240, 160, 80, 0.3);
    background: linear-gradient(180deg, rgba(240, 160, 80, 0.04) 0%, var(--c-surface) 40%);
}

.plan-featured::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(240, 160, 80, 0.12), rgba(232, 99, 74, 0.06));
    opacity: 0;
    transition: opacity .35s;
    z-index: 0;
}

.plan-featured:hover::before {
    opacity: 1;
}

.plan-badge {
    position: absolute;
    top: 12px;
    right: -28px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 36px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(240, 160, 80, 0.3);
}

.plan-icon {
    font-size: 2.4rem;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 1;
}

.plan-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    color: var(--c-text);
    position: relative;
    z-index: 1;
}

.plan-price {
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
}

.price-symbol {
    font-size: 1rem;
    color: var(--c-accent);
    font-weight: 600;
    vertical-align: top;
    margin-right: 2px;
}

.price-amount {
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--c-accent);
    line-height: 1;
}

.plan-duration {
    font-size: 0.82rem;
    color: var(--c-text-muted);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.plan-desc {
    font-size: 0.88rem;
    color: var(--c-text-dim);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
    text-align: left;
    position: relative;
    z-index: 1;
}

.plan-features li {
    padding: 5px 0;
    font-size: 0.84rem;
    color: var(--c-text-dim);
    border-bottom: 1px solid var(--c-border);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-buy-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px -2px rgba(240, 160, 80, 0.25);
    position: relative;
    z-index: 1;
}

.plan-buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px -2px rgba(240, 160, 80, 0.35);
    filter: brightness(1.08);
}

/* VIP 权益 */
.vip-benefits h2 {
    text-align: center;
    margin-bottom: 1.2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 10px;
    background: var(--c-step-bg);
    border: 1px solid var(--c-step-border);
    transition: border-color .3s;
}

.benefit-item:hover {
    border-color: var(--c-border-hi);
}

.benefit-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.benefit-text strong {
    font-size: 0.95rem;
    color: var(--c-text);
    display: block;
    margin-bottom: 2px;
}

.benefit-text p {
    font-size: 0.82rem;
    color: var(--c-text-dim);
    margin: 0;
    line-height: 1.5;
}

/* ===== 支付弹窗 ===== */
.pay-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--c-overlay);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn .25s ease both;
}

.pay-modal {
    position: relative;
    background: var(--c-surface);
    border: 1px solid var(--c-border-hi);
    border-radius: 16px;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 80px -12px rgba(0, 0, 0, 0.5);
    animation: fadeUp .35s var(--ease-out) both;
}

.pay-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--c-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color .2s;
}

.pay-modal-close:hover {
    color: var(--c-danger);
}

.pay-modal-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--c-text);
}

.pay-plan-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--c-accent-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--c-text);
}

.pay-plan-price {
    color: var(--c-accent);
    font-size: 1.1rem;
}

.pay-plan-price strong {
    font-size: 1.5rem;
    font-family: var(--font-display);
}

.pay-channel-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.pay-channel-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    color: var(--c-text-dim);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s;
    text-align: center;
    font-family: var(--font-body);
}

.pay-channel-tab.active {
    background: var(--c-tab-active-bg);
    color: #fff;
    font-weight: 600;
}

.pay-channel-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.04);
}

.pay-ch-icon {
    margin-right: 4px;
}

/* 二维码区域 */
.pay-qr-area {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.pay-qr-placeholder {
    text-align: center;
    color: var(--c-text-muted);
    font-size: 0.88rem;
    padding: 2rem;
}

.pay-qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--c-text-dim);
    font-size: 0.88rem;
}

.pay-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--c-border);
    border-top-color: var(--c-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pay-qr-code {
    text-align: center;
}

.pay-qr-code .qr-code-wrap {
    margin-bottom: 0.8rem;
}

.pay-qr-code .qr-code-wrap img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: contain;
}

.pay-qr-tip {
    font-size: 0.82rem;
    color: var(--c-text-dim);
}

.pay-qr-tip strong {
    color: var(--c-accent);
}

.pay-qr-error {
    text-align: center;
    padding: 1rem;
}

.pay-confirm-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.pay-success {
    text-align: center;
    padding: 1.5rem 0;
    animation: fadeUp .4s var(--ease-out) both;
}

.pay-success-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.pay-success h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--c-success);
    margin-bottom: 0.4rem;
}

.pay-success p {
    color: var(--c-text-dim);
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.pay-success .btn {
    padding: 10px 32px;
}

.pay-polling-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    font-size: 0.82rem;
    color: var(--c-text-dim);
}

.polling-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-accent);
    animation: glow-pulse 1.5s ease-in-out infinite;
}

/* Light theme VIP overrides */
[data-theme="light"] .vip-title {
    background: linear-gradient(135deg, #b06820 0%, #d49050 40%, #c0503a 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .plan-card:hover {
    box-shadow: 0 12px 40px -8px rgba(200, 120, 48, 0.1);
}

[data-theme="light"] .plan-featured {
    background: linear-gradient(180deg, rgba(200, 120, 48, 0.04) 0%, var(--c-surface) 40%);
}

[data-theme="light"] .plan-buy-btn {
    box-shadow: 0 4px 16px -2px rgba(200, 120, 48, 0.18);
}

[data-theme="light"] .pay-modal {
    box-shadow: 0 24px 80px -12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .vip-plans {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .vip-title {
        font-size: 1.8rem;
    }

    .pay-modal {
        padding: 1.5rem;
        margin: 12px;
    }
}

/* Smooth transition for all themed elements */
body,
.navbar,
.card,
.feature-card,
.stat-card,
.hero-result,
.hero-input-wrap,
.work-card,
.footer,
.result-box,
.json-view,
input,
textarea,
select,
.btn-outline,
.guide-step,
.cookie-method,
.method-header,
.alert,
.badge,
.tag,
.hot-tag {
    transition: background .35s, color .35s, border-color .35s, box-shadow .35s;
}

/* ===========================================================
   登录 / 注册页面
   =========================================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-glow-1 {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(240, 160, 80, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.auth-glow-2 {
    position: fixed;
    bottom: -15%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 99, 74, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .auth-glow-1 {
    background: radial-gradient(circle, rgba(200, 120, 48, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .auth-glow-2 {
    background: radial-gradient(circle, rgba(192, 80, 58, 0.04) 0%, transparent 70%);
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.auth-card {
    padding: 2.5rem 2rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    box-shadow: 0 12px 48px -8px var(--c-shadow);
    animation: fadeUp .6s var(--ease-out) both;
}

.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px -4px rgba(240, 160, 80, 0.25);
    position: relative;
    overflow: hidden;
}

.auth-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

.auth-logo-text {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--c-text);
    margin: 0 0 0.3rem;
    letter-spacing: 0.02em;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--c-text-dim);
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.auth-form .form-group {
    margin-bottom: 1.2rem;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c-text-dim);
    margin-bottom: 0.4rem;
}

.auth-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-input-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color .25s, box-shadow .25s;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: var(--c-text-muted);
    font-weight: 300;
}

.auth-input:focus {
    border-color: rgba(240, 160, 80, 0.5);
    box-shadow: 0 0 0 3px rgba(240, 160, 80, 0.08);
    outline: none;
}

.auth-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s var(--ease-out);
    margin-top: 0.6rem;
    box-shadow: 0 4px 16px -2px rgba(240, 160, 80, 0.25);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -2px rgba(240, 160, 80, 0.35);
    filter: brightness(1.05);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--c-text-dim);
}

.auth-footer a {
    color: var(--c-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-alert.error {
    background: rgba(232, 84, 84, 0.08);
    border: 1px solid rgba(232, 84, 84, 0.15);
    color: var(--c-danger);
}

.auth-alert.success {
    background: rgba(90, 216, 154, 0.08);
    border: 1px solid rgba(90, 216, 154, 0.15);
    color: var(--c-success);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0;
    color: var(--c-text-muted);
    font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-border);
}

.auth-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all .25s;
    box-shadow: 0 2px 12px var(--c-shadow);
}

.auth-theme-toggle:hover {
    border-color: var(--c-accent);
}

.auth-theme-toggle .icon-sun {
    display: inline;
}

.auth-theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .auth-theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .auth-theme-toggle .icon-moon {
    display: inline;
}

.auth-copyright {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--c-text-muted);
    letter-spacing: 0.03em;
}

[data-theme="light"] .auth-card {
    box-shadow: 0 12px 48px -8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .auth-logo {
    box-shadow: 0 8px 24px -4px rgba(200, 120, 48, 0.2);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 1.35rem;
    }
}

/* ===========================================================
   IP 追踪模块
   =========================================================== */
.tracker-list {
    display: grid;
    gap: 1rem;
}

.tracker-card {
    margin-bottom: 0;
    padding: 1.5rem 1.6rem;
}

.tracker-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.tracker-card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.tracker-card-title h3 {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.03rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
}

.tracker-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.tracker-status-dot.active {
    background: #4ad492;
    box-shadow: 0 0 0 3px rgba(74, 212, 146, 0.15);
}

.tracker-status-dot.inactive {
    background: #9b8f82;
    box-shadow: 0 0 0 3px rgba(155, 143, 130, 0.12);
}

.tracker-template-badge {
    display: inline-block;
    border: 1px solid var(--c-border);
    color: var(--c-text-dim);
    background: var(--c-input-bg);
    border-radius: 99px;
    padding: 2px 10px;
    font-size: 0.74rem;
    font-weight: 600;
}

.tracker-card-actions {
    display: inline-flex;
    gap: 8px;
}

.tracker-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tracker-link-row .label {
    color: var(--c-text-dim);
    font-size: 0.86rem;
}

.short-link-display {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--c-code-bg);
    border: 1px solid var(--c-border);
    color: var(--c-accent);
    max-width: 100%;
    word-break: break-all;
}

.copy-btn {
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-text-dim);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all .22s var(--ease-out);
}

.copy-btn:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
    background: var(--c-accent-soft);
}

.copy-btn.copied {
    color: var(--c-success);
    border-color: rgba(90, 216, 154, 0.35);
}

.tracker-stats-row {
    display: flex;
    gap: 16px;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

.tracker-stat {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
}

.tracker-stat-num {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1;
    color: var(--c-accent);
}

.tracker-stat-label {
    color: var(--c-text-dim);
    font-size: 0.78rem;
}

.tracker-card-footer {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--c-border);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem;
}

.template-card {
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--c-surface-2);
    cursor: pointer;
    transition: all .25s var(--ease-out);
}

.template-card:hover {
    transform: translateY(-2px);
    border-color: var(--c-border-hi);
}

.template-card.selected {
    border-color: var(--c-accent);
    background: var(--c-accent-soft);
    box-shadow: 0 0 0 1px rgba(240, 160, 80, 0.35) inset;
}

.template-icon {
    font-size: 1.45rem;
    margin-bottom: 0.5rem;
}

.template-card h4 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0 0.2rem;
}

.template-card p {
    margin: 0;
    font-size: 0.8rem;
}

.tracker-editor-actions {
    display: inline-flex;
    gap: 8px;
    margin-top: 0.55rem;
}

.tracker-ip-block {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--c-border);
}

.tracker-ip-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--c-text);
    letter-spacing: 0.02em;
}

.ip-group-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.ip-group-item {
    border: 1.5px solid var(--c-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--c-surface-2);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ip-group-item:hover {
    border-color: var(--c-border-hi);
    box-shadow: 0 2px 16px -6px rgba(240, 160, 80, 0.06);
}

.ip-group-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .2s var(--ease-out);
}

.ip-group-head:hover {
    background: rgba(240, 160, 80, 0.04);
}

.ip-group-head.open .ip-arrow {
    transform: rotate(180deg);
}

.ip-group-main {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.ip-big {
    color: var(--c-accent);
    font-weight: 700;
    font-size: 0.92rem;
}

.ip-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-input-bg);
    color: var(--c-text-dim);
    font-size: 0.74rem;
    font-weight: 700;
}

.ip-loc,
.ip-isp {
    font-size: 0.78rem;
}

.ip-group-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 0.78rem;
}

.ip-arrow {
    display: inline-block;
    transition: transform .2s var(--ease-out);
    opacity: 0.7;
}

.ip-group-detail {
    border-top: 1px dashed var(--c-border);
    padding: 16px 18px 18px;
}

.ip-group-detail .table-wrap {
    margin-top: 10px;
}

.ip-group-detail .pager-bar {
    margin-top: 14px;
}

/* 预览弹窗（IP追踪） */
.tracker-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.tracker-preview-modal {
    width: min(860px, 96vw);
    max-height: 88vh;
    overflow: auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border-hi);
    border-radius: 16px;
    box-shadow: 0 24px 80px -12px rgba(0, 0, 0, 0.55);
    animation: fadeUp .25s var(--ease-out) both;
}

.tracker-preview-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--c-navbar-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--c-border);
}

.tracker-preview-title {
    font-weight: 700;
    color: var(--c-text);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracker-preview-close {
    background: transparent;
    border: 1px solid var(--c-border);
    color: var(--c-text-dim);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: all .2s var(--ease-out);
}

.tracker-preview-close:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
    background: var(--c-accent-soft);
}

.tracker-preview-body {
    padding: 16px;
}

.landing-preview {
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 1rem;
    background: var(--c-surface-2);
}

.tracker-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.8rem;
}

.tracker-stat-card {
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface-2);
    text-align: center;
    padding: 0.8rem 0.7rem;
}

.tracker-stat-card-num {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--c-accent);
}

.tracker-stat-card-label {
    color: var(--c-text-dim);
    font-size: 0.78rem;
}

.tracker-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.tracker-filter-grid .form-group {
    margin-bottom: 0;
}

.tracker-filter-actions {
    display: inline-flex;
    align-items: end;
    gap: 8px;
}

.table-wrap {
    overflow-x: auto;
}

.ip-cell {
    color: var(--c-accent);
}

.geo-pending {
    color: var(--c-text-muted);
    font-size: 0.82rem;
}

.geo-fail {
    color: var(--c-danger);
    font-size: 0.82rem;
    cursor: help;
}

.visit-badge {
    display: inline-block;
    border-radius: 99px;
    padding: 2px 9px;
    font-size: 0.74rem;
    font-weight: 600;
}

.visit-badge.device-mobile {
    background: rgba(74, 163, 255, 0.16);
    color: #4ba3ff;
}

.visit-badge.device-desktop {
    background: rgba(240, 160, 80, 0.16);
    color: var(--c-accent);
}

.visit-badge.device-tablet {
    background: rgba(147, 112, 219, 0.18);
    color: #b38aff;
}

/* 浏览器指纹标签 */
.fp-tag {
    display: inline-block;
    background: rgba(74, 163, 255, 0.12);
    color: #4ba3ff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.78rem;
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
}

.fp-tag-sm {
    display: inline-block;
    background: rgba(74, 163, 255, 0.10);
    color: #4ba3ff;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 0.72rem;
    font-family: 'Courier New', Courier, monospace;
    cursor: help;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 客户标签 */
.ref-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(240, 160, 80, 0.18), rgba(232, 96, 48, 0.14));
    color: #e86030;
    border-radius: 4px;
    padding: 1px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ref-link-tool {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.ref-input {
    flex: 1;
    min-width: 140px;
    max-width: 260px;
    padding: 5px 10px;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--c-bg);
    color: var(--c-text);
    transition: border-color 0.2s;
}

.ref-input:focus {
    outline: none;
    border-color: var(--c-accent);
}

.same-device-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f0a050, #e86030);
    color: #fff;
    border-radius: 99px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* 分页控件 */
.pager-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
    padding: 6px 0;
}

.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--c-text);
    background: var(--c-card);
    border: 1px solid var(--c-border);
    cursor: pointer;
    transition: all 0.15s;
}

.pager-btn:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
}

.pager-btn.pager-active {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
    pointer-events: none;
}

.pager-dots {
    padding: 0 4px;
    color: var(--c-text-dim);
    font-size: 0.82rem;
}

/* ====== 筛选行 — Cinematic Editorial Filter Controls ====== */
.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    padding: 10px 0 8px;
}

.filter-row-sm {
    padding: 12px 0 8px;
    margin: 0;
    gap: 12px;
}

/* 筛选标签 */
.filter-label {
    font-size: 0.74rem;
    color: var(--c-text-muted);
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* 筛选输入框 */
.filter-input {
    padding: 6px 12px;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: var(--font-body);
    background: var(--c-input-bg);
    color: var(--c-text);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    box-sizing: border-box;
    height: 36px;
    letter-spacing: 0.01em;
}

.filter-input:focus {
    outline: none;
    border-color: rgba(240, 160, 80, 0.45);
    box-shadow: 0 0 0 3px rgba(240, 160, 80, 0.06);
    background: var(--c-surface);
}

.filter-input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.12);
}

.filter-input::placeholder {
    color: var(--c-text-muted);
    opacity: 0.7;
    font-weight: 300;
}

/* datetime-local 时间选择器 — 日历图标置于最左 + 暗黑清晰可见 */
.filter-input-dt {
    width: 205px;
    font-variant-numeric: tabular-nums;
    position: relative;
    padding-left: 32px;
    padding-right: 8px;
}

.filter-input-dt::-webkit-datetime-edit,
.filter-input-dt::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.filter-input-dt::-webkit-calendar-picker-indicator {
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 1;
    padding: 2px;
    border-radius: 5px;
    transition: background 0.2s, filter 0.2s;
    filter: invert(0.8) sepia(0.5) hue-rotate(10deg) brightness(1.2);
    z-index: 1;
}

.filter-input-dt::-webkit-calendar-picker-indicator:hover {
    background: rgba(240, 160, 80, 0.18);
    filter: invert(0.65) sepia(0.6) hue-rotate(10deg) brightness(1.3);
}

/* 日期/时间分隔符 — 温暖色调 */
.filter-input-dt::-webkit-datetime-edit-text {
    color: var(--c-accent);
    opacity: 0.45;
    padding: 0 1px;
}

/* 各字段可编辑区块 */
.filter-input-dt::-webkit-datetime-edit-month-field,
.filter-input-dt::-webkit-datetime-edit-day-field,
.filter-input-dt::-webkit-datetime-edit-year-field,
.filter-input-dt::-webkit-datetime-edit-hour-field,
.filter-input-dt::-webkit-datetime-edit-minute-field,
.filter-input-dt::-webkit-datetime-edit-second-field {
    color: var(--c-text);
    padding: 1px 2px;
    border-radius: 3px;
}

.filter-input-dt::-webkit-datetime-edit-month-field:focus,
.filter-input-dt::-webkit-datetime-edit-day-field:focus,
.filter-input-dt::-webkit-datetime-edit-year-field:focus,
.filter-input-dt::-webkit-datetime-edit-hour-field:focus,
.filter-input-dt::-webkit-datetime-edit-minute-field:focus,
.filter-input-dt::-webkit-datetime-edit-second-field:focus {
    background: rgba(240, 160, 80, 0.15);
    outline: none;
    color: var(--c-accent);
}

/* 白天模式 */
[data-theme="light"] .filter-input-dt::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.65;
}

[data-theme="light"] .filter-input-dt::-webkit-calendar-picker-indicator:hover {
    background: rgba(200, 120, 48, 0.12);
    opacity: 1;
}

[data-theme="light"] .filter-input:hover:not(:focus) {
    border-color: rgba(0, 0, 0, 0.15);
}

/* 按钮操作行（筛选/重置/刷新/导出 独立一行） */
.filter-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 0 14px;
    margin-top: 4px;
}

/* 导出按钮 — 绿色 */
.btn-export {
    background: linear-gradient(135deg, #3aad6e, #2a8d5c);
    color: #fff;
    box-shadow: 0 2px 10px -2px rgba(42, 141, 92, 0.3);
}

.btn-export:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px -2px rgba(42, 141, 92, 0.4);
    transform: translateY(-1px);
}

/* 导出下拉菜单 */
.export-wrap {
    position: relative;
    display: inline-block;
}

.export-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 150px;
    background: var(--c-surface);
    border: 1.5px solid var(--c-border-hi);
    border-radius: 10px;
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.4);
    padding: 6px 0;
    z-index: 100;
    animation: fadeUp .2s var(--ease-out) both;
}

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

.export-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--c-text);
    font-size: 0.84rem;
    font-family: var(--font-body);
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.export-dropdown-item:hover {
    background: var(--c-accent-soft);
    color: var(--c-accent);
}

.export-dropdown-item .fmt-icon {
    display: inline-block;
    width: 22px;
    text-align: center;
    margin-right: 6px;
    opacity: 0.7;
}

[data-theme="light"] .export-dropdown {
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .btn-export {
    box-shadow: 0 2px 10px -2px rgba(42, 141, 92, 0.2);
}

[data-theme="light"] .btn-export:hover {
    box-shadow: 0 4px 16px -2px rgba(42, 141, 92, 0.25);
}

/* ========== 通知铃铛 ========== */
.nav-bell-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-bell-wrap:hover {
    background: rgba(240, 160, 80, 0.1);
}

.nav-bell-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.nav-bell-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e8634a;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(232, 99, 74, 0.4);
    pointer-events: none;
}

/* ========== 拉黑标签 ========== */
.bl-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(232, 99, 74, 0.15);
    color: #e8634a;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-left: 6px;
    white-space: nowrap;
}

.bl-row {
    background: rgba(232, 99, 74, 0.04);
}

[data-theme="light"] .bl-row {
    background: rgba(232, 99, 74, 0.06);
}

.btn-xs {
    padding: 2px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(232, 99, 74, 0.4);
    color: #e8634a;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: rgba(232, 99, 74, 0.12);
    border-color: #e8634a;
}

.ip-group-actions {
    display: inline-flex;
    align-items: center;
    margin: 0 8px;
}

/* ========== 设置页：账号与安全 ========== */
.settings-security-card {
    position: relative;
}

.settings-security-grid {
    display: grid;
    gap: 0.85rem;
}

.settings-security-item {
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.settings-security-item:hover {
    border-color: var(--c-border-hi);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.settings-security-item-notify {
    border-left: 3px solid rgba(102, 187, 106, 0.75);
}

.settings-security-item-autologin {
    border-left: 3px solid rgba(240, 160, 80, 0.9);
}

.settings-security-item-password {
    border-left: 3px solid rgba(74, 158, 255, 0.78);
}

.settings-security-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.settings-security-title {
    margin: 0;
    color: var(--c-text);
    font-size: 0.94rem;
    font-weight: 620;
}

.settings-security-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-2);
    color: var(--c-text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.settings-security-controls {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.settings-toggle-inline {
    margin: 0;
    min-height: 24px;
}

.settings-autologin-label {
    margin: 0;
    color: var(--c-text);
}

.settings-status-chip {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--c-text-muted);
    transition: color 0.3s, border-color 0.3s, background 0.3s;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    padding: 3px 9px;
    border-radius: 999px;
}

.settings-security-desc {
    margin: 0.68rem 0 0;
    color: var(--c-text-dim);
    font-size: 0.84rem;
    line-height: 1.62;
}

.settings-security-desc-tight {
    margin-top: 0;
    margin-bottom: 0.72rem;
}

[data-theme="light"] .settings-security-item {
    background: linear-gradient(180deg, rgba(240, 160, 80, 0.08), rgba(240, 160, 80, 0.015));
}

[data-theme="light"] .settings-status-chip,
[data-theme="light"] .settings-security-tag {
    border-color: rgba(0, 0, 0, 0.12);
}

/* ========== 通知页面 ========== */
.notify-settings-card {
    padding: 1.2rem 1.5rem;
}

.notify-settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--c-text);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--c-border);
    border-radius: 24px;
    transition: 0.3s;
}

.slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked+.slider {
    background: var(--c-accent);
}

.switch input:checked+.slider::before {
    transform: translateX(20px);
}

.notify-mode-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--c-text-dim);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: var(--c-accent);
}

/* 自定义复选框 - 适配深色/浅色主题 */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}

input[type="checkbox"]:hover {
    border-color: rgba(240, 160, 80, 0.5);
}

input[type="checkbox"]:checked {
    background: rgba(240, 160, 80, 0.7);
    border-color: rgba(240, 160, 80, 0.7);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

[data-theme="light"] input[type="checkbox"] {
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] input[type="checkbox"]:hover {
    border-color: rgba(200, 120, 48, 0.5);
}

[data-theme="light"] input[type="checkbox"]:checked {
    background: rgba(200, 120, 48, 0.75);
    border-color: rgba(200, 120, 48, 0.75);
}

/* 通知卡片 */
.notify-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.notify-card:hover {
    border-color: var(--c-border-hover);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.notify-unread {
    border-left: 3px solid var(--c-accent);
}

.notify-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.notify-icon {
    font-size: 1.1rem;
}

.notify-type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(240, 160, 80, 0.12);
    color: var(--c-accent);
    font-size: 0.72rem;
    font-weight: 600;
}

.notify-title {
    font-weight: 600;
    color: var(--c-text);
    font-size: 0.92rem;
}

.notify-time {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--c-text-dim);
    white-space: nowrap;
}

.notify-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e8634a;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(232, 99, 74, 0.4);
}

.notify-body {
    font-size: 0.85rem;
    color: var(--c-text-dim);
    line-height: 1.6;
    margin-bottom: 6px;
}

.notify-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notify-tags {
    font-size: 0.78rem;
    color: var(--c-text-dim);
}

/* ========== 黑名单管理 ========== */
.bl-select-all-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--c-text-dim);
    cursor: pointer;
}

.btn-pardon {
    border-color: rgba(42, 141, 92, 0.4);
    color: #2a8d5c;
}

.btn-pardon:hover {
    background: rgba(42, 141, 92, 0.1);
    border-color: #2a8d5c;
}

.btn-danger {
    background: #e8634a;
    color: #fff;
    border: 1px solid #e8634a;
}

.btn-danger:hover {
    background: #d4533c;
}

/* 表格容器 */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}

.data-table th {
    font-weight: 600;
    color: var(--c-text);
    background: var(--c-surface-2, var(--c-surface));
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody tr:hover {
    background: rgba(240, 160, 80, 0.04);
}

.empty-state {
    padding: 3rem 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .tracker-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tracker-card-title h3 {
        max-width: 100%;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .tracker-filter-actions {
        align-items: center;
    }

    .filter-row {
        gap: 6px;
    }

    .filter-input-dt {
        width: 170px;
    }

    .tracker-card {
        padding: 1.2rem 1rem;
    }

    .ip-group-head {
        padding: 12px 14px;
    }

    .ip-group-detail {
        padding: 12px 14px 14px;
    }

    .notify-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-security-item {
        padding: 0.88rem 0.84rem;
    }

    .settings-security-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    .settings-status-chip {
        padding: 3px 8px;
    }
}
