/* ============================================
   极映空间 – Premium Apple/Vercel Inspired Theme
   ============================================ */

/* ---------- Self-hosted Inter Font ---------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('assets/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('assets/fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('assets/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('assets/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('assets/fonts/Inter-Bold.woff2') format('woff2');
}

/* ---------- Skip Link (Accessibility) ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 24px;
    background: var(--blue, #0070F3);
    color: #fff;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ---------- Design Tokens ---------- */
:root {
    /* Fluid Typography (Modern Apple Style) */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Light Mode Colors (Cleaner, more vibrant) */
    --bg: #FAFAFA;
    --bg-secondary: #F0F0F0;
    --bg-card: #FFFFFF;
    --bg-card-hover: rgba(255, 255, 255, 0.95);

    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #6B6B6B;

    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);

    /* Vercel/Apple inspired vibrant colors */
    --blue: #0070F3;
    --blue-hover: #0051B3;
    --teal: #00A99D;
    --green: #10B981;
    --amber: #F5A623;
    --red: #E00;
    --pink: #EC4899;
    --purple: #7928CA;

    /* Glowing Background Gradients */
    --grad-streaming: linear-gradient(135deg, #e50914 0%, #ff3b3b 100%);
    --grad-download: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
    --grad-resource: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --grad-global: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --grad-index: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --grad-ai: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    --grad-bt: linear-gradient(135deg, #06b6d4 0%, #2dd4bf 100%);
    --grad-hot: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);

    /* Advanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 24px -6px rgba(0, 0, 0, 0.05), inset 0 0 0 1px var(--border);
    --shadow-card-hover: 0 12px 32px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--blue);

    /* Glassmorphism Navbar */
    --nav-bg: rgba(250, 250, 250, 0.75);
    --nav-blur: blur(16px) saturate(180%);

    /* Dimensions */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --max-w: 1100px;
}

/* ---------- Dark Mode (Deep, OLED-friendly, Vercel depth) ---------- */
[data-theme="dark"] {
    --bg: #0A0A0A;
    --bg-secondary: #111111;
    --bg-card: #151515;
    --bg-card-hover: #1A1A1A;

    --text-primary: #EDEDED;
    --text-secondary: #A0A0A0;
    --text-muted: #8A8A8A;

    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);

    --blue: #3291FF;
    --blue-hover: #0070F3;
    --teal: #4DD0E1;
    --green: #34D399;
    --amber: #FBBF24;
    --red: #F87171;
    --pink: #F472B6;
    --purple: #A78BFA;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-card: 0 4px 24px -6px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    /* Neon glow effect on hover */
    --shadow-card-hover: 0 8px 32px -8px rgba(50, 145, 255, 0.25), 0 0 0 1px var(--blue);

    --nav-bg: rgba(10, 10, 10, 0.75);
}

/* ---------- Pill & Tag Overrides (Light/Dark Context) ---------- */
/* Pill generic base styles are defined later, these are dynamic coloring */
[data-theme="dark"] .pill-red {
    background: rgba(248, 113, 113, 0.15);
    color: var(--red);
}

[data-theme="dark"] .pill-purple {
    background: rgba(167, 139, 250, 0.15);
    color: var(--purple);
}

[data-theme="dark"] .pill-green {
    background: rgba(52, 211, 153, 0.15);
    color: var(--green);
}

[data-theme="dark"] .pill-blue {
    background: rgba(50, 145, 255, 0.15);
    color: var(--blue);
}

[data-theme="dark"] .pill-amber {
    background: rgba(251, 191, 36, 0.15);
    color: var(--amber);
}

/* Hub Card Icon Backgrounds */
.hub-card-icon.blue {
    background: rgba(0, 112, 243, 0.1);
}

.hub-card-icon.amber {
    background: rgba(245, 166, 35, 0.1);
}

.hub-card-icon.green {
    background: rgba(16, 185, 129, 0.1);
}

.hub-card-icon.red {
    background: rgba(238, 0, 0, 0.1);
}

.hub-card-icon.purple {
    background: rgba(121, 40, 202, 0.1);
}

.hub-card-icon.pink {
    background: rgba(236, 72, 153, 0.1);
}

.hub-card-icon.teal {
    background: rgba(0, 169, 157, 0.1);
}

[data-theme="dark"] .hub-card-icon.blue {
    background: rgba(50, 145, 255, 0.15);
}

[data-theme="dark"] .hub-card-icon.amber {
    background: rgba(251, 191, 36, 0.15);
}

[data-theme="dark"] .hub-card-icon.green {
    background: rgba(52, 211, 153, 0.15);
}

[data-theme="dark"] .hub-card-icon.red {
    background: rgba(248, 113, 113, 0.15);
}

[data-theme="dark"] .hub-card-icon.purple {
    background: rgba(167, 139, 250, 0.15);
}

[data-theme="dark"] .hub-card-icon.pink {
    background: rgba(244, 114, 182, 0.15);
}

[data-theme="dark"] .hub-card-icon.teal {
    background: rgba(77, 208, 225, 0.15);
}

/* System Preference Dark Mode (Fallback if JS doesn't set data-theme) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0A0A0A;
        --bg-secondary: #111111;
        --bg-card: #151515;
        --bg-card-hover: #1A1A1A;

        --text-primary: #EDEDED;
        --text-secondary: #A0A0A0;
        --text-muted: #8A8A8A;

        --border: rgba(255, 255, 255, 0.1);
        --border-hover: rgba(255, 255, 255, 0.2);

        --blue: #3291FF;
        --blue-hover: #0070F3;
        --teal: #4DD0E1;
        --green: #34D399;
        --amber: #FBBF24;
        --red: #F87171;
        --pink: #F472B6;
        --purple: #A78BFA;

        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
        --shadow-card: 0 4px 24px -6px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        --shadow-card-hover: 0 8px 32px -8px rgba(50, 145, 255, 0.25), 0 0 0 1px var(--blue);

        --nav-bg: rgba(10, 10, 10, 0.75);
    }
}

/* ---------- SVG Icon System ---------- */
.ui-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    /* slightly thinner, more elegant */
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ============================================
   HUB – Navbar
   ============================================ */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-bar.scrolled {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.04);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 52px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.nav-brand-icon .brand-mark {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.nav-link-hub {
    margin-left: auto;
    padding: 5px 14px;
    border-radius: 980px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

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

.nav-link-hub.active {
    color: var(--blue);
}

/* ============================================
   HUB – Hero (Cinematic Banner)
   ============================================ */
.hub-hero {
    position: relative;
    max-width: 1080px;
    margin: 32px auto 12px;
    padding: 72px 24px;
    min-height: 240px;
    text-align: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: #0d0d0f;
    /* Base dark color crucial for the posters to pop */
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.15);
}

.hero-poster-wall {
    position: absolute;
    top: -200px;
    left: -100px;
    right: -100px;
    bottom: -200px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    opacity: 0.85;
    /* 3D Parallax Perspective adjusted for better viewing angle */
    transform: perspective(1000px) rotateX(15deg) rotateY(-5deg) rotateZ(-2deg) scale(1.1);
    transform-origin: center;
    pointer-events: none;
}

.poster-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    width: max-content;
    will-change: transform;
}

/* Row speeds and directions */
.track-1 {
    animation: scrollLeft 90s linear infinite;
}

.track-2 {
    animation: scrollRight 110s linear infinite;
    margin-left: -500px;
}

.track-3 {
    animation: scrollLeft 80s linear infinite;
    margin-left: -300px;
}

.poster-item {
    width: 60px;
    height: 86px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: translateZ(0);
}

.poster-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8) contrast(1.1);
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-988px);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-988px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Pause poster wall animation on hover for reduced distraction */
.hub-hero:hover .poster-track {
    animation-play-state: paused;
}

.hero-banner-overlay {
    position: absolute;
    inset: 0;
    /* Gentle dark gradient to ensure text readability but let posters pop */
    background: linear-gradient(180deg, rgba(13, 13, 15, 0.7) 0%, rgba(13, 13, 15, 0.95) 100%);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hub-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #FFFFFF;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hub-hero-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    font-weight: 500;
    margin-top: 18px;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ============================================
   HUB – Card Grid
   ============================================ */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 40px 0;
}

.hub-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px 24px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    /* Magnetic hover vars */
    --x: 50%;
    --y: 50%;
}

/* Ensure <a> tags used as hub-cards inherit styles properly */
a.hub-card {
    color: inherit;
    text-decoration: none;
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(400px circle at var(--x) var(--y), rgba(255, 255, 255, 0.5), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

[data-theme="dark"] .hub-card::before {
    background: radial-gradient(400px circle at var(--x) var(--y), rgba(255, 255, 255, 0.04), transparent 40%);
}

.hub-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-card-hover);
    background: var(--bg-card-hover);
}

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

.hub-card>* {
    position: relative;
    z-index: 1;
}

