/*
Theme Name: Ninthartux
Theme URI: https://ninthartux.com
Author: Ninthartux
Author URI: https://ninthartux.com
Description: 专注游戏交互设计 - Ninthartux 个人主题
Version: 1.12.2
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ninthartux
*/

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== Layout ========== */
.site-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

/* ========== Sidebar ========== */
.site-sidebar {
    width: 280px;
    min-width: 280px;
    background-color: #ffffff;
    border-right: 1px solid #e1e1e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 45px 30px 46px;
    text-align: center;
    border-bottom: 1px solid #e2e2e2;
}

.site-logo {
    display: inline-block;
    margin-bottom: 3px;
}

.site-logo img,
.site-logo .logo-default {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.site-title {
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 26px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 3px;
    letter-spacing: 0;
    line-height: 30px;
}

.site-title a {
    color: #000000;
}

.site-title a:hover {
    color: #333333;
}

.site-description {
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #000000;
    letter-spacing: 0;
    line-height: 14px;
}

/* ========== Navigation ========== */
.sidebar-nav {
    flex: 1;
    padding: 0;
}

.sidebar-nav .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .menu li {
    margin: 0;
}

.sidebar-nav .menu li a {
    display: block;
    padding: 13px 30px 13px 53px;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #858585;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .menu li a:hover {
    background-color: #f8f8f8;
    color: #515151;
}

.sidebar-nav .menu li.current-menu-item a,
.sidebar-nav .menu li.current_page_item a,
.sidebar-nav .menu li.current-menu-ancestor a {
    background-color: #d9d9d9;
    color: #515151;
    font-weight: 500;
    border-left: 3px solid transparent;
}

/* ========== Main Content ========== */
.site-content {
    flex: 1;
    min-width: 0;
    padding: 40px 50px 0;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 自定义滚动条 - 缩小宽度并靠最右侧 */
.site-content::-webkit-scrollbar {
    width: 4px;
}

.site-content::-webkit-scrollbar-track {
    background: transparent;
}

.site-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.site-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Firefox 滚动条样式 */
.site-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.content-inner {
    flex: 1;
    width: 100%;
}

/* WordPress admin bar 适配 */
.admin-bar .site-sidebar {
    top: 32px;
    height: calc(100vh - 32px);
}

.admin-bar .site-content {
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .site-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
    }
    .admin-bar .site-content {
        height: calc(100vh - 46px);
    }
}

/* ========== Bookmarks Page ========== */
.bookmarks-section {
    margin-bottom: 50px;
}

.bookmarks-category {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.bookmarks-category .category-dot {
    width: 8px;
    height: 8px;
    background-color: #000000;
    border-radius: 2px;
    flex-shrink: 0;
}

.bookmarks-category .category-name {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
    white-space: nowrap;
}

.bookmarks-category .category-line {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
    max-width: 120px;
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.bookmark-card {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: #f8f8f8;
    border-radius: 10px;
    transition: all 0.25s ease;
    gap: 14px;
    cursor: pointer;
}

.bookmark-card:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.bookmark-card .bookmark-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.bookmark-card .bookmark-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 700;
    color: #999;
}

.bookmark-info {
    flex: 1;
    min-width: 0;
}

.bookmark-info .bookmark-title {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-info .bookmark-subtitle {
    font-size: 12px;
    color: #999999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Section Header (通用分区标题) ========== */
.site-content .section-header {
    display: flex !important;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.site-content .section-header .section-dot {
    width: 8px;
    height: 8px;
    background-color: #000000;
    border-radius: 2px;
    flex-shrink: 0;
}

.site-content .section-header .section-name {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.site-content .section-header .section-line {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
    max-width: 120px;
}

/* ========== Inspiration Tabs (灵感库分类标签) ========== */
.site-content .inspiration-tabs {
    display: flex !important;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.site-content .inspiration-tab {
    display: flex !important;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.4;
    padding: 4px 0;
}

.site-content .inspiration-tab:hover {
    opacity: 0.7;
}

.site-content .inspiration-tab.active {
    opacity: 1;
}

.site-content .inspiration-tab .tab-dot {
    width: 8px;
    height: 8px;
    background-color: #000000;
    border-radius: 2px;
    flex-shrink: 0;
}

.site-content .inspiration-tab .tab-name {
    font-size: 14px;
    color: #333333;
    font-weight: 400;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.site-content .inspiration-tab.active .tab-name {
    font-weight: 600;
    color: #000000;
}

.site-content .inspiration-tab .tab-line {
    width: 30px;
    height: 1px;
    background-color: #e0e0e0;
    flex-shrink: 0;
}

.site-content .inspiration-tab.active .tab-line {
    background-color: #000000;
}

/* ========== Inspiration Grid (灵感库列表) ========== */
.site-content .inspiration-section {
    margin-bottom: 50px;
}

.site-content .inspiration-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-content .inspiration-card {
    display: block !important;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
}

.site-content .inspiration-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.site-content .inspiration-cover {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
    background-color: #333;
}

.site-content .inspiration-cover img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease;
    max-width: none;
}

.site-content .inspiration-card:hover .inspiration-cover img {
    transform: scale(1.05);
}

.site-content .inspiration-cover-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.site-content .inspiration-image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    z-index: 2;
    line-height: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.site-content .inspiration-image-count svg {
    flex-shrink: 0;
}

.site-content .inspiration-overlay {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    z-index: 2;
}

.site-content .inspiration-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
    margin: 0;
    padding: 0;
}

.site-content .inspiration-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85) !important;
    flex-shrink: 0;
}

.site-content .inspiration-views svg {
    opacity: 0.85;
}

/* ========== AI Game News ========== */
.post-type-archive-ai_game_news .site-content,
.single-ai_game_news .site-content {
    padding: 0;
    background: #ffffff;
}

.ai-news-page {
    width: 100%;
    min-height: 100%;
    padding: 40px clamp(28px, 5vw, 72px) 80px;
    background: #ffffff;
    color: #111111;
}

.ai-news-article,
.ai-news-history {
    width: min(1200px, 100%);
    margin: 0 auto;
}

.ai-news-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 48px;
}

.ai-news-heading-row {
    display: block;
}

.ai-news-title {
    color: #111111;
    font-size: clamp(30px, 3.4vw, 40px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.ai-news-header-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ai-news-header-primary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-news-view-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #647488;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
.ai-news-issue-menu {
    position: relative;
    color: #647488;
    font-size: 14px;
}

.ai-news-issue-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #647488;
    font-weight: 500;
    line-height: 1;
    list-style: none;
    cursor: pointer;
    user-select: none;
    transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.ai-news-issue-menu summary::-webkit-details-marker {
    display: none;
}

.ai-news-issue-menu summary:hover,
.ai-news-issue-menu[open] summary {
    border-color: #b8c2cf;
    color: #111111;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.ai-news-issue-menu summary img {
    display: block;
    width: 12px;
    height: 12px;
    transition: transform 160ms ease;
}

.ai-news-issue-menu[open] summary img {
    transform: rotate(180deg);
}

.ai-news-issue-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    display: grid;
    width: 230px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.ai-news-issue-options a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 10px;
    border-radius: 7px;
    color: #647488;
    font-size: 13px;
    line-height: 1.4;
}

.ai-news-issue-options a:hover,
.ai-news-issue-options a[aria-current="page"] {
    background: #f3f5f7;
    color: #111111;
}

.ai-news-issue-options time {
    color: #8a8a8a;
    font-size: 12px;
}

.ai-news-update-note {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #647488;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.ai-news-update-note a {
    padding-left: 12px;
    border-left: 1px solid #e2e8f0;
    color: #647488;
}

.ai-news-update-note a:hover {
    color: #111111;
}

.ai-news-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #f7f7f7;
}

.ai-news-summary-label {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid #e60073;
    border-radius: 4px;
    background: rgba(255, 0, 127, 0.15);
    color: #e60073;
    font-size: 12px;
    font-weight: 900;
}

.ai-news-summary-text {
    min-width: 0;
    overflow: hidden;
    color: #111111;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-news-sections {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.ai-news-section {
    --section-accent: #008da0;
}

.ai-news-section:nth-child(2) {
    --section-accent: #28a900;
}

.ai-news-section:nth-child(3) {
    --section-accent: #e60073;
}

.ai-news-section:nth-child(4) {
    --section-accent: #008da0;
}

.ai-news-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.ai-news-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-news-section-accent {
    width: 6px;
    height: 28px;
    border-radius: 3px;
    background: var(--section-accent);
}

.ai-news-section-title {
    color: #111111;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
}

.ai-news-section-en {
    color: #8a8a8a;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.ai-news-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.ai-news-section--wide .ai-news-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-news-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #ffffff;
    color: inherit;
    flex-direction: column;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ai-news-card:hover {
    transform: translateY(-4px);
    border-color: var(--section-accent);
    color: inherit;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.10);
}

.ai-news-card--wide {
    min-height: 240px;
    flex-direction: row;
}

.ai-news-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f2f2f2;
    background:
        radial-gradient(circle at 22% 30%, color-mix(in srgb, var(--section-accent) 26%, transparent), transparent 42%),
        linear-gradient(145deg, #f5f5f5, #e9e9e9 68%);
}

.ai-news-card--wide .ai-news-card-media {
    flex: 0 0 42%;
    width: 42%;
    aspect-ratio: auto;
}

.ai-news-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 360ms ease;
}

.ai-news-card:hover .ai-news-card-media img {
    transform: scale(1.035);
}

.ai-news-card-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(0, 0, 0, 0.16);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.22em;
}

.ai-news-card-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 10px;
    border: 1px solid var(--section-accent);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--section-accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
}

