:root {
    color-scheme: only light;
    supported-color-schemes: light;
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f3f6fa;
    --line: #d8dee8;
    --line-soft: #e8edf4;
    --text: #0f172a;
    --muted: #475569;
    --muted-soft: #64748b;
    --primary: #74c991;
    --primary-strong: #49b873;
    --primary-dark: #15904d;
    --navy: #131c2f;
    --blue: #1d6df2;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body {
    background: linear-gradient(180deg, #fbfcfe 0%, var(--page-bg) 48%, #ffffff 100%) !important;
    color: var(--text);
    color-scheme: only light;
}

html,
body,
.search-page-wrapper,
.site-header,
.result-item,
.view-result-modal,
.view-result-field,
.filter-btn,
.advanced-filter-input {
    color-scheme: only light;
}

body::before {
    display: none !important;
}

.search-page-wrapper ~ .footer-container {
    display: none;
}

.search-page-wrapper {
    min-height: 100vh;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 66px;
    padding: 0 max(20px, calc((100vw - 1216px) / 2));
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.site-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.site-brand-name {
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.site-nav-link {
    color: #334155;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.18s ease;
}

.site-nav-link:hover {
    color: var(--blue);
}

.home-main {
    display: flex;
    flex-direction: column;
    width: min(100%, 1216px);
    margin: 0 auto;
    padding: 42px 20px 0;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0 46px;
}

.hero-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.hero-brand h1 {
    margin: 0;
    color: #020817;
    font-size: clamp(1.75rem, 4vw, 2.15rem);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-description {
    max-width: 760px;
    margin: 0 auto 34px;
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.8;
}

.search-area {
    width: min(100%, 672px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-input-wrap {
    position: relative;
}

#searchInput {
    width: 100%;
    height: 42px;
    padding: 0 46px 0 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-size: 0.94rem;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#searchInput:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(29, 109, 242, 0.1);
    outline: none;
}

.search-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.98rem;
    pointer-events: none;
}

#searchButton {
    width: 100%;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.96rem;
    font-weight: 700;
    box-shadow: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#searchButton:hover:not(:disabled) {
    background: var(--primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(73, 184, 115, 0.24);
}

#searchButton:disabled {
    cursor: wait;
    opacity: 0.72;
}

@keyframes search-fly {
    0% {
        transform: translate(0, 0) rotate(0);
    }

    50% {
        transform: translate(2px, -2px) rotate(10deg);
    }

    100% {
        transform: translate(0, 0) rotate(0);
    }
}

#searchButton.is-flying i {
    animation: search-fly 0.8s ease-in-out infinite;
}

#searchButton.searching {
    background: var(--primary-strong);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    padding: 20px 0 40px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    font-size: 1.55rem;
}

.feature-icon-user {
    background: #f2e6ff;
    color: #8b2cff;
}

.feature-icon-search {
    background: #dcecff;
    color: #1665ff;
}

.feature-icon-fast {
    background: #dcfce7;
    color: #13a553;
}

.feature-item h2 {
    margin: 0 0 10px;
    color: #020817;
    font-size: 1.18rem;
    font-weight: 900;
}

.feature-item p {
    max-width: 360px;
    margin: 0 auto;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.65;
}

.search-shell {
    width: min(100%, 780px);
    margin: 4px auto 38px;
    padding: 22px 0 0;
    border: none;
    border-top: 1px solid rgba(203, 213, 225, 0.58);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.search-shell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    padding: 0 2px 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.58);
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.section-eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: currentColor;
    opacity: 0.62;
}

.search-shell-title {
    margin: 6px 0 4px;
    color: var(--text);
    font-size: 1.22rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.search-shell-description {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.62;
}

.search-shell-badges {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.search-shell-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(116, 201, 145, 0.12);
    color: var(--primary-dark);
    font-size: 0.74rem;
    font-weight: 800;
}

.search-shell-badge.is-muted {
    background: #f1f5f9;
    color: #475569;
}

.search-shell-badge.is-active {
    background: rgba(29, 109, 242, 0.12);
    color: #1d4ed8;
}

#statusBar {
    border-radius: 8px !important;
    border: 1px solid rgba(116, 201, 145, 0.16);
    background: rgba(116, 201, 145, 0.12) !important;
}

#netdisk-filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 12px;
    margin-bottom: 8px;
    white-space: nowrap;
    scrollbar-width: none;
}

