.home-container {
    display: block !important;
    flex: 1 1 auto;
}

.hero-shell.home-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 380px);
    align-items: stretch;
    gap: 16px;
    height: 400px;
    margin: 0 0 14px !important;
}

.hero-main.search-section,
.hero-aside.info-section {
    box-sizing: border-box;
    min-width: 0;
    height: 400px;
    border: 1px solid var(--theme-border) !important;
    border-radius: 16px !important;
    background: var(--theme-surface) !important;
    box-shadow: var(--layout-shadow) !important;
}

.hero-main.search-section {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 3rem 2rem 1.5rem !important;
    overflow: visible;
}

.hero-main.search-section::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse 55% 70% at 12% 100%, rgba(var(--theme-primary-rgb), 0.16), rgba(var(--theme-primary-rgb), 0.05) 45%, transparent 70%);
    pointer-events: none;
}

.hero-top {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 7.5rem;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hero-intro.search-header {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    margin: 0 !important;
}

.hero-title.search-title {
    margin: 0 !important;
    color: var(--theme-text) !important;
    font-family: var(--font-display) !important;
    font-size: 2.75rem !important;
    font-weight: 400 !important;
    font-synthesis: none;
    line-height: 1.25;
    white-space: nowrap;
}

.hero-title-accent {
    position: relative;
    z-index: 0;
    display: inline-block;
    color: var(--theme-primary) !important;
    background: none !important;
    font-size: inherit;
    font-weight: inherit !important;
    line-height: 1.25;
    letter-spacing: inherit;
    vertical-align: baseline;
    -webkit-text-fill-color: initial !important;
}

.hero-title-accent-text {
    position: relative;
    z-index: 1;
    font-weight: inherit !important;
}

.hero-title-accent .hero-title-brush {
    position: absolute;
    z-index: 0;
    left: -2px;
    bottom: -8px;
    width: 100%;
    height: 1em;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
    user-select: none;
}

.hero-subtitle.search-subtitle {
    max-width: 36rem;
    margin: 0 !important;
    color: var(--theme-text-secondary) !important;
    font-family: var(--font-display) !important;
    font-size: 2rem !important;
    font-weight: 500 !important;
    font-synthesis: none;
    line-height: 1.4;
}

.hero-mascot {
    position: absolute;
    z-index: 0;
    top: -6px;
    right: 20px;
    width: clamp(112px, 22%, 168px);
    height: auto;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
}

.hero-pan-support {
    display: flex;
    min-height: 20px;
    margin: 0;
    align-items: baseline;
    gap: 0;
    color: var(--theme-text-secondary);
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
}

.hero-pan-support strong {
    flex: 0 0 auto;
    margin-right: 8px;
    color: var(--theme-text-secondary);
    font-weight: 600;
}

.hero-pan-support span {
    color: var(--theme-text);
    font-weight: 500;
}

.hero-pan-support i {
    margin: 0 8px;
    color: #c4cada;
    font-style: normal;
}

.hero-pan-support i:last-child {
    display: none;
}

.hero-main .search-box-wrapper {
    position: relative;
    z-index: 2;
    width: 100% !important;
    margin: 0 !important;
}

.search-bar-large.search-input-box {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    display: flex !important;
    min-height: 52px;
    align-items: center;
    padding: 4px !important;
    border: 1px solid #fff !important;
    border-radius: 14px !important;
    background: rgba(241, 241, 241, 0.5) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: none !important;
    overflow: visible;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.search-bar-large.search-input-box:focus-within {
    border-color: var(--theme-primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb), 0.12) !important;
}

.search-pan-select {
    position: relative;
    display: flex;
    width: 82px;
    height: 44px;
    flex: 0 0 82px;
    align-items: center;
    border: 1px solid rgba(var(--theme-primary-rgb), 0.14);
    border-radius: 10px;
    background: #fff;
}

.search-pan-select select {
    width: 100%;
    height: 100%;
    padding: 0 28px 0 14px;
    border: 0;
    outline: 0;
    color: var(--theme-text);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    appearance: none;
    cursor: pointer;
}

.search-pan-select svg {
    position: absolute;
    right: 10px;
    pointer-events: none;
}

.search-bar-large .input-search-icon {
    display: none !important;
}

.search-bar-large.search-input-box input {
    min-width: 0;
    height: 44px !important;
    flex: 1;
    padding: 0 13px !important;
    border: 0 !important;
    outline: 0 !important;
    color: var(--theme-text) !important;
    background: transparent !important;
    font-size: 15px !important;
    line-height: 1.5;
}

.search-bar-large.search-input-box input::placeholder {
    color: var(--theme-text-secondary);
    opacity: 1;
}

.search-bar-large .search-btn {
    display: inline-flex !important;
    height: 44px !important;
    min-width: 84px;
    margin: 0 !important;
    padding: 0 26px !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: var(--theme-primary-gradient) !important;
    box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb), 0.28) !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.search-bar-large .search-btn:hover {
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.35) !important;
    transform: translateY(-1px);
}