.ai-news-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.ai-news-card--wide .ai-news-card-content {
    justify-content: center;
    padding: 24px;
}

.ai-news-card-content h3 {
    display: -webkit-box;
    overflow: hidden;
    color: #111111;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ai-news-card--wide .ai-news-card-content h3 {
    font-size: 20px;
}

.ai-news-card-content p {
    display: -webkit-box;
    overflow: hidden;
    color: #666666;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ai-news-card-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
    color: #8a8a8a;
    font-size: 11px;
}

.ai-news-card:hover .ai-news-card-source {
    color: var(--section-accent);
}

.ai-news-edition-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
    color: #8a8a8a;
    font-size: 12px;
    text-align: center;
}

.ai-news-history {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

.ai-news-history-title {
    color: #111111;
    font-size: 20px;
    font-weight: 800;
}

.ai-news-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin-top: 16px;
}

.ai-news-history-list a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    color: #666666;
    font-size: 12px;
    line-height: 1.5;
}

.ai-news-history-list a:hover {
    border-color: #008da0;
    color: #111111;
}

.ai-news-history-date {
    flex-shrink: 0;
    color: #8a8a8a;
}

.ai-news-empty {
    width: min(592px, 100%);
    margin: 120px auto 0;
    color: #8a8a8a;
    text-align: center;
}

