/*
Theme Name: AI软件下载导航
Theme URI: https://www.aidown.com.cn/
Author: Codex
Author URI: https://www.aidown.com.cn/
Description: 专为AI软件、工具、插件导航下载打造的WordPress主题，支持自定义扩展。
Version: 1.0.9
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: ai-download-station
*/

:root {
    --ai-bg-color: #06101d;
    --ai-bg-soft: #0a1728;
    --ai-panel-color: rgba(9, 19, 35, 0.9);
    --ai-panel-soft: rgba(12, 28, 50, 0.82);
    --ai-primary-color: #3e81ff;
    --ai-primary-hover: #2c67df;
    --ai-accent-color: #1ac78a;
    --ai-text-color: #e6f0ff;
    --ai-text-muted: #8ea2c2;
    --ai-border-color: rgba(117, 151, 194, 0.16);
    --ai-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    --ai-radius: 22px;
    --ai-container: 1560px;
    --ai-list-columns: 6;
    --ai-list-gap: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    color: var(--ai-text-color);
    line-height: 1.75;
    background:
        radial-gradient(circle at 0 0, rgba(62, 129, 255, 0.22), transparent 24%),
        radial-gradient(circle at 100% 0, rgba(26, 199, 138, 0.14), transparent 20%),
        linear-gradient(180deg, #06101d 0%, #091526 38%, #0c1b2f 100%);
}

body.admin-bar .site-header {
    top: 32px;
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 10, 19, 0.8);
    border-bottom: 1px solid var(--ai-border-color);
    backdrop-filter: blur(16px);
}

.site-header__inner,
.site-main,
.site-footer__inner {
    width: min(calc(100% - 28px), var(--ai-container));
    margin: 0 auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
}

.site-main {
    padding: 24px 0 64px;
}

.panel {
    margin-bottom: 22px;
    background: var(--ai-panel-color);
    border: 1px solid var(--ai-border-color);
    border-radius: var(--ai-radius);
    box-shadow: var(--ai-shadow);
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand__logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

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

.brand__logo-fallback {
    font-size: 24px;
    font-weight: 700;
    color: var(--ai-primary-color);
}

.brand__content {
    min-width: 0;
}

.brand__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.brand__title a:hover {
    color: #dce9ff;
}

.brand__tagline {
    margin-top: 4px;
    color: var(--ai-text-muted);
    font-size: 13px;
}

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

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--ai-text-muted);
    font-size: 14px;
    white-space: nowrap;
    transition: 0.2s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a {
    color: #d6e6ff;
    background: rgba(62, 129, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(96, 152, 255, 0.18);
}

.hero-search {
    position: relative;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(62, 129, 255, 0.15), rgba(26, 199, 138, 0.04) 42%, rgba(8, 17, 31, 0.92) 100%),
        linear-gradient(180deg, rgba(10, 21, 38, 0.96), rgba(7, 15, 28, 0.96));
}

.hero-search::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(124, 163, 214, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 163, 214, 0.05) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}

.hero-search__layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 360px;
    gap: 24px;
    align-items: center;
}

.hero-search__title,
.section-title {
    margin: 0 0 10px;
    line-height: 1.12;
}

.hero-search__title {
    max-width: 860px;
    font-size: clamp(32px, 4vw, 52px);
}

.hero-search__desc,
.section-desc {
    color: #b2c5e2;
}

.hero-search__desc {
    margin: 0 0 24px;
    max-width: 820px;
    font-size: 15px;
    line-height: 1.9;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 12px;
    max-width: 860px;
}

.search-form input[type="search"] {
    min-height: 60px;
    padding: 0 20px;
    border-radius: 16px;
    border: 1px solid rgba(118, 156, 204, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ai-text-color);
    outline: none;
}

.button,
.search-form button,
.download-buttons a,
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ai-primary-color), var(--ai-primary-hover));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.button:hover,
.search-form button:hover,
.download-buttons a:hover,
.pagination .page-numbers:hover,
.pagination .current {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(44, 103, 223, 0.28);
}

.hero-search__side {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
}

.hero-stat-card {
    padding: 18px;
    border-radius: 18px;
    background: var(--ai-panel-soft);
    border: 1px solid rgba(111, 148, 194, 0.16);
}

.hero-stat-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 28px;
}