.pan-type-tabs,
.pan-type-mobile {
    display: none !important;
}

.hero-history {
    --history-height: 100px;
    --history-open-extra: 54px;
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: var(--history-height);
    flex: 1 1 var(--history-height);
    overflow: visible;
}

.hero-history.is-open {
    z-index: 40;
}

.hero-main.search-section.history-is-open {
    overflow: visible;
}

.hero-history-surface {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    transition: height 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.hero-history.is-open .hero-history-surface {
    height: calc(100% + var(--history-open-extra));
    bottom: auto;
    border-color: rgba(var(--theme-primary-rgb), 0.16);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 32px rgba(31, 36, 48, 0.14), 0 4px 12px rgba(31, 36, 48, 0.06);
}

.hero-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    flex: 0 0 auto;
}

.hero-history-label {
    color: var(--theme-text-secondary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.hero-history-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.hero-history-more-btn,
.hero-history-clear {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}

.hero-history-more-btn {
    color: var(--theme-primary);
}

.hero-history-more-btn svg {
    transition: transform 0.18s ease;
}

.hero-history-more-btn.is-open svg {
    transform: rotate(180deg);
}

.hero-history-clear {
    color: var(--theme-text-secondary);
}

.hero-history-clear:hover {
    color: #f04444;
}

.hero-history-tags {
    display: flex;
    min-height: 0;
    flex: 1;
    align-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    overflow: hidden;
}

.hero-history.is-open .hero-history-tags {
    overflow-y: auto;
    scrollbar-width: thin;
}

.hero-history-tag {
    flex: 0 0 auto;
    max-width: 136px;
    padding: 5px 12px;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.hero-history-tag:hover {
    border-color: rgba(var(--theme-primary-rgb), 0.35);
    color: var(--theme-primary);
    background: rgba(255, 255, 255, 0.95);
}

.hero-history-empty {
    display: flex;
    min-height: 0;
    flex: 1;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 4px 8px;
    color: var(--theme-text-secondary);
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

.hero-history.is-empty .hero-history-surface {
    gap: 0;
}

.hero-aside.info-section {
    display: flex !important;
    width: auto !important;
    flex-direction: column;
    gap: 14px;
    padding: 16px 18px !important;
    overflow: hidden;
}

.hero-stats.info-card-stats {
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 9px 8px !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 12px !important;
    background: var(--theme-background) !important;
    box-shadow: none !important;
}

.hero-stats .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 !important;
}

.hero-stats .stat-item {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 4px;
}

.hero-stats .stat-item + .stat-item {
    border-left: 1px solid var(--theme-border);
}

.hero-stats .stat-value {
    order: 0;
    color: var(--theme-text) !important;
    font-family: var(--font-display) !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.hero-stats .stat-label {
    order: 1;
    color: var(--theme-text-secondary) !important;
    font-size: 11px !important;
    letter-spacing: 0.02em;
    line-height: 1.35;
    white-space: nowrap;
}

.hero-trend {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    background: transparent !important;
}

.hero-trend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.hero-trend-title {
    margin: 0;
    color: var(--theme-text);
    font-family: var(--font-display);
    font-size: 1.38rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.hero-trend-badge {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 5px;
    color: var(--theme-primary);
    font-size: 12px;
    font-weight: 600;
}

.hero-trend-list.hot-keywords {
    display: block !important;
    min-height: 0;
    flex: auto;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden auto;
    background: transparent !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 36, 48, 0.14) transparent;
    -webkit-overflow-scrolling: touch;
    list-style: none;
}

.hero-trend-list.hot-keywords::-webkit-scrollbar {
    width: 4px;
}

.hero-trend-list.hot-keywords::-webkit-scrollbar-track {
    background: transparent;
}

.hero-trend-list.hot-keywords::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 36, 48, 0.14);
}

.hero-trend-row.hot-keyword-item {
    display: flex !important;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 9px 2px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--theme-border) !important;
    border-radius: 0 !important;
    color: var(--theme-text) !important;
    background: transparent !important;
    text-align: left;
    cursor: pointer;
    transition: color 0.12s ease;
}

.hero-trend-list.hot-keywords > li:last-child .hero-trend-row {
    border-bottom: 0 !important;
}

.hero-trend-row:hover {
    color: var(--theme-primary) !important;
}

.hero-trend-row .hot-keyword-rank {
    width: 1.6em !important;
    height: auto !important;
    flex: 0 0 1.6em;
    color: #69748a !important;
    background: none !important;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.hero-trend-row .hot-keyword-text {
    width: auto;
    max-width: none !important;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

.hero-trend-arrow {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--theme-text-secondary);
    opacity: 0.35;
    transition: color 0.12s ease, opacity 0.12s ease;
}

.hero-trend-row:hover .hero-trend-arrow {
    color: var(--theme-primary);
    opacity: 1;
}

.hero-aside-links {
    display: grid;
    flex-shrink: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
}

.hero-aside-links a {
    display: inline-flex;
    min-width: 0;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 6px;
    border: 1px solid rgba(var(--theme-primary-rgb), 0.16);
    border-radius: 9px;
    color: var(--theme-text);
    background: rgba(var(--theme-primary-rgb), 0.04);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.hero-aside-links a:hover {
    border-color: rgba(var(--theme-primary-rgb), 0.35);
    color: var(--theme-primary);
    background: #fff;
    transform: translateY(-1px);
}

.hero-aside-links svg {
    flex: 0 0 auto;
}

.hero-cache-clear {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

/* Media lookup card */
.home-container > .tmdb-info {
    display: flex;
    min-height: 108px;
    margin: 0 0 12px !important;
    padding: 12px !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.86) !important;
    box-shadow: var(--layout-shadow);
}

.home-container > .tmdb-info .tmdb-poster {
    width: 70px !important;
    height: 92px !important;
    border-radius: 9px !important;
}

/* Search results */
.search-result-section {
    display: none;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.search-result-section.show {
    display: block !important;
}

.search-result-header {
    margin: 0 0 12px !important;
    padding: 14px 18px !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: var(--layout-shadow);
}

/* Dedicated search page */
.search-page {
    min-height: calc(100vh - 175px);
}

.search-page-toolbar {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 14px;
    padding: 20px 24px;
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--layout-shadow);
}

.search-page-heading {
    flex: 0 0 190px;
}

.search-page-heading h1 {
    margin: 0 0 4px;
    color: var(--theme-text);
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 0;
}

.search-page-heading p {
    margin: 0;
    color: var(--theme-text-secondary);
    font-size: 11px;
}

.search-page-box {
    flex: 1;
}

.search-page-media.tmdb-info {
    display: flex;
    min-height: 126px;
    margin: 0 0 14px !important;
    padding: 16px !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: var(--layout-shadow) !important;
}

.search-page-media .tmdb-poster {
    width: 72px !important;
    height: 96px !important;
    border-radius: 8px !important;
}

.search-page-results.search-result-section {
    margin-bottom: 28px !important;
}

.search-page-results .search-result-header {
    padding: 0 !important;
    overflow: hidden;
}

.search-page-results .search-result-title {
    min-height: 52px;
    padding: 0 18px;
}

.search-result-filters {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 9px 12px;
    overflow-x: auto;
    border-top: 1px solid var(--theme-border);
    background: #fbfcff;
    scrollbar-width: thin;
}

.search-result-filter {
    display: inline-flex;
    height: 30px;
    align-items: center;
    gap: 5px;
    padding: 0 11px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 7px;
    color: var(--theme-text-secondary);
    background: transparent;
    font-size: 12px;
    cursor: pointer;
}

.search-result-filter span {
    min-width: 17px;
    padding: 1px 5px;
    border-radius: 5px;
    background: #edf0f6;
    font-size: 10px;
    text-align: center;
}

.search-result-filter:hover,
.search-result-filter.active {
    color: var(--theme-primary);
    background: #edf2ff;
}

.search-result-filter.active span {
    color: #fff;
    background: var(--theme-primary);
}

.search-result-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-result-title-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.search-result-title-icon {
    display: none !important;
}

.search-result-title-text {
    color: var(--theme-text) !important;
    font-size: 15px !important;
    font-weight: 700;
}

.search-result-title-text::first-letter {
    color: var(--theme-primary);
}

.search-result-count {
    margin-left: 6px !important;
    color: var(--theme-text-secondary) !important;
    font-size: 12px !important;
}

.search-result-close {
    color: var(--theme-text-secondary) !important;
    font-size: 12px !important;
    cursor: pointer;
}

.search-result-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px !important;
}

.search-result-item {
    position: relative;
    display: flex !important;
    min-width: 0;
    min-height: 78px;
    align-items: center;
    gap: 12px;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search-result-item::before {
    content: attr(data-pan-label);
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    color: #fff;
    background: var(--theme-primary);
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.16);
    font-size: 14px;
    font-weight: 800;
    line-height: 40px;
    text-align: center;
}

.search-result-item[data-pan-type="quark"]::before { background: #3860ff; }
.search-result-item[data-pan-type="baidu"]::before { background: #2563eb; }
.search-result-item[data-pan-type="aliyun"]::before,
.search-result-item[data-pan-type="ali"]::before { background: #ff6b35; }
.search-result-item[data-pan-type="uc"]::before { background: #16a36a; }
.search-result-item[data-pan-type="xunlei"]::before { background: #1687ff; }

.search-result-item::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #52c41a;
    box-shadow: 0 0 8px rgba(82, 196, 26, 0.45);
}

.search-result-item:hover {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 4px 16px rgba(31, 36, 48, 0.1) !important;
    transform: translateY(-1px);
}

.search-result-info {
    min-width: 0;
    flex: 1;
}

.search-result-name {
    overflow: hidden;
    margin: 0 0 7px !important;
    color: var(--theme-text) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-desc {
    display: none !important;
}

.search-result-meta {
    display: flex !important;
    align-items: center;
    gap: 5px !important;
    overflow: hidden;
}

.search-result-tag {
    display: inline-flex !important;
    height: 21px;
    align-items: center;
    padding: 0 8px !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: var(--theme-text-secondary) !important;
    background: #f1f2f5 !important;
    font-size: 11px !important;
    white-space: nowrap;
}

.search-result-tag.type {
    color: var(--theme-primary) !important;
    background: rgba(var(--theme-primary-rgb), 0.1) !important;
}

.search-result-tag.local {
    color: #fff !important;
    background: var(--theme-primary-gradient) !important;
}

.search-result-tag.link-check-status {
    display: none !important;
}

.search-result-actions {
    display: none !important;
}

.search-result-loading,
.search-result-empty {
    min-height: 180px;
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    background: #fff;
}

.search-load-more-btn {
    border: 1px solid #dbe3ff !important;
    border-radius: 10px !important;
    color: var(--theme-primary) !important;
    background: #fff !important;
}

/* Home resource duo */
#hotSection,
#latestSection {
    display: inline-block !important;
    width: calc(50% - 10px) !important;
    min-height: 0 !important;
    margin: 0 0 14px !important;
    padding: 14px 16px !important;
    vertical-align: top;
    border: 1px solid var(--theme-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: var(--layout-shadow) !important;
    box-sizing: border-box;
}

#hotSection {
    margin-right: 16px !important;
    background: #fffaf7 !important;
}

.latest-header {
    margin-bottom: 8px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--theme-border) !important;
}

.latest-title {
    font-family: var(--font-display) !important;
    font-size: 18px !important;
}

.latest-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2px !important;
}

.latest-list .latest-item {
    min-height: 42px;
    padding: 6px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
}

/* Home ranking strip and cards */
.ranking-section {
    margin: 0 !important;
}

.ranking-section .tab-list {
    justify-content: flex-end;
    min-height: 54px;
    margin: 0 0 12px !important;
    padding: 8px 14px !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: var(--layout-shadow);
}

.ranking-section .tab-list::before {
    content: "夸克热播";
    margin-right: auto;
    color: var(--theme-text);
    font-family: var(--font-display);
    font-size: 19px;
}

.ranking-section .tab-item {
    font-family: var(--font-display);
    font-size: 14px !important;
}

.ranking-section .tab-refresh {
    display: none !important;
}

.ranking-grid {
    gap: 12px !important;
}

.ranking-grid > .ranking-card {
    border: 1px solid #fff !important;
    border-radius: 12px !important;
    background: var(--theme-surface) !important;
    box-shadow: var(--layout-shadow) !important;
}

.ranking-grid > .ranking-card:nth-child(1) {
    background: linear-gradient(#fff5f0 0%, #fff 42%) !important;
}

.ranking-grid > .ranking-card:nth-child(2) {
    background: linear-gradient(#fff8ef 0%, #fff 42%) !important;
}

.ranking-grid > .ranking-card:nth-child(3) {
    background: linear-gradient(#fff4f4 0%, #fff 42%) !important;
}

.ranking-grid > .ranking-card {
    padding: 16px !important;
}

.ranking-grid .ranking-card-header {
    margin-bottom: 2px;
    padding-bottom: 10px;
}

.ranking-grid .ranking-card-name {
    font-family: var(--font-display);
    font-size: 1.38rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.04em;
}

.ranking-grid .ranking-card-icon {
    width: 1.93rem;
    height: 1.93rem;
    border-radius: 0.44rem;
    color: #fff;
    background: var(--theme-primary-gradient);
}

.ranking-grid .ranking-card-icon svg {
    width: 0.94rem;
    height: 0.94rem;
}

.ranking-grid .ranking-card-more {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 0;
    color: #9aa0a6;
    font-size: 12px;
}

.ranking-grid .ranking-list {
    gap: 0;
    min-height: 576px;
}

.ranking-grid .ranking-item {
    min-height: 64px;
    gap: 9px;
    padding: 6px 12px 6px 0;
    border-radius: 10px;
}

.ranking-grid .ranking-item:hover {
    background: linear-gradient(90deg, transparent 0%, rgba(var(--theme-primary-rgb), 0.12) 100%);
}

.ranking-grid .ranking-cover {
    width: 38px;
    height: 52px;
    border-radius: 7px;
}

.ranking-grid .ranking-rank {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 999px;
    color: #a8adb6;
    font-size: 12px;
}

.ranking-grid .ranking-rank.top1,
.ranking-grid .ranking-rank.top2,
.ranking-grid .ranking-rank.top3 {
    color: #1f2430 !important;
    background: linear-gradient(135deg, #ffd738, #ffe566) !important;
    font-size: 11px;
}

.ranking-grid .ranking-info {
    gap: 3px;
    margin-right: 10px;
}

.ranking-grid .ranking-item-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}

.ranking-grid .ranking-meta {
    color: #9aa0a6;
    font-size: 11.5px;
    line-height: 1.3;
}

.ranking-grid .ranking-score {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    max-width: none;
    padding: 0;
    color: var(--theme-text);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    opacity: 0.42;
}

.ranking-grid .ranking-score-icon {
    width: 14px;
    height: 14px;
}

.ranking-empty-state {
    display: grid;
    min-height: 576px;
    place-items: center;
    color: #9aa0a6;
    font-size: 12px;
}

.ranking-skeleton-list {
    display: flex;
    flex-direction: column;
}

.ranking-skeleton-row {
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 9px;
    padding: 6px 12px 6px 0;
    box-sizing: border-box;
}

.ranking-skeleton-block {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 5px;
    background: #edf0f4;
}

.ranking-skeleton-block::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.72) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: ranking-skeleton-shimmer 1.35s ease-in-out infinite;
}

.ranking-skeleton-rank {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 999px;
}

.ranking-skeleton-cover {
    width: 38px;
    height: 52px;
    flex: 0 0 38px;
    border-radius: 7px;
}

.ranking-skeleton-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 7px;
}

.ranking-skeleton-title {
    width: 84%;
    height: 13px;
}

.ranking-skeleton-meta {
    width: 52%;
    height: 10px;
}

.ranking-skeleton-score {
    width: 28px;
    height: 13px;
    flex: 0 0 28px;
}

@keyframes ranking-skeleton-shimmer {
    to {
        transform: translateX(100%);
    }
}

@media (max-width: 1024px) {
    .hero-shell.home-main {
        height: auto;
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-main.search-section,
    .hero-aside.info-section {
        width: 100% !important;
        height: auto;
    }

    .hero-aside.info-section {
        min-height: 370px;
    }
}

@media (max-width: 900px) and (min-width: 761px) {
    .hero-main.search-section {
        padding: 2rem 1.25rem 1.15rem !important;
    }

    .hero-title.search-title {
        font-size: 2rem !important;
    }

    .hero-subtitle.search-subtitle {
        font-size: 1.25rem !important;
    }

    .hero-intro.search-header {
        padding-right: 5.5rem;
    }

    .hero-mascot {
        top: 0;
        right: 0;
        width: 108px;
    }
}

@media (max-width: 760px) {
    .search-page-toolbar {
        display: block;
        padding: 16px 13px;
    }

    .search-page-heading {
        margin-bottom: 12px;
    }

    .search-page-heading h1 {
        font-size: 19px;
    }

    .search-page-media.tmdb-info {
        padding: 13px !important;
    }

    .search-page-results .search-result-title {
        min-height: 48px;
        padding: 0 13px;
    }

    .search-result-title-left {
        flex-wrap: wrap;
        gap: 2px 5px;
    }

    .search-result-filters {
        padding: 8px;
    }

    .hero-shell.home-main {
        gap: 16px;
        margin-bottom: 14px !important;
    }

    .hero-main.search-section {
        gap: 12px;
        padding: 24px 13px 14px !important;
        overflow: hidden;
    }

    .hero-top {
        min-height: 58px;
    }

    .hero-title.search-title {
        font-size: 25px !important;
    }

    .hero-subtitle.search-subtitle {
        margin-top: 7px !important;
        font-size: 16px !important;
    }

    .hero-mascot {
        display: none;
    }

    .hero-pan-support {
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        font-size: 12px;
    }

    .search-bar-large.search-input-box {
        display: grid !important;
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 0;
        padding: 7px !important;
    }

    .search-pan-select,
    .search-bar-large.search-input-box input {
        height: 42px !important;
    }

    .search-bar-large .search-btn {
        width: 100%;
        height: 44px !important;
        grid-column: 1 / -1;
        margin-top: 7px !important;
    }

    .hero-history {
        --history-height: 76px;
        --history-open-extra: 120px;
    }

    .hero-history-tags {
        flex-wrap: nowrap;
        align-content: center;
        align-items: center;
        overflow: auto hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, #000 0 calc(100% - 28px), transparent 100%);
        mask-image: linear-gradient(90deg, #000 0 calc(100% - 28px), transparent 100%);
    }

    .hero-history-tags::-webkit-scrollbar {
        display: none;
    }

    .hero-history.is-open .hero-history-tags {
        flex-wrap: wrap;
        align-content: flex-start;
        align-items: flex-start;
        overflow: hidden auto;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .hero-history-tag {
        max-width: 104px;
    }

    .hero-history-more-btn,
    .hero-history-clear {
        font-size: 12px;
    }

    .hero-aside.info-section {
        min-height: 0;
        max-height: 400px;
        gap: 12px;
        padding: 16px !important;
        overflow: hidden;
    }

    .hero-stats .stat-value {
        font-size: 22px !important;
    }

    .hero-trend {
        flex: 0 1 auto;
    }

    .hero-trend-list.hot-keywords {
        height: 215px;
        max-height: 215px;
        flex: 0 0 215px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .hero-trend-list.hot-keywords > li,
    .hero-trend-row.hot-keyword-item {
        height: 43px;
        min-height: 43px;
        box-sizing: border-box;
    }

    .hero-trend-row.hot-keyword-item {
        padding: 0 2px !important;
    }

    .hero-trend-title {
        font-size: 19px;
    }

    .home-container > .tmdb-info {
        min-height: 0;
    }

    .search-result-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-result-item {
        min-height: 72px;
        padding: 12px !important;
    }

    #hotSection,
    #latestSection {
        display: block !important;
        width: 100% !important;
        margin-right: 0 !important;
    }

    .ranking-section .tab-list {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .ranking-section .tab-list::before {
        position: sticky;
        left: 0;
        flex: 0 0 auto;
        padding-right: 8px;
        background: #fff;
    }

}

@media (max-width: 768px) {
    .ranking-grid .ranking-list,
    .ranking-empty-state {
        min-height: 0;
    }

    .ranking-skeleton-mobile-card {
        min-width: 0;
    }

    .ranking-skeleton-mobile-cover {
        width: 100%;
        aspect-ratio: 3 / 4;
        border-radius: 6px;
    }

    .ranking-skeleton-mobile-title {
        width: 82%;
        height: 12px;
        margin: 7px auto 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ranking-skeleton-block::after {
        animation: none;
    }
}

@media (max-width: 420px) {
    .hero-title.search-title {
        font-size: 23px !important;
    }

    .hero-pan-support i {
        margin: 0 7px;
    }

    .hero-aside-links {
        gap: 6px;
    }

    .hero-aside-links a {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .hero-aside-links {
        display: none;
    }
}