.search-hidden {
    opacity: 0;
    transform: scale(0.92) !important;
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

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

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

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

.hub-card:nth-child(4) {
    animation-delay: 0.16s;
}

.hub-card:nth-child(5) {
    animation-delay: 0.20s;
}

.hub-card:nth-child(6) {
    animation-delay: 0.24s;
}

.hub-card:nth-child(7) {
    animation-delay: 0.28s;
}

.hub-card:nth-child(8) {
    animation-delay: 0.32s;
}

.hub-card:nth-child(9) {
    animation-delay: 0.36s;
}

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

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

.hub-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.hub-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hub-card-icon.blue {
    background: #e8f4fd;
    color: #0071e3;
}

.hub-card-icon.purple {
    background: #f0eaff;
    color: #7c3aed;
}

.hub-card-icon.amber {
    background: #fef3e2;
    color: #d97706;
}

.hub-card-icon.green {
    background: #e6f9f0;
    color: #059669;
}

.hub-card-icon.red {
    background: #fde8e8;
    color: #dc2626;
}

.hub-card-icon.pink {
    background: #fce7f3;
    color: #db2777;
}

.hub-card-icon.teal {
    background: #e0f7fa;
    color: #0891b2;
}

.hub-card-icon .ui-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.hub-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.hub-card-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
    letter-spacing: 0;
}

.hub-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
}

.hub-card-actions {
    display: flex;
    margin-top: auto;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    background: var(--blue);
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    /* keep above the hover spotlight */
}

.btn-primary .ui-icon {
    width: 0.95rem;
    height: 0.95rem;
    stroke-width: 2.1;
}

.btn-primary:hover {
    background: var(--blue-hover);
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.3);
    opacity: 0.92;
}

/* ============================================
   HUB – Info & Footer
   ============================================ */
.info-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 48px;
}

.info-box-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-box-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-box-title .ui-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.info-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-check .ui-icon {
    width: 15px;
    height: 15px;
}

footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    text-align: center;
}

footer p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

footer .copyright {
    margin-top: 4px;
}

footer .complaint-channel {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

footer .complaint-channel a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

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

footer .visit-counter {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
}

footer .visit-counter .ui-icon {
    width: 13px;
    height: 13px;
}

.icp-beian {
    margin-top: 8px;
    font-size: 0.72rem;
    text-align: center;
}

.icp-beian a {
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
}

.icp-beian a:hover {
    opacity: 1;
    color: var(--blue);
}

/* ============================================
   SUB – Navbar
   ============================================ */
.sub-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.sub-nav.scrolled {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.04);
}

.sub-nav.nav-scroll-hint::after {
    display: none;
}

.sub-nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 52px;
    gap: 20px;
    position: relative;
    overflow-x: auto;
    scrollbar-width: none;
}

.sub-nav-inner::-webkit-scrollbar {
    display: none;
}

.sub-nav-inner.is-overflowing::before,
.sub-nav-inner.is-overflowing::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22px;
    pointer-events: none;
    z-index: 2;
}

.sub-nav-inner.is-overflowing::before {
    content: '‹';
    left: 0;
    background: linear-gradient(to right, var(--nav-bg) 35%, transparent);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 2px;
    font-size: 11px;
}

.sub-nav-inner.is-overflowing::after {
    content: '›';
    right: 0;
    background: linear-gradient(to left, var(--nav-bg) 35%, transparent);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 2px;
    font-size: 11px;
}

.sub-nav-inner.is-overflowing.at-start::before {
    opacity: 0;
}

.sub-nav-inner.is-overflowing.at-end::after {
    opacity: 0;
}

.sub-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.sub-nav-brand .brand-mark {
    width: 1.7rem;
    height: 1.7rem;
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}

.sub-nav-links {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.sub-nav-link {
    padding: 5px 12px;
    border-radius: 980px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s;
}

.sub-nav-link:hover {
    color: var(--text-primary);
}

.sub-nav-link.active {
    color: var(--blue);
}

/* ============================================
   SUB – Hero
   ============================================ */
.sub-hero {
    padding: 56px 0 24px;
    text-align: center;
}

.sub-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.sub-hero-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 6px;
}

.sub-hero-desc strong {
    color: var(--text-primary);
    font-weight: 600;
}

.sub-hero-tags {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 14px;
    background: rgba(0, 112, 243, 0.08);
    border-radius: 980px;
    font-size: 0.78rem;
    color: var(--blue);
    font-weight: 500;
}

/* ============================================
   SUB – Shortcut pills
   ============================================ */
.shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 0;
    justify-content: center;
}

.shortcut-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 980px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.shortcut-pill .ui-icon {
    width: 0.92rem;
    height: 0.92rem;
    stroke-width: 2.1;
}

.pill-red {
    background: #fde8e8;
    color: #dc2626;
}

.pill-purple {
    background: #f0eaff;
    color: #7c3aed;
}

.pill-green {
    background: #e6f9f0;
    color: #059669;
}

.pill-blue {
    background: #e8f4fd;
    color: #0071e3;
}

.pill-teal {
    background: #e0f7fa;
    color: #0891b2;
}

.pill-amber {
    background: #fef3e2;
    color: #d97706;
}

.pill-pink {
    background: #fce7f3;
    color: #db2777;
}

.shortcut-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

/* ============================================
   SUB – Section Bar
   ============================================ */
.section-bar {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    padding: 20px 0 14px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-bar::before {
    content: '';
    width: 3px;
    height: 20px;
    border-radius: 2px;
    background: var(--blue);
    flex-shrink: 0;
}

/* ============================================
   SUB – Resource Card Grid
   ============================================ */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-bottom: 20px;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    content-visibility: auto;
    contain-intrinsic-size: 280px;
}

.resource-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}

.resource-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
    transform: scale(1.015);
}

.resource-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.resource-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: blur(16px);
    z-index: -1;
}

[data-theme="dark"] .resource-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.resource-card:hover .resource-icon {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.resource-card:hover .resource-icon::after {
    opacity: 0.7;
}

[data-theme="dark"] .resource-card:hover .resource-icon {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .resource-card:hover .resource-icon::after {
    opacity: 0.5;
}

/* --- Glowing Background Classes --- */
.bg-streaming {
    background: var(--grad-streaming);
}

.bg-streaming::after {
    background: var(--grad-streaming);
}

.bg-download {
    background: var(--grad-download);
}

.bg-download::after {
    background: var(--grad-download);
}

.bg-resource {
    background: var(--grad-resource);
}

.bg-resource::after {
    background: var(--grad-resource);
}

.bg-global {
    background: var(--grad-global);
}

.bg-global::after {
    background: var(--grad-global);
}

.bg-index {
    background: var(--grad-index);
}

.bg-index::after {
    background: var(--grad-index);
}

.bg-ai {
    background: var(--grad-ai);
}

.bg-ai::after {
    background: var(--grad-ai);
}

.bg-bt {
    background: var(--grad-bt);
}

.bg-bt::after {
    background: var(--grad-bt);
}

.bg-hot {
    background: var(--grad-hot);
}

.bg-hot::after {
    background: var(--grad-hot);
}

.resource-icon .ui-icon,
.resource-icon .material-local {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] .resource-icon .material-local {
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.resource-card:hover .material-local {
    transform: scale(1.15) rotate(2deg);
}



.resource-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.resource-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 12px;
    flex: 1;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 14px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: 980px;
    font-size: 0.78rem;
    font-weight: 500;
}

.resource-health {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0 0 12px;
    padding: 4px 10px;
    border-radius: 980px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
}

.resource-health::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

.resource-health.is-ok {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.18);
    color: var(--green);
}

.resource-health.is-warning {
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.24);
    color: var(--amber);
}

.resource-health.is-down {
    background: rgba(238, 0, 0, 0.08);
    border-color: rgba(238, 0, 0, 0.16);
    color: var(--red);
}

[data-theme="dark"] .resource-health.is-ok {
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.24);
}

[data-theme="dark"] .resource-health.is-warning {
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.24);
}

[data-theme="dark"] .resource-health.is-down {
    background: rgba(248, 113, 113, 0.14);
    border-color: rgba(248, 113, 113, 0.24);
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 0;
    min-height: 44px;
    background: var(--blue);
    color: #fff;
    border-radius: 980px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-visit:hover {
    background: var(--blue-hover);
    transform: scale(1.02);
}

/* ============================================
   SUB – Hot Nav
   ============================================ */
.hot-nav {
    padding: 8px 0 28px;
}

.hot-nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* ============================================
   SUB – Footer
   ============================================ */
.sub-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
}

.sub-footer p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.bookmark-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.bookmark-tip kbd {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font);
    font-size: 0.75rem;
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary);
    font-size: 1.1rem;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
    color: var(--blue);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .hub-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .daily-rankings-board {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
    }

    .daily-rankings-board::-webkit-scrollbar {
        display: none;
    }

    .daily-rank-panel {
        min-width: min(84vw, 380px);
        scroll-snap-align: start;
    }

    .sub-nav.nav-scroll-hint::after {
        content: '左右滑动';
        position: absolute;
        right: 10px;
        bottom: 3px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 1px 7px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: var(--bg-card);
        color: var(--text-muted);
        font-size: 0.64rem;
        line-height: 1.2;
        z-index: 3;
    }

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

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

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

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

    .sub-hero h1 {
        font-size: 1.5rem;
    }

    .hub-card {
        padding: 20px;
    }

    .nav-inner,
    .sub-nav-inner {
        padding: 0 16px;
    }

    .container {
        padding: 0 16px;
    }

    .daily-rankings {
        padding: 14px;
    }

    .daily-rankings-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .daily-rankings-update {
        font-size: 0.75rem;
    }

    .daily-rank-tab {
        min-height: 34px;
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .daily-rank-mini-item {
        grid-template-columns: 22px 38px 1fr auto;
        gap: 8px;
        padding: 7px 8px;
    }

    .daily-rank-mini-cover {
        width: 38px;
        height: 52px;
    }

    .daily-rank-mini-name {
        font-size: 0.84rem;
    }

    .daily-rank-mini-sub,
    .daily-rank-mini-extra,
    .daily-rank-mini-value {
        font-size: 0.72rem;
    }

    /* Touch-friendly target sizes (44px minimum) */
    .sub-nav-link {
        padding: 10px 14px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .nav-link-hub {
        padding: 10px 16px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
    }

    .shortcut-pill {
        padding: 10px 18px;
        font-size: 0.82rem;
    }

    .btn-visit {
        padding: 12px 0;
        font-size: 0.92rem;
    }

    .btn-primary {
        padding: 12px 24px;
        font-size: 0.88rem;
    }

    .back-to-top {
        width: 44px;
        height: 44px;
    }

    /* Hide third poster track on mobile to reduce DOM rendering load */
    .poster-track.track-3 {
        display: none;
    }
}

/* ---------- Search Bar ---------- */
.search-wrap {
    max-width: 500px;
    margin: 4px auto 0;
    /* Tighter spacing to card grid below */
    position: relative;
    z-index: 10;
    animation: fadeIn 0.8s ease both;
}

.search-wrap input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Moved shadow to input itself */
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.search-wrap input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
    transform: translateY(-2px);
}