.hero-stat-card span {
    display: block;
    color: var(--ai-text-muted);
    font-size: 13px;
    line-height: 1.8;
}

.featured-zone,
.archive-panel,
.taxonomy-zone,
.single-panel,
.empty-panel {
    padding: 24px;
}

.section-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 21px;
}

.section-title a {
    color: inherit;
}

.section-title a:hover {
    color: #dce9ff;
}

.section-desc {
    margin: 0;
    font-size: 14px;
}

.section-link,
.taxonomy-block__more {
    display: inline-flex;
    align-items: center;
    color: #cfe1ff;
    font-size: 14px;
}

.section-link:hover,
.taxonomy-block__more:hover {
    color: #ffffff;
}

.featured-grid,
.archive-list {
    display: grid;
    gap: 18px;
}

.featured-grid--large {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.software-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    height: 100%;
    padding: 20px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
        rgba(8, 20, 38, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: 0.2s ease;
}

.software-card:hover,
.mini-software-card:hover,
.channel-category-card:hover,
.platform-card:hover {
    transform: translateY(-3px);
    border-color: rgba(151, 188, 255, 0.32);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.featured-grid--large .software-card__media {
    width: 72px;
    height: 72px;
    border-radius: 22px;
}

.software-card__media {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

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

.software-card__body {
    min-width: 0;
}

.software-card__heading {
    min-width: 0;
    margin-bottom: 10px;
}

.software-card__title {
    margin: 0;
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-card__title a:hover {
    color: #dce9ff;
}

.software-card__label {
    display: block;
    margin-top: 5px;
    color: #b9cae2;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.software-card__excerpt {
    margin: 0;
    color: var(--ai-text-muted);
    font-size: 13px;
    line-height: 1.8;
}

.software-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--ai-text-muted);
    font-size: 13px;
}

.featured-grid--large .software-meta {
    display: none;
}

.category-pills,
.category-pills--spaced,
.taxonomy-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pills--spaced {
    margin-bottom: 18px;
}

.category-pill,
.taxonomy-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ai-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.category-pill:hover,
.taxonomy-chip:hover,
.taxonomy-chip.is-muted:hover {
    background: rgba(62, 129, 255, 0.14);
    color: #d6e6ff;
    border-color: rgba(96, 152, 255, 0.18);
}

.taxonomy-chip.is-muted {
    color: var(--ai-text-muted);
}

.homepage-module__grid {
    display: grid;
    grid-template-columns: repeat(var(--homepage-module-columns, 4), minmax(0, 1fr));
    gap: 14px;
}

.mini-software-card {
    display: block;
    min-width: 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.mini-software-card__icon {
    display: block;
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    border-radius: 17px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.mini-software-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-software-card__body h3 {
    margin: 0 0 6px;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-software-card__body h3 a:hover {
    color: #dce9ff;
}

.mini-software-card__body p {
    display: block;
    height: 44px;
    margin: 0;
    color: var(--ai-text-muted);
    font-size: 13px;
    line-height: 1.7;
    overflow: hidden;
}

.software-mix {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

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

.category-box {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-box h4 {
    position: relative;
    margin: 0 0 14px;
    padding-left: 12px;
    font-size: 17px;
}

.category-box h4::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: var(--ai-primary-color);
}

.category-box h4 a {
    color: inherit;
}

.category-box h4 a:hover {
    color: #dce9ff;
}

.dense-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 14px;
}

.dense-links a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #c8d6ea;
    font-size: 14px;
}

.dense-links a:hover,
.line-links a:hover,
.update-stream a:hover,
.icon-app:hover span {
    color: #d9e7ff;
}

.rank-box {
    padding-left: 20px;
    border-left: 1px solid var(--ai-border-color);
}

.rank-box h4 {
    margin: 0 0 14px;
    font-size: 17px;
}

.rank-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-num {
    font-size: 42px;
    font-weight: 700;
    color: #ff7e39;
}

.rank-thumb {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #3d7cff, #12b981);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 700;
}

.rank-top strong {
    display: block;
    margin-bottom: 6px;
}

.rank-top__meta {
    color: var(--ai-text-muted);
    font-size: 14px;
}

.rank-top a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    margin-top: 8px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(188, 209, 255, 0.3);
    color: #d4e4ff;
}

.rank-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.rank-list li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
}

.rank-list b {
    color: #ff8f45;
}

.rank-list a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon-strip,
.platform-grid {
    display: grid;
    gap: 18px;
}

.icon-strip {
    grid-template-columns: repeat(10, minmax(0, 1fr));
}

.icon-app {
    min-width: 0;
    text-align: center;
}

.icon-app .icon,
.platform-card .icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 10px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

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

.icon-app span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #c8d6ea;
    font-size: 14px;
}

.platform-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.platform-card {
    display: block;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.platform-card strong {
    display: block;
    margin-bottom: 6px;
}

.platform-card span {
    color: var(--ai-text-muted);
    font-size: 14px;
}

.line-group {
    display: grid;
    gap: 12px;
}

.line-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.line-row strong {
    font-size: 16px;
}

.line-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.line-links a {
    position: relative;
    color: #c2d2e8;
    font-size: 14px;
}

.line-links a + a::before {
    content: "|";
    margin-right: 14px;
    color: rgba(194, 210, 232, 0.42);
}

.text-list {
    display: grid;
    grid-template-columns: repeat(var(--ai-list-columns), minmax(0, 1fr));
    gap: var(--ai-list-gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

.text-list li a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: #c8d6ea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: 0.2s ease;
}

.text-list li a:hover {
    background: rgba(62, 129, 255, 0.14);
    color: #d9e7ff;
    border-color: rgba(96, 152, 255, 0.18);
}

.channel-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.channel-category-card {
    display: block;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.channel-category-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.channel-category-card span {
    color: var(--ai-text-muted);
    font-size: 14px;
}

.single-hero {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    margin-bottom: 24px;
}

.single-cover {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.single-cover img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.single-title {
    margin: 0 0 14px;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.content-box {
    margin-top: 18px;
    padding: 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.content-box h2 {
    margin-top: 0;
    font-size: 22px;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
    max-width: 720px;
}

.download-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.download-buttons a.is-tertiary {
    background: linear-gradient(135deg, #f6a623, #f97316);
}

.download-note {
    color: var(--ai-text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.pagination .page-numbers {
    min-width: 48px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.pagination .current {
    background: linear-gradient(135deg, var(--ai-primary-color), var(--ai-primary-hover));
}

.empty-note {
    margin: 0;
    color: var(--ai-text-muted);
}

.update-stream {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 28px;
    margin: 0;
    padding: 0;
}

.update-stream li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(142, 162, 194, 0.18);
}

.update-stream a {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #c8d6ea;
}

.update-stream time {
    flex: 0 0 auto;
    color: #9fb9ff;
    font-size: 13px;
}

.site-footer {
    background: transparent;
}

.site-footer__inner {
    padding: 0 0 34px;
    color: var(--ai-text-muted);
    text-align: center;
}

.site-disclaimer {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(117, 151, 194, 0.14);
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
}

.site-disclaimer__title {
    margin: 0 0 10px;
    font-size: 15px;
    color: #d7e6ff;
}

.site-disclaimer p {
    margin: 0 0 8px;
    color: #91a7c8;
    font-size: 13px;
    line-height: 1.9;
}

.site-disclaimer p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1320px) {
    .hero-search__layout {
        grid-template-columns: 1fr;
    }

    .featured-grid--large,
    .archive-list,
    .homepage-module__grid,
    .channel-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .icon-strip {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .software-mix,
    .single-hero {
        grid-template-columns: 1fr;
    }

    .rank-box {
        padding-left: 0;
        border-left: 0;
    }

    .update-stream {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 980px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
    }

    .nav-menu {
        justify-content: flex-start;
    }
}

@media (max-width: 820px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .category-board,
    .text-list,
    .update-stream {
        grid-template-columns: 1fr;
    }

    .line-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 640px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    .site-header__inner,
    .site-main,
    .site-footer__inner {
        width: calc(100% - 12px);
    }

    .hero-search,
    .featured-zone,
    .archive-panel,
    .taxonomy-zone,
    .single-panel,
    .empty-panel,
    .content-box {
        padding: 20px;
    }

    .featured-grid--large,
    .archive-list,
    .homepage-module__grid,
    .channel-category-grid,
    .platform-grid,
    .icon-strip {
        grid-template-columns: 1fr;
    }

    .text-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-headline,
    .download-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-form button {
        width: 100%;
    }

    .brand__title {
        font-size: 20px;
    }
}
