/*
Theme Name: 云集库
Theme URI: https://tiksaver.cc/
Author: 云集库
Description: 搜索优先的网盘资源索引主题
Version: 2.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: yinglink
*/

:root {
    --yl-bg: #0b0d12;
    --yl-bg-soft: #10131a;
    --yl-panel: #151922;
    --yl-panel-hover: #1b202b;
    --yl-line: #292f3b;
    --yl-text: #f1f3f6;
    --yl-muted: #8d96a5;
    --yl-red: #ee4658;
    --yl-red-dark: #c92f42;
    --yl-green: #58c99a;
    --yl-yellow: #e9b85a;
    --yl-radius: 12px;
    --yl-width: 1160px;
}

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    background: var(--yl-bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-width: 320px;
    background: var(--yl-bg);
    color: var(--yl-text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        Arial,
        sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

body,
button,
input,
textarea,
select {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        Arial,
        sans-serif;
}

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

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input {
    outline: none;
}

button {
    cursor: pointer;
}

.yl-container {
    width: min(calc(100% - 36px), var(--yl-width));
    margin-right: auto;
    margin-left: auto;
}

.yl-page {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(238, 70, 88, 0.12),
            transparent 34rem
        ),
        var(--yl-bg);
}

/* 顶部 */

.yl-header {
    border-bottom: 1px solid var(--yl-line);
    background: rgba(11, 13, 18, 0.94);
}

.yl-header-inner {
    display: flex;
    align-items: center;
    min-height: 72px;
    gap: 22px;
}

.yl-logo {
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}

.yl-logo span {
    color: var(--yl-red);
}

.yl-header-subtitle {
    color: var(--yl-muted);
    font-size: 13px;
}

.yl-fanflix {
    margin-left: auto;
    padding: 8px 13px;
    border: 1px solid #563039;
    border-radius: 6px;
    color: #ff8794;
    font-size: 13px;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.yl-fanflix:hover {
    border-color: var(--yl-red);
    background: var(--yl-red);
    color: #ffffff;
}

/* 首页头部 */

.yl-hero {
    padding: 76px 0 32px;
    text-align: center;
}

.yl-eyebrow,
.yl-section-kicker {
    color: var(--yl-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.yl-hero h1 {
    margin: 11px 0 8px;
    color: #ffffff;
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 800;
    line-height: 1.25;
}

.yl-hero p {
    margin: 0 auto;
    color: var(--yl-muted);
    font-size: 15px;
}

.yl-search-form {
    display: flex;
    max-width: 760px;
    min-height: 58px;
    margin: 30px auto 0;
    padding: 5px;
    border: 1px solid var(--yl-line);
    border-radius: 9px;
    background: #151922;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.24);
}

.yl-search-form input[type="search"] {
    min-width: 0;
    flex: 1;
    padding: 0 17px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 15px;
}

.yl-search-form input[type="search"]::placeholder {
    color: #697282;
}

.yl-search-form input[type="search"]:focus {
    outline: none;
}

.yl-search-form button {
    flex: 0 0 auto;
    min-width: 112px;
    border: 0;
    border-radius: 6px;
    background: var(--yl-red);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.yl-search-form button:hover {
    background: var(--yl-red-dark);
    transform: translateY(-1px);
}

.yl-hot-search {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 16px;
    color: var(--yl-muted);
    font-size: 12px;
}

.yl-hot-search a {
    color: #cbd0d9;
}

.yl-hot-search a:hover {
    color: var(--yl-red);
}

/* 分类 */

.yl-category-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 0 28px;
    border-bottom: 1px solid var(--yl-line);
}

.yl-category-nav a {
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--yl-muted);
    font-size: 13px;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.yl-category-nav a:hover,
.yl-category-nav a.active {
    border-color: #563039;
    background: #21171c;
    color: #ff8693;
}

.yl-category-nav .active {
    border-color: var(--yl-red);
    background: var(--yl-red);
    color: #ffffff;
}

.yl-category-nav .active:hover {
    border-color: var(--yl-red);
    background: var(--yl-red-dark);
    color: #ffffff;
}

/* 区块 */

.yl-section {
    padding: 36px 0 0;
}

.yl-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}

.yl-section-heading h2 {
    margin: 4px 0 0;
    color: #ffffff;
    font-size: 23px;
    line-height: 1.3;
}

.yl-section-heading > span {
    color: var(--yl-muted);
    font-size: 12px;
}

/* 精选大资源包 */

.yl-bundle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.yl-bundle-card {
    display: flex;
    min-height: 186px;
    overflow: hidden;
    border: 1px solid var(--yl-line);
    border-radius: var(--yl-radius);
    background: var(--yl-panel);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.yl-bundle-card:hover {
    border-color: #5c3540;
    background: var(--yl-panel-hover);
    transform: translateY(-2px);
}

.yl-bundle-image {
    flex: 0 0 108px;
    overflow: hidden;
    background: #211b24;
}

.yl-bundle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yl-bundle-icon {
    display: flex;
    flex: 0 0 108px;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, #562a38, #20283d);
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
}

.yl-bundle-content {
    min-width: 0;
    padding: 18px;
}

.yl-bundle-category {
    color: var(--yl-green);
    font-size: 11px;
}

.yl-bundle-content h3 {
    margin: 5px 0 7px;
    font-size: 16px;
    line-height: 1.45;
}

.yl-bundle-content h3 a:hover {
    color: #ff8190;
}

.yl-bundle-content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--yl-muted);
    font-size: 12px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.yl-bundle-button {
    display: inline-block;
    margin-top: 12px;
    color: #ff8794;
    font-size: 12px;
}

.yl-bundle-button:hover {
    color: #ffffff;
}

.yl-empty-box {
    width: 100%;
    padding: 34px 20px;
    border: 1px dashed var(--yl-line);
    border-radius: 10px;
    color: var(--yl-muted);
    text-align: center;
}

/* 资源列表 */

.yl-resource-section {
    padding-bottom: 55px;
}

.yl-resource-list {
    border-top: 1px solid var(--yl-line);
}

.yl-resource-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 2px;
    border-bottom: 1px solid var(--yl-line);
}

.yl-resource-main {
    min-width: 0;
}

.yl-resource-title {
    display: block;
    overflow: hidden;
    color: #e9ecf1;
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yl-resource-title:hover {
    color: #ff8290;
}

.yl-resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 11px;
    margin-top: 4px;
    color: var(--yl-muted);
    font-size: 12px;
}

.yl-resource-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 11px;
    color: #5e6674;
}

.yl-resource-meta time {
    color: #687181;
}

.yl-resource-action {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid #58333d;
    border-radius: 5px;
    color: #ff8593;
    font-size: 12px;
    white-space: nowrap;
}

.yl-resource-action:hover {
    border-color: var(--yl-red);
    background: var(--yl-red);
    color: #ffffff;
}

/* 翻页 */

.yl-pagination {
    padding-top: 25px;
    text-align: center;
}

.yl-pagination ul {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.yl-pagination a,
.yl-pagination span {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid var(--yl-line);
    border-radius: 5px;
    color: #cbd0d8;
    font-size: 13px;
}

.yl-pagination a:hover,
.yl-pagination .current {
    border-color: var(--yl-red);
    background: var(--yl-red);
    color: #ffffff;
}

/* 页脚 */

.yl-footer {
    padding: 27px 0;
    border-top: 1px solid var(--yl-line);
    color: var(--yl-muted);
    font-size: 12px;
    line-height: 1.8;
}

.yl-footer p {
    margin: 0;
}

.yl-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.yl-footer-links a:hover {
    color: #ffffff;
}

/* WordPress 基础兼容 */

.aligncenter {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.wp-caption {
    max-width: 100%;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* 手机端 */

@media (max-width: 760px) {
    .yl-container {
        width: min(calc(100% - 28px), var(--yl-width));
    }

    .yl-header-inner {
        min-height: 62px;
        gap: 12px;
    }

    .yl-logo {
        font-size: 23px;
    }

    .yl-header-subtitle {
        overflow: hidden;
        max-width: 130px;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .yl-fanflix {
        padding: 6px 8px;
        font-size: 11px;
    }

    .yl-hero {
        padding-top: 48px;
    }

    .yl-hero h1 {
        font-size: 31px;
    }

    .yl-search-form {
        min-height: 52px;
    }

    .yl-search-form input[type="search"] {
        min-width: 0;
        padding: 0 12px;
        font-size: 13px;
    }

    .yl-search-form button {
        min-width: 88px;
        padding: 0 10px;
        font-size: 13px;
    }

    .yl-category-nav {
        gap: 5px;
    }

    .yl-category-nav a {
        padding: 7px 9px;
        font-size: 12px;
    }

    .yl-section-heading h2 {
        font-size: 20px;
    }

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

    .yl-bundle-card {
        min-height: 150px;
    }

    .yl-resource-row {
        align-items: flex-start;
        gap: 12px;
        padding: 15px 0;
    }

    .yl-resource-title {
        white-space: normal;
    }

    .yl-resource-action {
        padding: 7px 9px;
        font-size: 11px;
    }
}

@media (max-width: 430px) {
    .yl-header-subtitle {
        display: none;
    }

    .yl-fanflix {
        margin-left: auto;
    }

    .yl-search-form {
        display: block;
        padding: 5px;
    }

    .yl-search-form input[type="search"] {
        display: block;
        width: 100%;
        min-height: 44px;
    }

    .yl-search-form button {
        display: block;
        width: 100%;
        min-height: 42px;
    }

    .yl-resource-row {
        display: block;
    }

    .yl-resource-action {
        display: inline-block;
        margin-top: 10px;
    }
}