#netdisk-filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    min-height: 30px;
    flex-shrink: 0;
    padding: 0 12px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.filter-btn:hover {
    border-color: rgba(73, 184, 115, 0.42);
    color: var(--primary-dark);
}

.filter-btn.active {
    border-color: rgba(73, 184, 115, 0.46);
    background: rgba(116, 201, 145, 0.14);
    color: var(--primary-dark);
}

.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 8px 2px;
    border: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.56);
    border-radius: 0;
    background: transparent;
}

.result-count {
    color: #334155;
    font-size: 0.92rem;
    font-weight: 750;
}

.filter-toggle-button,
.advanced-filter-apply {
    border-radius: 8px !important;
    font-weight: 700;
}

.filter-toggle-button {
    color: #475569 !important;
    border-color: rgba(116, 201, 145, 0.28) !important;
    background: #ffffff !important;
}

.filter-toggle-button:hover {
    color: var(--primary-dark) !important;
    border-color: rgba(73, 184, 115, 0.42) !important;
}

.advanced-filter-panel {
    padding: 12px;
    border: 1px solid rgba(116, 201, 145, 0.2);
    border-radius: 8px;
    background: rgba(248, 252, 250, 0.9);
}

#advanced-filter-bar {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.advanced-filter-group {
    width: min(100%, 300px);
    height: 40px;
}

.advanced-filter-label {
    min-width: 72px;
    justify-content: center;
    border-color: #dbe3ef;
    background: #f1f5f9;
    color: #475569;
    font-weight: 750;
}

.advanced-filter-input {
    border-color: #dbe3ef;
    background: #ffffff;
}

.advanced-filter-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(29, 109, 242, 0.08);
}

#scrollableResults {
    position: relative;
    max-height: 72vh;
    overflow-y: hidden;
    overflow-x: hidden;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.initial-prompt-area {
    padding: 30px 16px 34px;
    color: var(--muted);
}

.initial-icon-wrapper {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(220, 236, 255, 0.72), rgba(232, 249, 239, 0.72));
    color: var(--blue);
    font-size: 1.22rem;
}

.initial-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 900;
}

.initial-description {
    max-width: 420px;
    margin: 10px auto 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.7;
}

.result-row-wrap {
    margin-bottom: 8px;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 999px;
    background: rgba(116, 201, 145, 0.55);
}

.result-item:hover {
    border-color: rgba(116, 201, 145, 0.36);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
    transform: translateY(-1px);
}

.result-info {
    min-width: 0;
    flex: 1 1 auto;
    padding-left: 4px;
    text-align: left;
}