.search-wrap input::placeholder {
    color: var(--text-muted);
}

.search-wrap .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-wrap .search-icon .ui-icon {
    width: 18px;
    height: 18px;
    display: block;
    stroke-width: 2.1;
}

.search-count {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 8px;
    min-height: 1.2em;
}

.search-wrap-pan {
    max-width: 760px;
}

.search-wrap-pan .search-icon {
    top: 17px;
    transform: none;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.pan-search-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pan-drive-filters {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.pan-drive-chip {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pan-drive-chip:hover {
    border-color: rgba(0, 112, 243, 0.35);
    color: var(--text-primary);
}

.pan-drive-chip.is-active {
    border-color: rgba(0, 112, 243, 0.4);
    background: rgba(0, 112, 243, 0.1);
    color: #0b63e6;
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.16);
}

[data-theme='dark'] .pan-drive-chip.is-active {
    background: rgba(58, 134, 255, 0.2);
    color: #8db9ff;
}

.pan-search-btn {
    min-width: 160px;
    height: 40px;
    border: 1px solid rgba(0, 112, 243, 0.4);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.96), rgba(37, 99, 235, 0.92));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
}

.pan-search-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.pan-search-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

body.pan-search-modal-open {
    overflow: hidden;
}

.pan-search-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.pan-search-modal[hidden] {
    display: none !important;
}

.pan-search-modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.2), transparent 38%),
        rgba(6, 12, 24, 0.54);
    backdrop-filter: blur(18px) saturate(135%);
}

.pan-search-modal-panel {
    position: relative;
    z-index: 1;
    width: min(calc(100vw - 36px), 1280px);
    height: min(calc(100vh - 36px), 920px);
    max-height: min(calc(100vh - 36px), 920px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 30px;
    box-shadow: 0 36px 80px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(28px) saturate(150%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme='dark'] .pan-search-modal-panel {
    background: linear-gradient(180deg, rgba(14, 23, 42, 0.88), rgba(12, 18, 34, 0.78));
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 40px 90px rgba(2, 6, 23, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pan-search-modal-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 150px;
    background:
        radial-gradient(circle at 12% 12%, rgba(96, 165, 250, 0.24), transparent 42%),
        radial-gradient(circle at 88% 0%, rgba(244, 63, 94, 0.14), transparent 32%);
    pointer-events: none;
}

.pan-search-modal-head {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.pan-search-modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pan-search-modal-head h2 {
    margin: 0;
    font-size: 1.22rem;
    letter-spacing: -0.03em;
}

.pan-search-modal-subtitle {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.pan-search-modal-head-side {
    margin-left: auto;
    display: flex;
    align-items: flex-start;
}

.pan-search-modal-summary {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-theme='dark'] .pan-search-modal-summary {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.18);
}

.pan-search-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.58);
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.pan-search-modal-close:hover {
    color: var(--text-primary);
    border-color: rgba(0, 112, 243, 0.35);
    background: rgba(255, 255, 255, 0.76);
    transform: rotate(90deg);
}

.pan-search-modal-close:focus-visible,
.pan-search-type-badge:focus-visible,
.pan-search-work-card:focus-visible,
.pan-search-work-row:focus-visible,
.pan-search-group-back:focus-visible,
.pan-search-page-btn:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.pan-search-modal-meta-wrap {
    padding: 10px 20px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06));
}

.pan-search-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.pan-meta-prefix {
    color: var(--text-muted);
}

.pan-meta-keyword {
    color: var(--text-primary);
    font-weight: 600;
}

.pan-meta-sep {
    color: var(--text-muted);
}

.pan-search-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    appearance: none;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: #0b63e6;
    cursor: pointer;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.92;
}

.pan-search-type-badge:hover {
    border-color: rgba(37, 99, 235, 0.38);
    background: rgba(255, 255, 255, 0.82);
    transform: translateY(-1px);
}

.pan-search-type-badge.is-active {
    color: #ffffff;
    border-color: rgba(0, 112, 243, 0.95);
    background: linear-gradient(135deg, #0b63e6, #2d8cff);
    box-shadow: 0 12px 24px rgba(11, 99, 230, 0.28), 0 0 0 3px rgba(11, 99, 230, 0.14);
    transform: translateY(-1px) scale(1.02);
    opacity: 1;
}

.pan-search-type-badge.is-active::before {
    content: '';
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

[data-theme='dark'] .pan-search-type-badge.is-active::before {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

[data-theme='dark'] .pan-search-type-badge {
    background: rgba(15, 23, 42, 0.52);
    border-color: rgba(148, 163, 184, 0.18);
    color: #8db9ff;
}

.pan-search-active-filter {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 34px;
    margin: 10px 20px 0;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0b63e6;
    border: 1px solid rgba(11, 99, 230, 0.18);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 10px 24px rgba(11, 99, 230, 0.08);
}

.pan-search-active-filter[hidden] {
    display: none !important;
}

.pan-search-active-filter::before {
    content: '';
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 999px;
    background: #0b63e6;
    box-shadow: 0 0 0 4px rgba(11, 99, 230, 0.12);
}

[data-theme='dark'] .pan-search-active-filter {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(148, 163, 184, 0.16);
    color: #8db9ff;
}

[data-theme='dark'] .pan-search-active-filter::before {
    background: #8db9ff;
    box-shadow: 0 0 0 4px rgba(141, 185, 255, 0.12);
}

.pan-search-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: auto;
    padding: 12px 20px 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%), transparent;
}

.pan-search-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.pan-search-work-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    min-height: 132px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 14px 34px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.pan-search-work-card.is-no-poster {
    grid-template-columns: 1fr;
}

.pan-search-work-card:hover,
.pan-search-work-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.26);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 20px 42px rgba(37, 99, 235, 0.12);
    outline: none;
}

[data-theme='dark'] .pan-search-work-card {
    background: rgba(15, 23, 42, 0.56);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(2, 6, 23, 0.3);
}

[data-theme='dark'] .pan-search-work-card:hover,
[data-theme='dark'] .pan-search-work-card:focus-visible {
    background: rgba(20, 31, 54, 0.72);
    border-color: rgba(96, 165, 250, 0.28);
}

.pan-search-work-poster {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(15, 23, 42, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b63e6;
    font-size: 2rem;
    font-weight: 900;
}

.pan-search-work-card.is-no-poster .pan-search-work-poster {
    min-height: 44px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(11, 99, 230, 0.08), rgba(148, 163, 184, 0.08)),
        rgba(255, 255, 255, 0.34);
    border: 1px dashed rgba(37, 99, 235, 0.2);
}

.pan-search-work-poster-empty {
    width: 100%;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #0b63e6;
    font-size: 0.82rem;
    font-weight: 850;
}

.pan-search-work-poster-empty small {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 750;
}

[data-theme='dark'] .pan-search-work-card.is-no-poster .pan-search-work-poster {
    background: rgba(15, 23, 42, 0.46);
    border-color: rgba(96, 165, 250, 0.22);
}

.pan-search-work-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pan-search-work-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pan-search-work-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pan-search-work-badge,
.pan-search-work-count {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
}

.pan-search-work-badge {
    color: #ffffff;
    background: linear-gradient(135deg, #0b63e6, #2d8cff);
    box-shadow: 0 8px 18px rgba(11, 99, 230, 0.22);
}

.pan-search-work-count {
    color: var(--text-secondary);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.pan-search-work-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pan-search-work-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pan-search-work-drives {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.pan-search-work-drives span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    color: #0b63e6;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(11, 99, 230, 0.08);
    border: 1px solid rgba(11, 99, 230, 0.12);
}

[data-theme='dark'] .pan-search-work-drives span {
    color: #8db9ff;
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.16);
}

.pan-search-work-row-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pan-search-work-grid + .pan-search-work-row-list {
    margin-top: 12px;
}

.pan-search-work-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58), 0 12px 28px rgba(15, 23, 42, 0.07);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.pan-search-work-row:hover,
.pan-search-work-row:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.24);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 16px 34px rgba(37, 99, 235, 0.1);
    outline: none;
}

[data-theme='dark'] .pan-search-work-row {
    background: rgba(15, 23, 42, 0.54);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 36px rgba(2, 6, 23, 0.28);
}