.ai-news-empty-title {
    margin-bottom: 10px;
    color: #111111;
    font-size: 18px;
    font-weight: 800;
}

@media screen and (max-width: 1024px) {
    .ai-news-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-news-card--wide {
        min-height: 220px;
    }
}

@media screen and (max-width: 700px) {
    .ai-news-page {
        padding: 28px 18px 56px;
    }

    .ai-news-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-news-header-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .ai-news-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-news-summary-text {
        white-space: normal;
    }

    .ai-news-section-header {
        align-items: flex-end;
    }

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

    .ai-news-section-en {
        font-size: 9px;
    }

    .ai-news-card-grid,
    .ai-news-section--wide .ai-news-card-grid {
        grid-template-columns: 1fr;
    }

    .ai-news-card--wide {
        min-height: 0;
        flex-direction: column;
    }

    .ai-news-card--wide .ai-news-card-media {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .ai-news-history-list {
        grid-template-columns: 1fr;
    }
}

/* ========== Inspiration Detail (灵感详情页 - 画廊模式) ========== */
.inspiration-detail {
    width: 100%;
}

.inspiration-detail-header {
    margin-bottom: 30px;
}

.inspiration-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
    line-height: 1.3;
}

.inspiration-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #999999;
}

.inspiration-detail-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inspiration-detail-content {
    line-height: 1.8;
    font-size: 15px;
}