.result-title,
.result-url-line {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-title {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 850;
}

.result-url-line {
    margin-top: 5px;
    color: #64748b;
    font-size: 0.82rem;
}

.result-url-line a {
    color: inherit;
    text-decoration: none;
}

.result-url-line a:hover {
    color: var(--blue);
    text-decoration: underline;
}

.result-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.netdisk-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.copy-button,
.view-button {
    min-height: 30px;
    min-width: 72px;
    border-radius: 8px !important;
    border-color: rgba(116, 201, 145, 0.34) !important;
    background: rgba(116, 201, 145, 0.1) !important;
    color: var(--primary-dark) !important;
    font-weight: 750 !important;
}

.copy-button:hover,
.view-button:hover {
    border-color: var(--primary-strong) !important;
    color: #ffffff !important;
    background: var(--primary-strong) !important;
}

.result-actions .bg-purple,
.netdisk-badge.bg-purple {
    background-color: #f1eaff !important;
    color: #7a56d6 !important;
}

.result-actions .bg-orange,
.netdisk-badge.bg-orange {
    background-color: #fff2e2 !important;
    color: #c97f12 !important;
}

.result-actions .bg-teal,
.netdisk-badge.bg-teal {
    background-color: #e8f8f6 !important;
    color: #24897f !important;
}

.result-actions .bg-mid-blue,
.netdisk-badge.bg-mid-blue {
    background-color: #eaf0ff !important;
    color: #4768c7 !important;
}

.result-actions .bg-light-green,
.netdisk-badge.bg-light-green {
    background-color: #edf8e2 !important;
    color: #6f9f1e !important;
}

.result-actions .bg-salmon,
.netdisk-badge.bg-salmon {
    background-color: #fff0eb !important;
    color: #d06f4c !important;
}

.result-actions .bg-slate-blue,
.netdisk-badge.bg-slate-blue {
    background-color: #edf2f7 !important;
    color: #51687f !important;
}

.result-actions .bg-deep-violet,
.netdisk-badge.bg-deep-violet {
    background-color: #efe8ff !important;
    color: #6c43d7 !important;
}

.result-actions .bg-coral,
.netdisk-badge.bg-coral {
    background-color: #ffeded !important;
    color: #d85e5e !important;
}

.result-actions .bg-navy-blue,
.netdisk-badge.bg-navy-blue {
    background-color: #edf1f5 !important;
    color: #3f5265 !important;
}

.result-actions .bg-rose,
.netdisk-badge.bg-rose {
    background-color: #ffeaf1 !important;
    color: #ca557d !important;
}

.result-actions .bg-dark-mint,
.netdisk-badge.bg-dark-mint {
    background-color: #e9f8f2 !important;
    color: #2a8d71 !important;
}

.result-actions .bg-warm-gold,
.netdisk-badge.bg-warm-gold {
    background-color: #fff5df !important;
    color: #be8b1f !important;
}

.result-actions .bg-olive,
.netdisk-badge.bg-olive {
    background-color: #eff4e6 !important;
    color: #6b7f38 !important;
}

.result-actions .bg-grape,
.netdisk-badge.bg-grape {
    background-color: #f2eef5 !important;
    color: #6e5d7e !important;
}

.result-actions .bg-terracotta,
.netdisk-badge.bg-terracotta {
    background-color: #fdf0ec !important;
    color: #b86450 !important;
}

.netdisk-badge.bg-secondary,
.netdisk-badge.bg-dark {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
}

.view-result-modal {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.view-result-modal-dialog {
    width: min(calc(100vw - 24px), 560px);
    max-width: none;
}

.view-result-modal {
    width: 100%;
}

.view-result-modal .modal-header {
    padding: 1rem 1.2rem 0.9rem;
}

.view-result-modal .modal-body {
    padding: 1.1rem 1.2rem 1rem;
}

.view-result-modal .modal-header,
.view-result-modal .modal-footer {
    border-color: var(--line-soft);
}

.view-result-field {
    padding: 14px 15px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: #f8fafc;
}

.view-result-label {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
}

.view-result-title {
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.5;
    word-break: break-word;
}

.view-result-link {
    display: block;
    color: var(--blue);
    font-size: 0.92rem;
    line-height: 1.6;
    word-break: break-all;
}

.view-result-loading {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.view-result-stage {
    display: flex;
    width: 100%;
    min-height: 148px;
}

.view-result-stage > * {
    width: 100%;
}

.view-result-modal .modal-footer {
    justify-content: space-between;
    gap: 10px;
}

.view-result-modal .modal-footer .btn {
    flex: 1 1 0;
    min-height: 44px;
    border-radius: 14px;
    font-weight: 700;
}

.home-footer {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.3fr;
    gap: 56px;
    padding: 34px 0 30px;
    border-top: 1px solid var(--line-soft);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.footer-column h3,
.footer-brand strong {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 900;
}

.footer-column p,
.footer-column a {
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.65;
}

.footer-column p {
    margin: 0;
}

.footer-column a {
    display: table;
    margin-bottom: 8px;
    text-decoration: none;
}

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

.footer-link-row a {
    display: inline-flex;
    margin-bottom: 0;
}

.footer-link-row a + a::before {
    content: "";
    width: 1px;
    height: 0.9em;
    margin-right: 16px;
    background: var(--line);
}

.footer-column a:hover {
    color: var(--blue);
}

.home-copyright {
    padding: 24px 0;
    border-top: 1px solid var(--line-soft);
    color: #64748b;
    text-align: center;
    font-size: 0.84rem;
}

@media (max-width: 860px) {
    .site-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-main {
        padding: 32px 16px 0;
    }

    .hero-section {
        order: 1;
        padding-bottom: 28px;
    }

    .search-shell {
        order: 2;
    }

    .feature-grid {
        order: 3;
    }

    .home-footer {
        order: 4;
    }

    .home-copyright {
        order: 5;
    }

    .hero-brand {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .feature-grid,
    .home-footer {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .search-shell-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .search-shell-badges {
        justify-content: flex-start;
    }

    #advanced-filter-bar,
    .advanced-filter-group,
    .advanced-filter-apply {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .site-header {
        min-height: 60px;
    }

    .site-brand-name {
        font-size: 0.98rem;
    }

    .site-logo {
        width: 30px;
        height: 30px;
    }

    .site-nav-link {
        font-size: 0.88rem;
    }

    .home-main {
        padding-top: 28px;
    }

    .hero-logo {
        width: 52px;
        height: 52px;
    }

    .hero-description {
        margin-bottom: 26px;
        font-size: 0.95rem;
    }

    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 4px 0 24px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
        font-size: 1.18rem;
    }

    .feature-item h2 {
        margin-bottom: 0;
        font-size: 0.88rem;
        line-height: 1.25;
    }

    .feature-item p {
        display: none;
    }

    .search-shell {
        padding: 18px 0 0;
        margin-bottom: 26px;
    }

    .search-shell-top {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .search-shell-description {
        font-size: 0.84rem;
    }

    .search-shell-badge {
        min-height: 26px;
        font-size: 0.7rem;
    }

    #scrollableResults {
        padding: 0;
    }

    .filter-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 8px 0;
    }

    .result-item {
        align-items: stretch;
        flex-direction: column;
        padding: 11px 11px 10px;
        background: rgba(255, 255, 255, 0.78);
    }

    .result-info {
        width: 100%;
        padding-left: 0;
    }

    .result-title {
        display: block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        word-break: normal;
        line-height: 1.35;
        font-size: 0.9rem;
    }

    .result-url-line {
        display: none;
    }

    .result-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 7px;
        margin-top: 8px;
    }

    .netdisk-badge {
        flex: 0 0 auto;
        min-height: 24px;
        font-size: 0.67rem;
        padding: 0 7px;
    }

    .result-actions > .feedback-button {
        flex: 0 0 auto;
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.74rem;
    }

    .result-actions > .copy-button,
    .result-actions > .view-button {
        flex: 1 1 100%;
        min-height: 34px;
        min-width: 0;
        padding: 0 10px;
        font-size: 0.8rem;
    }

    #toastContainer {
        right: 12px;
        bottom: 12px;
    }

    #toastContainer .toast {
        min-width: 180px;
        max-width: calc(100vw - 24px);
        font-size: 0.82rem;
        border-radius: 0.8rem;
    }

    #toastContainer .toast .toast-body {
        padding: 0.55rem 0.8rem;
    }
}

@media (max-width: 560px) {
    .view-result-modal-dialog {
        width: calc(100vw - 24px) !important;
        max-width: none !important;
        margin: 0.5rem auto;
    }

    .view-result-modal {
        --view-modal-gutter: 14px;
        width: 100%;
        border-radius: 18px;
    }

    .view-result-modal .modal-header {
        padding: 14px var(--view-modal-gutter) 12px;
    }

    .view-result-modal .modal-body {
        padding: 14px var(--view-modal-gutter) 12px;
    }

    .view-result-loading {
        min-height: 0;
        width: 100%;
    }

    .view-result-loading p {
        width: 100%;
        text-align: center;
    }

    .view-result-stage {
        width: 100%;
        min-height: 118px;
    }

    .view-result-field {
        padding: 12px;
        border-radius: 12px;
    }

    .view-result-title {
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .view-result-link {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .view-result-modal .modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px var(--view-modal-gutter) 14px;
    }

    .view-result-modal .modal-footer .btn {
        width: 100%;
        min-height: 42px;
    }
}

#toastContainer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    pointer-events: none;
}

#toastContainer .toast {
    pointer-events: auto;
    min-width: 240px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.site-nav-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(116, 201, 145, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--primary-dark);
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.theme-toggle-button:hover {
    border-color: rgba(73, 184, 115, 0.5);
    background: rgba(116, 201, 145, 0.12);
    transform: translateY(-1px);
}

@media (min-width: 861px) {
    .site-header .theme-toggle-button {
        position: fixed;
        top: 16px;
        right: 24px;
        z-index: 40;
    }
}

html[data-theme="dark"] {
    color-scheme: dark;
    supported-color-schemes: dark;
    --page-bg: #111827;
    --surface: #172033;
    --surface-soft: #1d293d;
    --line: rgba(148, 163, 184, 0.26);
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #e5edf8;
    --muted: #bac6d7;
    --muted-soft: #94a3b8;
    --primary: #7fd69b;
    --primary-strong: #55c77e;
    --primary-dark: #8be3a7;
    --navy: #f8fafc;
    --blue: #7eb0ff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .search-page-wrapper,
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .result-item,
html[data-theme="dark"] .view-result-modal,
html[data-theme="dark"] .view-result-field,
html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .advanced-filter-input {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 18% 0%, rgba(127, 214, 155, 0.12), transparent 30%),
        radial-gradient(circle at 88% 10%, rgba(126, 176, 255, 0.12), transparent 28%),
        linear-gradient(180deg, #0c1220 0%, #111827 48%, #0f172a 100%) !important;
    color: var(--text);
}

html[data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, 0.82);
    border-bottom-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .site-nav-link {
    color: #cbd5e1;
}

html[data-theme="dark"] .site-nav-link:hover {
    color: var(--primary-dark);
}

html[data-theme="dark"] .theme-toggle-button {
    border-color: rgba(127, 214, 155, 0.32);
    background: rgba(15, 23, 42, 0.72);
    color: #d8ffe4;
}

html[data-theme="dark"] .hero-brand h1,
html[data-theme="dark"] .feature-item h2,
html[data-theme="dark"] .search-shell-title,
html[data-theme="dark"] .initial-title,
html[data-theme="dark"] .footer-column h3,
html[data-theme="dark"] .footer-brand strong,
html[data-theme="dark"] .result-title,
html[data-theme="dark"] .view-result-title {
    color: var(--text);
}

html[data-theme="dark"] .hero-description,
html[data-theme="dark"] .feature-item p,
html[data-theme="dark"] .search-shell-description,
html[data-theme="dark"] .result-count,
html[data-theme="dark"] .footer-column p,
html[data-theme="dark"] .footer-column a,
html[data-theme="dark"] .home-copyright,
html[data-theme="dark"] .result-url-line,
html[data-theme="dark"] .initial-description {
    color: var(--muted);
}

html[data-theme="dark"] .search-shell,
html[data-theme="dark"] .search-shell-top,
html[data-theme="dark"] .filter-toolbar,
html[data-theme="dark"] .home-footer,
html[data-theme="dark"] .home-copyright {
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] #searchInput,
html[data-theme="dark"] .advanced-filter-input {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
}

html[data-theme="dark"] #searchInput::placeholder,
html[data-theme="dark"] .advanced-filter-input::placeholder {
    color: #7f8da3;
}

html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .filter-toggle-button,
html[data-theme="dark"] .advanced-filter-label,
html[data-theme="dark"] .search-shell-badge.is-muted {
    border-color: rgba(148, 163, 184, 0.22) !important;
    background: rgba(15, 23, 42, 0.72) !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .filter-btn.active,
html[data-theme="dark"] .search-shell-badge,
html[data-theme="dark"] .search-shell-badge.is-active,
html[data-theme="dark"] #statusBar {
    border-color: rgba(127, 214, 155, 0.32) !important;
    background: rgba(127, 214, 155, 0.12) !important;
    color: var(--primary-dark) !important;
}

html[data-theme="dark"] .advanced-filter-panel {
    border-color: rgba(127, 214, 155, 0.18);
    background: rgba(15, 23, 42, 0.5);
}

html[data-theme="dark"] .result-item {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(23, 32, 51, 0.86);
}

html[data-theme="dark"] .result-item:hover {
    border-color: rgba(127, 214, 155, 0.28);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .copy-button,
html[data-theme="dark"] .view-button {
    border-color: rgba(127, 214, 155, 0.3) !important;
    background: rgba(127, 214, 155, 0.12) !important;
    color: var(--primary-dark) !important;
}

html[data-theme="dark"] .netdisk-badge {
    border-color: rgba(148, 163, 184, 0.18);
    filter: saturate(0.92) brightness(0.92);
}

html[data-theme="dark"] .view-result-modal {
    background: #172033;
    color: var(--text);
}

html[data-theme="dark"] .view-result-modal .modal-header,
html[data-theme="dark"] .view-result-modal .modal-footer {
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .view-result-field {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.62);
}

html[data-theme="dark"] .view-result-label,
html[data-theme="dark"] .view-result-loading p {
    color: var(--muted-soft) !important;
}

html[data-theme="dark"] .modal-backdrop {
    background: rgba(2, 6, 23, 0.66);
}

@media (max-width: 560px) {
    .site-nav-actions {
        gap: 8px;
    }

    .theme-toggle-button {
        min-height: 32px;
        padding: 0 10px;
        font-size: 0.78rem;
    }
}

@media (max-width: 420px) {
    .site-header {
        gap: 10px;
    }

    .site-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-brand-name {
        display: block;
        max-width: 7.5em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-nav-actions {
        flex: 0 0 auto;
        gap: 6px;
    }

    .theme-toggle-button {
        width: 34px;
        min-width: 34px;
        padding: 0;
    }

    .theme-toggle-button span {
        display: none;
    }
}