.pan-search-work-row-main {
    min-width: 0;
}

.pan-search-work-row-title {
    margin: 0 0 7px;
    color: var(--text-primary);
    font-size: 0.98rem;
    line-height: 1.28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pan-search-work-row-meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pan-search-work-row-side {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pan-search-work-row-side span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.pan-search-work-row-side span:first-child {
    color: var(--text-secondary);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.pan-search-work-row-side span:last-child {
    color: #0b63e6;
    background: rgba(11, 99, 230, 0.08);
    border: 1px solid rgba(11, 99, 230, 0.14);
}

.pan-search-group-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 8px;
}

.pan-search-group-back {
    appearance: none;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: rgba(255, 255, 255, 0.62);
    color: #0b63e6;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.pan-search-group-back:hover {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(37, 99, 235, 0.36);
}

.pan-search-group-heading {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pan-result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 13px 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56), 0 12px 30px rgba(148, 163, 184, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.pan-result-row.has-poster {
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
}

.pan-result-poster {
    width: 74px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.12), rgba(148, 163, 184, 0.18));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.13);
}

.pan-result-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pan-result-row:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 18px 36px rgba(37, 99, 235, 0.09);
}

[data-theme='dark'] .pan-result-row {
    background: rgba(15, 23, 42, 0.52);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 36px rgba(2, 6, 23, 0.28);
}

.pan-result-main {
    min-width: 0;
}

.pan-result-title {
    margin: 0 0 6px;
    font-size: 0.98rem;
    line-height: 1.28;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pan-result-link {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pan-result-link:hover {
    text-decoration: underline;
}

.pan-result-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 132px;
    white-space: nowrap;
}

.pan-result-source {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.76rem;
    color: #0b63e6;
    border: 1px solid rgba(0, 112, 243, 0.24);
    background: rgba(0, 112, 243, 0.07);
}

.pan-result-date {
    font-size: 0.86rem;
    color: var(--text-primary);
    font-weight: 700;
}

.pan-result-extras {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.5);
}

[data-theme='dark'] .pan-result-extras {
    background: rgba(15, 23, 42, 0.48);
    border-color: rgba(148, 163, 184, 0.14);
}

.pan-search-empty {
    font-size: 0.86rem;
    color: var(--text-muted);
    padding: 12px 4px;
}

.pan-search-empty.is-error {
    color: var(--red);
}

.pan-search-pagination {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 10px 20px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.24));
    backdrop-filter: blur(18px);
}

.pan-search-page-info {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.48);
}

.pan-search-page-actions {
    display: flex;
    gap: 8px;
}

.pan-search-page-btn {
    height: 36px;
    min-width: 88px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.56);
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
    transition: all 0.2s ease;
}

.pan-search-page-btn:hover:not(:disabled) {
    border-color: rgba(0, 112, 243, 0.35);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.pan-search-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

[data-theme='dark'] .pan-search-page-info,
[data-theme='dark'] .pan-search-page-btn {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.14);
}

.latest-pan-resources {
    position: relative;
    margin: 12px 0 14px;
    padding: 16px;
    border: 1px solid rgba(0, 112, 243, 0.2);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 12% 8%, rgba(0, 112, 243, 0.13), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 247, 255, 0.92) 52%, rgba(255, 252, 239, 0.9) 100%);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.latest-pan-resources::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 112, 243, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 112, 243, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 70%);
}

[data-theme='dark'] .latest-pan-resources {
    border-color: rgba(86, 169, 255, 0.26);
    background:
        radial-gradient(circle at 12% 8%, rgba(86, 169, 255, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(18, 30, 48, 0.92) 55%, rgba(38, 33, 20, 0.88) 100%);
}

.latest-pan-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.latest-pan-head .section-bar {
    padding: 0;
    font-size: 1rem;
}

.latest-pan-desc {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.latest-pan-summary {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

[data-theme='dark'] .latest-pan-summary {
    border-color: rgba(251, 191, 36, 0.34);
    background: rgba(251, 191, 36, 0.13);
    color: #facc15;
}

.latest-pan-list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.latest-pan-card {
    display: flex;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.latest-pan-poster {
    position: relative;
    flex: 0 0 76px;
    width: 76px;
    aspect-ratio: 2 / 3;
    align-self: stretch;
    min-height: 112px;
    overflow: hidden;
    border-radius: 12px;
    background:
        linear-gradient(150deg, rgba(0, 112, 243, 0.16), rgba(20, 184, 166, 0.12)),
        rgba(241, 245, 249, 0.9);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.latest-pan-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.latest-pan-quality-badge,
.latest-pan-heat {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fff;
    line-height: 1;
    pointer-events: none;
}

.latest-pan-quality-badge {
    top: 8px;
    right: 8px;
    min-height: 26px;
    padding: 0 8px;
    background: rgba(6, 12, 28, 0.72);
    font-size: 0.8rem;
    font-weight: 900;
}

.latest-pan-heat {
    left: 8px;
    bottom: 8px;
    min-height: 24px;
    padding: 0 8px;
    background: linear-gradient(90deg, rgba(5, 10, 24, 0.76), rgba(5, 10, 24, 0.34));
    font-size: 0.76rem;
    font-weight: 850;
}

.latest-pan-poster-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 8px;
    color: #0b63e6;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
}

[data-theme='dark'] .latest-pan-poster {
    background:
        linear-gradient(150deg, rgba(86, 169, 255, 0.2), rgba(45, 212, 191, 0.12)),
        rgba(15, 23, 42, 0.9);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.34);
}

[data-theme='dark'] .latest-pan-poster-fallback {
    color: #93c5fd;
}

.latest-pan-card-body {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
}

.latest-pan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 112, 243, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 16px 32px rgba(0, 112, 243, 0.1);
}

[data-theme='dark'] .latest-pan-card {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 32px rgba(2, 6, 23, 0.28);
}

.latest-pan-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.latest-pan-card-meta--group {
    margin-top: auto;
}

.latest-pan-type,
.latest-pan-time,
.latest-pan-source,
.latest-pan-password,
.latest-pan-size,
.latest-pan-share-count,
.latest-pan-drive-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.latest-pan-share-count {
    color: #0b63e6;
    background: rgba(0, 112, 243, 0.1);
    border: 1px solid rgba(0, 112, 243, 0.2);
}

.latest-pan-drive-count {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.18);
}

.latest-pan-type {
    color: #0b63e6;
    background: rgba(0, 112, 243, 0.1);
    border: 1px solid rgba(0, 112, 243, 0.2);
}

.latest-pan-time {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.18);
}

.latest-pan-source {
    color: #9a3412;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.18);
}

.latest-pan-card-title {
    margin: 0;
    min-height: 0;
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-pan-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.latest-pan-title-row .latest-pan-card-title {
    flex: 1 1 auto;
    -webkit-line-clamp: 1;
}

.latest-pan-rating {
    flex: 0 0 auto;
    color: #ff6b2a;
    font-size: 0.95rem;
    font-weight: 900;
}

.latest-pan-card-line {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-pan-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.latest-pan-card-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.latest-pan-card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b72f0 0%, #0559d8 100%);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(0, 112, 243, 0.22);
}

.latest-pan-password {
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.56);
}

.latest-pan-size,
.pan-result-size {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #0f766e;
    border: 1px solid rgba(20, 184, 166, 0.2);
    background: rgba(20, 184, 166, 0.1);
    white-space: nowrap;
}

[data-theme='dark'] .latest-pan-size,
[data-theme='dark'] .pan-result-size {
    color: #5eead4;
    border-color: rgba(45, 212, 191, 0.22);
    background: rgba(20, 184, 166, 0.12);
}

.latest-pan-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b72f0 0%, #0559d8 100%);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0, 112, 243, 0.24);
}

.latest-pan-link:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.latest-pan-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.46);
    color: var(--text-muted);
    font-size: 0.88rem;
}

.latest-pan-empty.is-error {
    color: var(--red);
}

.latest-pan-more {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 36px;
    margin: 14px auto 0;
    padding: 0 16px;
    border: 1px solid rgba(0, 112, 243, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--blue);
    font-weight: 800;
    cursor: pointer;
}

.latest-pan-more:hover {
    background: rgba(0, 112, 243, 0.08);
}

.latest-pan-detail-open {
    overflow: hidden;
}

.latest-pan-detail-modal[hidden] {
    display: none;
}

.latest-pan-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.latest-pan-detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
}

.latest-pan-detail-panel {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 48px));
    height: min(92vh, 860px);
    max-height: min(92vh, 860px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 112, 243, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at 10% 5%, rgba(0, 112, 243, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 62%, rgba(255, 251, 236, 0.96) 100%);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.28);
    overflow: hidden;
}

[data-theme='dark'] .latest-pan-detail-panel {
    border-color: rgba(86, 169, 255, 0.24);
    background:
        radial-gradient(circle at 10% 5%, rgba(86, 169, 255, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 28, 46, 0.98) 60%, rgba(36, 31, 18, 0.96) 100%);
}

.latest-pan-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
}

.latest-pan-detail-kicker {
    margin: 0 0 4px;
    color: #0b63e6;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.latest-pan-detail-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 950;
}

.latest-pan-detail-summary {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.latest-pan-assistant {
    display: grid;
    flex: 0 0 auto;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(239, 246, 255, 0.76)),
        rgba(255, 255, 255, 0.72);
}