.inspiration-detail-content img {
    border-radius: 8px;
    margin: 16px 0;
}

.inspiration-detail-content p {
    margin-bottom: 16px;
}

/* 画廊网格 */
.inspiration-gallery {
    width: 100%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gallery-item-cover {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background-color: #333;
}

.gallery-item-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-cover img {
    transform: scale(1.05);
}

.gallery-item-name {
    padding: 10px 14px;
    font-size: 13px;
    color: #ffffff;
    background-color: #333333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Lightbox (灯箱) ========== */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    display: flex;
}

/* 灯箱舞台：包含图片和所有按钮，作为定位参考 */
.lightbox-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1280px;
    max-height: calc(100vh - 100px);
}

/* 图片容器 */
.lightbox-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 1280px;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

/* 关闭按钮：紧贴图片右上角外侧 */
.lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background 0.2s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 导航按钮：紧贴图片左右两侧，距离 100px */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background 0.2s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -100px;
}

.lightbox-next {
    right: -100px;
}

.lightbox-caption {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* ========== Sidebar Footer (页脚) ========== */
.sidebar-footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid #e2e2e2;
    text-align: center;
}

.sidebar-footer p {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #797979;
    line-height: 19px;
}

.sidebar-footer .footer-icp a {
    color: #797979;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-footer .footer-icp a:hover {
    color: #555555;
}

/* ========== Responsive ========== */
@media screen and (max-width: 1200px) {
    .bookmarks-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .inspiration-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .bookmarks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-sidebar {
        width: 240px;
        min-width: 240px;
    }

    .site-content {
        padding: 30px 30px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-news-page {
        padding: 64px 30px 72px;
    }
}

@media screen and (max-width: 768px) {
    .site-wrapper {
        flex-direction: column;
    }

    .site-sidebar {
        width: 100%;
        min-width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .sidebar-header {
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
        border-bottom: none;
        padding-bottom: 20px;
    }

    .site-logo img,
    .site-logo .logo-default {
        width: 36px;
        height: 36px;
    }

    .sidebar-nav .menu {
        display: flex;
        overflow-x: auto;
        padding: 0 10px;
    }

    .sidebar-nav .menu li a {
        padding: 10px 16px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-nav .menu li.current-menu-item a,
    .sidebar-nav .menu li.current_page_item a {
        border-left: none;
        border-bottom: 3px solid #000000;
    }

    .sidebar-footer {
        display: none; /* 移动端隐藏侧边栏页脚，改为底部显示 */
    }

    .site-content {
        padding: 25px 20px 0;
        height: auto;
        overflow-y: visible;
    }

    .post-type-archive-ai_game_news .site-content,
    .single-ai_game_news .site-content {
        padding: 0;
    }

    .site-content::after {
        content: '© 2014-2026 Ninthartux · 粤ICP备2025379133号-1';
        display: block;
        text-align: center;
        padding: 30px 0 20px;
        margin-top: 40px;
        border-top: 1px solid #e2e2e2;
        font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 12px;
        font-weight: 500;
        color: #797979;
    }

    body {
        overflow: auto;
    }

    .bookmarks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .site-content .inspiration-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .ai-news-page {
        padding: 24px 20px 56px;
    }

    .ai-news-toolbar {
        margin-bottom: 34px;
    }

    .ai-news-summary {
        margin-bottom: 0;
        text-align: left;
    }

    .ai-news-history-list {
        grid-template-columns: 1fr;
    }

    .lightbox-stage {
        max-width: calc(100% - 40px);
    }

    .lightbox-prev {
        left: -46px;
    }

    .lightbox-next {
        right: -46px;
    }

    .lightbox-close {
        top: -44px;
        right: 0;
    }
}

@media screen and (max-width: 480px) {
    .bookmarks-grid {
        grid-template-columns: 1fr;
    }

    .bookmark-card {
        padding: 14px 16px;
    }
}