[data-theme='dark'] .latest-pan-assistant {
    border-color: rgba(96, 165, 250, 0.26);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.7)),
        rgba(15, 23, 42, 0.66);
}

.latest-pan-assistant-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.latest-pan-assistant h4,
.latest-pan-assistant-head p,
.latest-pan-assistant-groups strong,
.latest-pan-assistant-actions strong {
    margin: 0;
}

.latest-pan-assistant h4 {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 950;
}

.latest-pan-assistant-head p {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: right;
}

.latest-pan-recommendations {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.latest-pan-recommendation {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
    color: inherit;
    text-decoration: none;
}

[data-theme='dark'] .latest-pan-recommendation {
    background: rgba(15, 23, 42, 0.68);
}

.latest-pan-recommendation-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.latest-pan-recommendation-badges em {
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 900;
}

.latest-pan-recommendation strong {
    color: var(--text-primary);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.8rem;
    line-height: 1.3;
}

.latest-pan-recommendation small {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.latest-pan-assistant-groups,
.latest-pan-assistant-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.latest-pan-assistant-groups strong,
.latest-pan-assistant-actions strong {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 950;
}

.latest-pan-assistant-groups span,
.latest-pan-assistant-actions button {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 850;
}

.latest-pan-assistant-groups span {
    display: inline-grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
}

.latest-pan-assistant-actions button {
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    cursor: pointer;
}

.latest-pan-detail-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-secondary);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.latest-pan-detail-filters {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
}

.latest-pan-detail-filter {
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text-secondary);
    font-weight: 800;
    cursor: pointer;
}

.latest-pan-detail-filter.is-active {
    border-color: rgba(0, 112, 243, 0.32);
    background: rgba(0, 112, 243, 0.1);
    color: var(--blue);
}

.latest-pan-detail-list {
    display: grid;
    align-content: start;
    flex: 1 1 0;
    gap: 8px;
    grid-auto-rows: max-content;
    min-height: 0;
    padding-right: 4px;
    overflow: auto;
    overscroll-behavior: contain;
}

.latest-pan-detail-item {
    display: grid;
    align-self: start;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "meta footer"
        "title footer";
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
}

[data-theme='dark'] .latest-pan-detail-item,
[data-theme='dark'] .latest-pan-detail-close,
[data-theme='dark'] .latest-pan-detail-filter {
    background: rgba(15, 23, 42, 0.66);
}

.latest-pan-detail-meta {
    display: flex;
    grid-area: meta;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.resource-quality-tags {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.resource-quality-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    color: #0b63e6;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.7rem;
    font-weight: 850;
    line-height: 1;
}

[data-theme='dark'] .resource-quality-tags span {
    border-color: rgba(96, 165, 250, 0.22);
    color: #9cc5ff;
    background: rgba(96, 165, 250, 0.12);
}

.latest-pan-detail-item-title {
    grid-area: title;
    margin: 0;
    color: var(--text-primary);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 850;
}

.latest-pan-detail-footer {
    display: flex;
    grid-area: footer;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
}

.latest-pan-detail-empty {
    padding: 16px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    color: var(--text-muted);
}

.daily-rankings {
    margin: 10px 0 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 14px;
}

.daily-rankings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.daily-rankings-head .section-bar {
    padding: 0;
    font-size: 1rem;
}

.daily-rankings-update {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 112, 243, 0.28);
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.14) 0%, rgba(0, 112, 243, 0.08) 100%);
    font-size: 0.78rem;
    color: #0b63e6;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

[data-theme="dark"] .daily-rankings-update {
    border-color: rgba(86, 169, 255, 0.35);
    background: linear-gradient(135deg, rgba(86, 169, 255, 0.18) 0%, rgba(86, 169, 255, 0.1) 100%);
    color: #8ec7ff;
}

.daily-rankings-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.daily-rank-panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    overflow: hidden;
}

.daily-rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 10px 8px;
    border-bottom: 1px solid var(--border);
}

.daily-rank-panel-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.daily-rank-panel-badge {
    font-size: 0.72rem;
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.1);
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 600;
}

.daily-rank-panel-badge.is-hot {
    color: var(--red);
    border-color: rgba(224, 0, 0, 0.25);
    background: rgba(224, 0, 0, 0.08);
}

.daily-rank-panel-badge.is-movie {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(217, 119, 6, 0.1);
}

[data-theme="dark"] .daily-rank-panel-badge.is-movie {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.15);
}

.daily-rank-panel-badge.is-airing {
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.28);
    background: rgba(139, 92, 246, 0.1);
}

[data-theme="dark"] .daily-rank-panel-badge.is-airing {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.35);
    background: rgba(167, 139, 250, 0.15);
}

.daily-rank-panel-badge.is-weekly {
    color: #ea580c;
    border-color: rgba(234, 88, 12, 0.28);
    background: rgba(234, 88, 12, 0.1);
}

[data-theme="dark"] .daily-rank-panel-badge.is-weekly {
    color: #fdba74;
    border-color: rgba(253, 186, 116, 0.35);
    background: rgba(253, 186, 116, 0.15);
}

.daily-rank-tabs-shell {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    min-height: 50px;
}

.daily-rank-tabs-shell--static {
    grid-template-columns: minmax(0, 1fr);
}

.daily-rank-tabs-shell--compact {
    grid-template-columns: minmax(0, 1fr);
}

.daily-rank-tabs-nav {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(0, 112, 243, 0.42);
    background: linear-gradient(135deg, #1d7ef9 0%, #0b63e6 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.daily-rank-tabs-nav:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 7px 16px rgba(0, 112, 243, 0.34);
    filter: saturate(1.08);
}

.daily-rank-tabs-nav:disabled {
    opacity: 1;
    color: #6d7f98;
    background: linear-gradient(135deg, #e2ebf8 0%, #d6e2f4 100%);
    border-color: rgba(109, 127, 152, 0.35);
    cursor: default;
    box-shadow: none;
}

.daily-rank-panel-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.daily-rank-panel-tabs::-webkit-scrollbar {
    display: none;
}

.daily-rank-panel-tabs--static {
    overflow: hidden;
}

.daily-rank-panel-tabs--compact {
    justify-content: flex-start;
}

.daily-rank-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.daily-rank-tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.daily-rank-tab.is-active {
    background: #f5d77a;
    border-color: #efc961;
    color: #201d0f;
}

.daily-rank-tab.is-info {
    cursor: default;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.12) 0%, rgba(0, 112, 243, 0.06) 100%);
    border-color: rgba(0, 112, 243, 0.22);
    color: var(--blue);
    font-weight: 700;
}

.daily-rank-tab.is-info:hover {
    transform: none;
    border-color: rgba(0, 112, 243, 0.22);
    color: var(--blue);
}

[data-theme="dark"] .daily-rank-tab.is-active {
    background: #e8c763;
    border-color: #d8b14a;
    color: #131313;
}

.daily-rank-panel-list {
    display: grid;
    gap: 0;
}

.daily-rank-mini-item {
    display: grid;
    grid-template-columns: 24px 42px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    cursor: default;
    min-height: 68px;
    transition: background 0.2s ease;
}

.daily-rank-mini-item:hover {
    background: transparent;
}

.daily-rank-mini-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.55rem;
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', serif;
}

.daily-rank-mini-item:nth-child(1) .daily-rank-mini-rank,
.daily-rank-mini-item:nth-child(2) .daily-rank-mini-rank,
.daily-rank-mini-item:nth-child(3) .daily-rank-mini-rank {
    color: #f59e0b;
}

.daily-rank-mini-cover {
    width: 42px;
    height: 56px;
    border-radius: 7px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.daily-rank-mini-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.daily-rank-mini-name {
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daily-rank-mini-sub,
.daily-rank-mini-extra {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daily-rank-mini-platform {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #8b5cf6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

[data-theme="dark"] .daily-rank-mini-platform {
    color: #a78bfa;
}

/* ── Airing Today: Poster Card Grid ── */
.airing-section {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    overflow: hidden;
}

.airing-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border);
}

.airing-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.airing-section-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.airing-card-scroll {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 14px;
    -webkit-overflow-scrolling: touch;
}

.airing-card-scroll::-webkit-scrollbar {
    height: 4px;
}

.airing-card-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.airing-card-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.airing-card {
    flex: 0 0 140px;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    cursor: pointer;
}

.airing-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

[data-theme="dark"] .airing-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.airing-card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-skeleton);
    flex: 0 0 auto;
}

.airing-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.airing-card:hover .airing-card-poster img {
    transform: scale(1.05);
}

.airing-card-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 6px;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(99,102,241,0.4);
}

.airing-card-rating {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 5px;
    padding: 2px 6px;
    line-height: 1.3;
}

.airing-card-info {
    padding: 8px 2px 4px;
    width: 100%;
    min-width: 0;
}

.airing-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.airing-card-platform {
    font-size: 0.7rem;
    color: #8b5cf6;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .airing-card-platform {
    color: #a78bfa;
}

.airing-card-extra {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.airing-card.is-cover-fallback .airing-card-poster {
    background:
        radial-gradient(circle at 20% 18%, rgba(129, 140, 248, 0.28), transparent 28%),
        linear-gradient(180deg, #151826 0%, #0f1320 100%);
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.airing-card-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    background: linear-gradient(180deg, rgba(15, 18, 31, 0.12) 0%, rgba(15, 18, 31, 0.86) 100%);
}

.airing-card-fallback-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    color: #f5f7ff;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

/* ── Airing Carousel Arrows ── */
.airing-carousel {
    position: relative;
}

.airing-card-scroll {
    scrollbar-width: none;
}

.airing-card-scroll::-webkit-scrollbar {
    display: none;
}

.airing-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 44px;
    z-index: 2;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 300;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transition: opacity 0.25s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.airing-arrow--prev {
    left: 0;
    border-radius: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.25) 70%, transparent 100%);
    padding-right: 8px;
}

.airing-arrow--next {
    right: 0;
    border-radius: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.25) 70%, transparent 100%);
    padding-left: 8px;
}

.airing-arrow:hover {
    background: linear-gradient(to right, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
}

.airing-arrow--next:hover {
    background: linear-gradient(to left, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
}

.airing-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 767px) {
    .airing-arrow {
        width: 32px;
        font-size: 1.3rem;
    }
}

.daily-rank-mini-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--amber);
    white-space: nowrap;
    margin-left: 6px;
}

.daily-rank-mini-value.is-hot {
    color: #f97316;
}

.daily-rankings-empty {
    padding: 12px 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.daily-rankings-empty.is-error {
    color: var(--red);
}

.daily-rank-expand-btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    border: none;
    border-top: 1px solid var(--border);
    background: transparent;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.daily-rank-expand-btn:hover {
    background: rgba(0, 112, 243, 0.06);
}

[data-theme="dark"] .daily-rank-expand-btn:hover {
    background: rgba(50, 145, 255, 0.1);
}

.daily-rank-mini-item.is-skeleton {
    pointer-events: none;
}

.daily-rank-mini-item.is-skeleton .daily-rank-mini-rank,
.daily-rank-mini-item.is-skeleton .daily-rank-mini-cover,
.daily-rank-mini-item.is-skeleton .daily-rank-mini-name,
.daily-rank-mini-item.is-skeleton .daily-rank-mini-sub,
.daily-rank-mini-item.is-skeleton .daily-rank-mini-value {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, rgba(255, 255, 255, 0.45) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    color: transparent;
    animation: shimmer 1.2s linear infinite;
    border-radius: 6px;
}

.daily-rank-mini-item.is-skeleton .daily-rank-mini-name {
    height: 12px;
}

.daily-rank-mini-item.is-skeleton .daily-rank-mini-sub {
    height: 10px;
    margin-top: 2px;
}

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

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

.resource-card.search-hidden {
    display: none;
}

/* ---------- Dark Mode Toggle ---------- */
.theme-toggle {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
    margin-left: 12px;
}

.theme-toggle-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--bg-secondary);
}

.theme-toggle:active {
    transform: scale(0.9);
}

/* Hub card hidden state for search */
.hub-card.search-hidden {
    display: none;
}

/* ---------- Disclaimer ---------- */
.disclaimer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-muted);
    margin-top: 10px;
    opacity: 0.7;
}

.disclaimer .ui-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ---------- Focus Visible (Keyboard a11y) ---------- */
.btn-primary:focus-visible,
.btn-visit:focus-visible,
.nav-link-hub:focus-visible,
.sub-nav-link:focus-visible,
.theme-toggle:focus-visible,
.shortcut-pill:focus-visible,
.back-to-top:focus-visible,
.hub-card:focus-visible,
.daily-rank-tab:focus-visible,
.daily-rank-mini-item:focus-visible,
.latest-pan-card:focus-visible,
.latest-pan-link:focus-visible,
.latest-pan-more:focus-visible,
.latest-pan-detail-close:focus-visible,
.latest-pan-detail-filter:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.search-wrap input:focus-visible {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
}

/* ---------- Reduced Motion Preference ---------- */
@media (prefers-reduced-motion: reduce) {
    .poster-track {
        animation: none !important;
    }

    .hub-card {
        animation: none !important;
    }

    .resource-card {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .daily-rank-mini-item,
    .daily-rank-tab,
    .latest-pan-detail-filter {
        transition: none !important;
    }

    .airing-card,
    .airing-card-poster img,
    .airing-arrow,
    .daily-rank-expand-btn,
    .latest-pan-card,
    .latest-pan-link {
        transition: none !important;
    }

    .airing-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .airing-card:hover .airing-card-poster img {
        transform: none !important;
    }

    .daily-rank-mini-item.is-skeleton .daily-rank-mini-rank,
    .daily-rank-mini-item.is-skeleton .daily-rank-mini-cover,
    .daily-rank-mini-item.is-skeleton .daily-rank-mini-name,
    .daily-rank-mini-item.is-skeleton .daily-rank-mini-sub,
    .daily-rank-mini-item.is-skeleton .daily-rank-mini-value {
        animation: none !important;
    }

    .resource-card.card-visible {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 900px) {
    .latest-pan-resources {
        padding: 14px;
    }

    .latest-pan-head {
        flex-direction: column;
        align-items: stretch;
    }

    .latest-pan-summary {
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .latest-pan-list {
        grid-template-columns: 1fr;
    }

    .latest-pan-poster {
        flex-basis: 68px;
        width: 68px;
        min-height: 102px;
    }

    .latest-pan-card-title {
        min-height: 0;
    }

    .latest-pan-detail-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .latest-pan-detail-panel {
        width: min(100%, calc(100vw - 20px));
        height: auto;
        max-height: min(90vh, calc(100dvh - 20px));
        border-radius: 22px;
        padding: 15px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .latest-pan-detail-title {
        font-size: 1.15rem;
    }

    .latest-pan-assistant-head {
        flex-direction: column;
    }

    .latest-pan-assistant-head p {
        text-align: left;
    }

    .latest-pan-recommendations {
        grid-template-columns: 1fr;
    }

    .latest-pan-detail-list {
        flex: 0 0 auto;
        min-height: 0;
        overflow: visible;
        padding-right: 0;
    }

    .latest-pan-detail-item {
        grid-template-columns: 1fr;
        grid-template-areas:
            "meta"
            "title"
            "footer";
    }

    .pan-search-modal {
        padding: 8px;
    }

    .pan-search-modal-panel {
        max-height: 90vh;
        border-radius: 24px;
    }

    .pan-search-modal-head {
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 16px 14px 12px;
    }

    .pan-search-modal-title-group,
    .pan-search-modal-head-side {
        width: 100%;
    }

    .pan-search-modal-head-side {
        margin-left: 0;
    }

    .pan-search-modal-summary {
        width: 100%;
        justify-content: flex-start;
    }

    .pan-search-modal-meta-wrap,
    .pan-search-list,
    .pan-search-pagination {
        padding-left: 14px;
        padding-right: 14px;
    }

    .pan-search-active-filter {
        margin: 12px 14px 0;
    }

    .pan-search-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pan-search-page-actions {
        justify-content: space-between;
    }

    .pan-search-actions {
        align-items: stretch;
    }

    .pan-drive-filters {
        justify-content: flex-start;
    }

    .pan-drive-chip {
        font-size: 0.82rem;
        padding: 0 12px;
    }

    .pan-search-btn {
        width: 100%;
        max-width: 220px;
    }

    .pan-search-work-grid {
        grid-template-columns: 1fr;
    }

    .pan-search-work-card {
        grid-template-columns: 74px minmax(0, 1fr);
        min-height: 116px;
        padding: 10px;
        gap: 12px;
        border-radius: 16px;
    }

    .pan-search-work-poster {
        min-height: 96px;
        border-radius: 12px;
    }

    .pan-search-work-title {
        font-size: 0.94rem;
    }

    .pan-search-work-meta {
        font-size: 0.78rem;
    }

    .pan-search-work-drives span {
        font-size: 0.68rem;
        min-height: 24px;
    }

    .pan-search-group-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pan-search-work-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
        min-height: 0;
        padding: 13px;
    }

    .pan-search-work-row-side {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .pan-result-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 14px;
    }

    .pan-result-row.has-poster {
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: start;
    }

    .pan-result-poster {
        width: 58px;
        border-radius: 10px;
        grid-row: span 2;
    }

    .pan-result-side {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        min-width: 0;
        gap: 8px;
    }
}

/* 首页新版结构：深色搜索首屏 + 模块化内容区 */
body[data-page="index"] {
    background: radial-gradient(circle at 10% 0%, rgba(56, 130, 255, 0.10), transparent 28%), radial-gradient(circle at 95% 18%, rgba(245, 156, 67, 0.09), transparent 22%), #f6f8fc;
    color: #0d172a;
}

body[data-page="index"] .container { max-width: 1200px; }

body[data-page="index"] .nav-bar {
    position: sticky;
    top: 0;
    z-index: 80;
    padding: 0;
    background: rgba(3, 10, 28, 0.96);
    border-bottom: 1px solid rgba(160, 184, 255, 0.18);
    box-shadow: 0 12px 30px rgba(2, 10, 30, 0.26);
    backdrop-filter: blur(18px);
}

body[data-page="index"] .nav-inner {
    width: min(1700px, calc(100% - 32px));
    max-width: 1700px;
    min-height: 64px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

body[data-page="index"] .nav-brand {
    flex: 0 0 auto;
    min-width: 148px;
    min-height: 46px;
    padding: 4px 10px 4px 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #f7fbff;
    gap: 9px;
    text-decoration: none;
    border: 1px solid rgba(193, 209, 255, 0.12);
    box-shadow: none;
}

body[data-page="index"] .nav-brand-icon,
body[data-page="index"] .brand-mark {
    width: 38px;
    height: 38px;
}

body[data-page="index"] .nav-brand-icon { border-radius: 10px; background: transparent; }
body[data-page="index"] .nav-brand-copy { display: grid; gap: 1px; line-height: 1.1; }
body[data-page="index"] .nav-brand-copy strong { color: #f8fbff; font-size: 1.12rem; letter-spacing: 0; }
body[data-page="index"] .nav-brand-copy small { display: none; }

body[data-page="index"] .nav-links {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

body[data-page="index"] .nav-links::-webkit-scrollbar { display: none; }

body[data-page="index"] .nav-link-hub {
    flex: 0 0 auto;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    padding: 8px 11px;
    border-radius: 9px;
    color: rgba(239, 245, 255, 0.88);
    font-size: 0.9rem;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
}

body[data-page="index"] .nav-link-hub:hover,
body[data-page="index"] .nav-link-hub.active {
    color: #fff;
    border-color: rgba(91, 142, 255, 0.42);
    background: rgba(41, 96, 214, 0.46);
}

body[data-page="index"] .nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

body[data-page="index"] .bookmark-btn,
body[data-page="index"] .theme-toggle {
    min-height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(193, 209, 255, 0.28);
    background: rgba(255, 255, 255, 0.06);
    color: #f7fbff;
    box-shadow: none;
}

body[data-page="index"] .bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 13px;
    font-weight: 700;
    cursor: pointer;
}

body[data-page="index"] .theme-toggle {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    margin-left: 0;
    padding: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    transform: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

body[data-page="index"] .theme-toggle-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: none;
}

body[data-page="index"] .theme-toggle:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(193, 209, 255, 0.40);
}

body[data-page="index"] .theme-toggle:active {
    transform: none;
}

body[data-page="index"] .hub-hero {
    position: relative;
    max-width: none;
    min-height: 350px;
    margin: 0;
    padding: 54px 0 148px;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(90deg, rgba(3, 9, 28, 0.98), rgba(4, 14, 43, 0.86) 52%, rgba(2, 8, 25, 0.58)), url("assets/images/hero-bg.jpg") center/cover no-repeat;
    box-shadow: none;
}

body[data-page="index"] .hub-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 0 58%, rgba(86, 158, 255, 0.20) 58.3%, transparent 59%), radial-gradient(circle at 92% 34%, rgba(83, 154, 255, 0.34), transparent 26%);
    pointer-events: none;
}

body[data-page="index"] .hero-poster-wall,
body[data-page="index"] .hero-banner-overlay { display: none; }
body[data-page="index"] .hero-content { position: relative; z-index: 1; text-align: center; }

body[data-page="index"] .hero-content h1 {
    max-width: none;
    margin: 0 auto 14px;
    color: #fff;
    font-size: clamp(2.1rem, 5vw, 3.45rem);
    font-weight: 900;
    letter-spacing: 0;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

body[data-page="index"] .hub-hero-desc {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(236, 243, 255, 0.88);
    font-size: clamp(0.98rem, 2vw, 1.2rem);
    line-height: 1.8;
}

body[data-page="index"] main.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 0;
    padding-bottom: 0;
}

body[data-page="index"] .search-wrap-pan {
    order: 1;
    width: min(840px, calc(100% - 32px));
    margin: -126px auto 0;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
}

body[data-page="index"] .search-wrap-pan .search-icon {
    top: 23px;
    left: 22px;
    z-index: 2;
}

body[data-page="index"] .search-wrap-pan input[type="search"] {
    width: 100%;
    height: 62px;
    padding: 0 174px 0 56px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.98);
    color: #14213d;
    font-size: 1rem;
    box-shadow: 0 24px 54px rgba(4, 14, 42, 0.24);
}

body[data-page="index"] .pan-search-actions { margin-top: 12px; display: block; }

body[data-page="index"] .pan-search-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 142px;
    min-width: 142px;
    height: 52px;
    border-radius: 12px;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 900;
    background: linear-gradient(135deg, #5e7dff, #2373ff);
    box-shadow: 0 12px 26px rgba(35, 115, 255, 0.34);
}

body[data-page="index"] .pan-drive-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
}

body[data-page="index"] .pan-drive-chip {
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-page="index"] .pan-drive-chip:hover,
body[data-page="index"] .pan-drive-chip.is-active {
    color: #fff;
    background: linear-gradient(135deg, #4b75ff, #1d64dc);
}

body[data-page="index"] .search-count {
    min-height: 18px;
    margin-top: 8px;
    color: rgba(229, 238, 255, 0.78);
    text-align: center;
}

body[data-page="index"] .hero-feature-strip {
    order: 2;
    width: min(760px, calc(100% - 32px));
    margin: -2px auto 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

body[data-page="index"] .hero-feature-card {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
}

body[data-page="index"] .hero-feature-card strong,
body[data-page="index"] .hero-feature-card small { display: block; }
body[data-page="index"] .hero-feature-card strong { font-size: 1rem; }
body[data-page="index"] .hero-feature-card small { margin-top: 4px; color: rgba(232, 241, 255, 0.76); font-size: 0.82rem; }

body[data-page="index"] .hero-feature-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

body[data-page="index"] .hero-feature-icon--search { background: linear-gradient(135deg, #315bbd, #153c90); }
body[data-page="index"] .hero-feature-icon--latest { background: linear-gradient(135deg, #2fce7b, #088e66); }
body[data-page="index"] .hero-feature-icon--category { background: linear-gradient(135deg, #8d5cff, #5b39d7); }
body[data-page="index"] .hero-feature-icon .ui-icon { width: 26px; height: 26px; filter: brightness(0) invert(1); }

body[data-page="index"] .latest-pan-resources {
    order: 3;
    margin: 0;
    padding: 22px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body[data-page="index"] .latest-pan-head { align-items: center; margin-bottom: 14px; }

body[data-page="index"] .section-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #0e1830;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0;
}

body[data-page="index"] .section-bar::before {
    content: "";
    width: 4px;
    height: 22px;
    border-radius: 999px;
    background: #1c76ff;
}

body[data-page="index"] .latest-pan-desc { margin-top: 10px; color: #6c778b; }
body[data-page="index"] .latest-pan-summary { border-color: rgba(230, 126, 34, 0.25); color: #b95112; background: #fff5e8; }
body[data-page="index"] .latest-pan-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

body[data-page="index"] .latest-pan-card {
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body[data-page="index"] .latest-pan-poster,
body[data-page="index"] .latest-pan-poster-fallback {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

body[data-page="index"] .latest-pan-poster {
    min-height: 0;
    aspect-ratio: 2 / 3;
    box-shadow: 0 16px 30px rgba(16, 31, 58, 0.14);
}

body[data-page="index"] .latest-pan-card:hover {
    transform: translateY(-3px);
    box-shadow: none;
}

body[data-page="index"] .latest-pan-card-body {
    gap: 5px;
    padding: 10px 2px 0;
}

body[data-page="index"] .latest-pan-card-title {
    color: #242a36;
    font-size: 0.94rem;
    line-height: 1.25;
}

body[data-page="index"] .latest-pan-rating {
    color: #ff7134;
    font-size: 0.92rem;
}

body[data-page="index"] .latest-pan-card-line {
    color: #737d8f;
    font-size: 0.8rem;
}

body[data-page="index"] .latest-pan-title { font-size: 0.95rem; }
body[data-page="index"] .home-section { margin: 0; }

body[data-page="index"] .home-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

body[data-page="index"] .home-section-head h2 {
    margin: 0;
    color: #0e1830;
    font-size: 1.45rem;
    line-height: 1.2;
}

body[data-page="index"] .home-section-head span { color: #7b879b; font-size: 0.9rem; }
body[data-page="index"] .home-categories {
    order: 4;
    margin-bottom: -10px;
}

body[data-page="index"] .hub-grid {
    order: 5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: -10px 0 0;
    padding: 0;
}

body[data-page="index"] .hub-card {
    min-height: 132px;
    padding: 20px 22px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(28, 52, 101, 0.16);
}

body[data-page="index"] .hub-card:nth-child(1) { background: linear-gradient(135deg, #4056d6, #697bf6); }
body[data-page="index"] .hub-card:nth-child(2) { background: linear-gradient(135deg, #7746e8, #9562f4); }
body[data-page="index"] .hub-card:nth-child(3) { background: linear-gradient(135deg, #dc2d69, #ff6771); }
body[data-page="index"] .hub-card:nth-child(4) { background: linear-gradient(135deg, #ff8b35, #ffbd62); }
body[data-page="index"] .hub-card:nth-child(5) { background: linear-gradient(135deg, #16a57e, #35c896); }
body[data-page="index"] .hub-card:nth-child(6) { background: linear-gradient(135deg, #0f9abc, #22c0df); }
body[data-page="index"] .hub-card:nth-child(7) { background: linear-gradient(135deg, #2f66db, #5188fb); }
body[data-page="index"] .hub-card:nth-child(8) { background: linear-gradient(135deg, #6d4ade, #9871f4); }
body[data-page="index"] .hub-card-header { align-items: flex-start; gap: 14px; }

body[data-page="index"] .hub-card .resource-icon {
    width: 62px !important;
    height: 62px !important;
    border: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
}

body[data-page="index"] .hub-card .resource-icon .material-local {
    width: 62px;
    height: 62px;
    object-fit: contain;
    filter: none;
}

body[data-page="index"] .hub-card-title { color: #fff; font-size: 1.16rem; font-weight: 900; }
body[data-page="index"] .hub-card-sub,
body[data-page="index"] .hub-card-desc { color: rgba(255, 255, 255, 0.84); }

body[data-page="index"] .hub-card-desc {
    display: -webkit-box;
    margin-top: 10px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.84rem;
}

body[data-page="index"] .hub-card-actions { margin-top: 12px; justify-content: flex-end; }

body[data-page="index"] .hub-card .btn-primary {
    min-height: 28px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: none;
}

body[data-page="index"] .starter-section { order: 6; }

body[data-page="index"] .starter-grid,
body[data-page="index"] .tool-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

body[data-page="index"] .starter-card {
    padding: 18px 16px;
    border: 1px solid rgba(203, 213, 229, 0.8);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(20, 38, 66, 0.06);
}

body[data-page="index"] .starter-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: -8px 0 8px;
    background: transparent;
}

body[data-page="index"] .starter-icon img {
    width: 64px;
    height: 64px;
    display: block;
    object-fit: contain;
}
body[data-page="index"] .starter-card h3 { margin: 0 0 4px; font-size: 0.98rem; }
body[data-page="index"] .starter-card p,
body[data-page="index"] .starter-card li { color: #6d778a; font-size: 0.82rem; }
body[data-page="index"] .starter-card p { margin: 0 0 12px; }
body[data-page="index"] .starter-card ol { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
body[data-page="index"] .starter-card li span { display: inline-block; width: 18px; color: #0e1830; }
body[data-page="index"] .starter-card li a {
    color: #4f5f78;
    text-decoration: none;
    border-bottom: 1px dashed rgba(79, 95, 120, 0.28);
}

body[data-page="index"] .starter-card li a:hover {
    color: #1a65e8;
    border-bottom-color: rgba(26, 101, 232, 0.45);
}

body[data-page="index"] .starter-card > a { display: grid; place-items: center; min-height: 30px; border-radius: 7px; background: #eaf1ff; color: #1a65e8; font-weight: 800; text-decoration: none; }

body[data-page="index"] .daily-rankings {
    order: 7;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body[data-page="index"] .daily-rankings-head { margin-bottom: 14px; }

body[data-page="index"] .airing-section,
body[data-page="index"] .daily-rank-panel {
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 229, 0.78);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(20, 38, 66, 0.06);
}

body[data-page="index"] .daily-rankings-board { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
body[data-page="index"] .tool-section { order: 8; }

body[data-page="index"] .tool-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-areas: "icon title" "icon desc" "icon link";
    gap: 3px 12px;
    align-items: center;
    padding: 18px 16px;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 229, 0.78);
    background: rgba(255, 255, 255, 0.96);
    color: #0e1830;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(20, 38, 66, 0.06);
}

body[data-page="index"] .tool-icon {
    grid-area: icon;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
}

body[data-page="index"] .tool-icon--tv { background: linear-gradient(135deg, #78c95f, #35a65a); }
body[data-page="index"] .tool-icon--player { background: linear-gradient(135deg, #a960ef, #7d42df); }
body[data-page="index"] .tool-icon--shield { background: linear-gradient(135deg, #58bce4, #278cc5); }
body[data-page="index"] .tool-icon--subtitle { background: linear-gradient(135deg, #8d83ff, #5c54d8); }
body[data-page="index"] .tool-icon--sports { background: linear-gradient(135deg, #48c7a1, #1c9879); }
body[data-page="index"] .tool-icon--more { background: linear-gradient(135deg, #80a9f5, #4e7fdd); }
body[data-page="index"] .tool-card strong { grid-area: title; font-size: 0.98rem; }
body[data-page="index"] .tool-card small { grid-area: desc; color: #6f7b8e; }
body[data-page="index"] .tool-card em { grid-area: link; color: #476ee8; font-style: normal; font-size: 0.82rem; }

body[data-page="index"] .info-box { display: none; }

body[data-page="index"] .home-footer {
    margin-top: 34px;
    padding: 28px 0 0;
    color: rgba(237, 244, 255, 0.82);
    background: linear-gradient(180deg, #07152c, #0a1b34);
}

body[data-page="index"] .footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
}

body[data-page="index"] .home-footer section { min-width: 0; }
body[data-page="index"] .home-footer h2 { margin: 0 0 12px; color: #fff; font-size: 1rem; }
body[data-page="index"] .home-footer p { margin: 6px 0; color: rgba(237, 244, 255, 0.72); line-height: 1.75; }
body[data-page="index"] .home-footer a { color: #dbe8ff; text-decoration: none; }

body[data-page="index"] .footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 26px;
    margin-top: 26px;
    padding: 14px 0;
    border-top: 1px solid rgba(219, 232, 255, 0.12);
    color: rgba(237, 244, 255, 0.72);
    font-size: 0.86rem;
}

@media (max-width: 1100px) {
    body[data-page="index"] .nav-inner { width: min(100% - 20px, 1700px); }
    body[data-page="index"] .bookmark-btn { display: none; }
    body[data-page="index"] .latest-pan-list,
    body[data-page="index"] .hub-grid,
    body[data-page="index"] .daily-rankings-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body[data-page="index"] .starter-grid,
    body[data-page="index"] .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    body[data-page="index"] .nav-inner { min-height: 58px; gap: 10px; }
    body[data-page="index"] .nav-brand-copy small,
    body[data-page="index"] .nav-links { display: none; }
    body[data-page="index"] .nav-brand { flex: 1; }
    body[data-page="index"] .hub-hero { min-height: 0; padding: 34px 0 205px; }
    body[data-page="index"] .hero-content h1 { max-width: 12.5em; font-size: 1.68rem; line-height: 1.16; }
    body[data-page="index"] .hub-hero-desc { max-width: 19em; font-size: 0.95rem; line-height: 1.55; }
    body[data-page="index"] main.container { gap: 20px; }
    body[data-page="index"] .search-wrap-pan { width: calc(100% - 28px); margin-top: -150px; }
    body[data-page="index"] .search-wrap-pan input[type="search"] { height: 54px; padding: 0 102px 0 48px; font-size: 0.9rem; }
    body[data-page="index"] .search-wrap-pan .search-icon { top: 19px; left: 18px; }
    body[data-page="index"] .pan-search-btn { top: 5px; right: 5px; width: 92px; min-width: 92px; height: 44px; font-size: 0.9rem; border-radius: 12px; }
    body[data-page="index"] .pan-search-actions { margin-top: 10px; }
    body[data-page="index"] .pan-drive-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 0 2px 8px;
        scrollbar-width: none;
    }
    body[data-page="index"] .pan-drive-filters::-webkit-scrollbar { display: none; }
    body[data-page="index"] .pan-drive-chip {
        flex: 0 0 auto;
        white-space: nowrap;
        min-width: max-content;
    }
    body[data-page="index"] .hero-feature-strip { width: calc(100% - 28px); grid-template-columns: 1fr; gap: 12px; margin: 4px auto 18px; }
    body[data-page="index"] .hero-feature-card {
        min-height: 74px;
        padding: 12px 14px;
        border: 1px solid rgba(203, 213, 229, 0.78);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.96);
        color: #0e1830;
        box-shadow: 0 14px 30px rgba(20, 38, 66, 0.08);
    }
    body[data-page="index"] .hero-feature-card strong { color: #0e1830; font-size: 0.98rem; }
    body[data-page="index"] .hero-feature-card small { color: #6f7b8e; font-size: 0.8rem; }
    body[data-page="index"] .hero-feature-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    body[data-page="index"] .hero-feature-icon .ui-icon { width: 22px; height: 22px; }
    body[data-page="index"] .latest-pan-head,
    body[data-page="index"] .home-section-head,
    body[data-page="index"] .daily-rankings-head { align-items: flex-start; flex-direction: column; }
    body[data-page="index"] .latest-pan-list,
    body[data-page="index"] .hub-grid,
    body[data-page="index"] .starter-grid,
    body[data-page="index"] .daily-rankings-board,
    body[data-page="index"] .tool-grid,
    body[data-page="index"] .footer-grid { grid-template-columns: 1fr; }
    body[data-page="index"] .tool-card { grid-template-columns: 44px 1fr; }
}

/* 首页首屏微调：让搜索标签和三枚能力入口稳定落在深色区域 */
body[data-page="index"] .hub-hero {
    padding-bottom: 300px;
}

body[data-page="index"] .search-wrap-pan {
    width: min(960px, calc(100% - 32px));
    margin-top: -278px;
}

body[data-page="index"] .pan-drive-chip {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.84rem;
}

@media (max-width: 720px) {
    body[data-page="index"] .hub-hero {
        padding-bottom: 205px;
    }

    body[data-page="index"] .search-wrap-pan {
        width: calc(100% - 28px);
        margin-top: -150px;
    }

    body[data-page="index"] .latest-pan-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 12px;
    }

    body[data-page="index"] .latest-pan-card-body {
        padding-top: 8px;
    }

    body[data-page="index"] .latest-pan-card-title,
    body[data-page="index"] .latest-pan-rating {
        font-size: 0.86rem;
    }

    body[data-page="index"] .latest-pan-card-line {
        font-size: 0.74rem;
    }

    body[data-page="index"] .latest-pan-heat {
        font-size: 0.72rem;
    }
}
