/*
Theme Name: XU5 Design Software Library
Theme URI: https://xu5.cc
Author: XU5
Author URI: https://xu5.cc
Description: A WordPress theme for design software library
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xu5-design
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
*/

/* ============================================
   基础样式
   ============================================ */

a,body,div,h1,h2,h3,h4,h5,h6,input,p,span{
    font-family:-apple-system,HarmonyOS_Regular,HarmonyOS_Medium,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji!important;
    box-sizing:border-box;
    text-decoration:none;
    margin:0;
    padding:0
}
a,a:hover{
    text-decoration:none
}
img{
    border:0;
    display:block
}
input{
    outline:0;
    border:0
}
html{
    background:#000;
    color:#333;
    overflow-y:scroll
}
body,html{
    height:100%
}
.button{
    display:inline-block;
    line-height:1;
    white-space:nowrap;
    cursor:pointer;
    background:#fff;
    border:1px solid #dcdfe6;
    color:#606266;
    -webkit-appearance:none;
    text-align:center;
    box-sizing:border-box;
    outline:0;
    margin:0;
    transition:.1s;
    font-weight:500;
    font-size:12px;
    border-radius:3px;
    padding:7px 15px
}
.button:focus,.button:hover{
    color:#409eff;
    border-color:#c6e2ff;
    background-color:#ecf5ff
}
.flex1{
    flex:1
}

/* ============================================
   布局容器
   ============================================ */

.container{
    width:1100px;
    margin:0 auto;
    position:relative;
    display:flex;
    flex-direction:column
}
.header{
    background:#f2f2f2;
    margin-bottom:20px
}
.header .container{
    padding:15px 0;
    justify-content:space-between;
    width:1100px;
    display:flex;
    align-items:baseline
}
.header .container,.left{
    display:flex;
    align-items:baseline
}
.left .logo{
    color:#111;
    font-size:24px;
    font-weight:700;
    margin-right:20px
}
.left .logo:active{
    color:#333
}
.right{
    display:flex;
    cursor:pointer
}
.right a{
    margin-right:30px
}

/* ============================================
   内容区域
   ============================================ */

.item-content{
    display:flex;
    flex-wrap:wrap;
    padding:10px  /* 原为 5px 30px，但被后面第313行覆盖为 10px，已统一 */
}
.item-content .nav{
    display:flex;
    flex-direction: column;
    align-items:center;
    width:32.6%;
    padding:11px;
    background:#555;
    margin-right:6px;
    margin-bottom:1px;
    border-radius:5px;
    color:#fff;
    cursor:pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease
}
.item-content .nav:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 24px rgba(0,0,0,0.3)
}
.item-content .nav .name{
    margin-right:10px
}
.item-content .nav .urls{
    flex:1;
    display:flex;
    justify-content:center
}
.item-content .nav .urls .url{
    color:#fff;
    background:#156aa8;
    padding:5px 5px;
    border-radius:5px;
    margin-right:2px;
    font-size:13px
}
.item-content .nav .urls .url:hover{
    background:#e5e5e5
}

/* ============================================
   可关闭提示横幅
   ============================================ */

.xu5-tip-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    padding: 5px 16px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.xu5-tip-text { line-height: 1.4; }
.xu5-tip-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.xu5-tip-close:hover { color: #fff; }

/* ============================================
   顶部导航栏（滚动后吸顶）
   ============================================ */

.xu5-topbar {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
    border-bottom: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, box-shadow 0.3s;
    z-index: 1000;
}
.xu5-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.xu5-topbar-logo {
    font-size: clamp(18px, 4vw, 26px);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.xu5-topbar-logo-img {
    height: 32px;
    width: auto;
    display: block;
    transition: height 0.3s, opacity 0.2s;
}
.xu5-topbar-logo-img:hover {
    opacity: 0.85;
}
.xu5-topbar-desc {
    font-size: 13px;
    color: rgba(200, 180, 140, 0.75);
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.xu5-topbar-desc::before {
    content: '|';
    margin-right: 10px;
    color: rgba(200, 180, 140, 0.35);
    font-weight: 300;
}
.xu5-topbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    flex: 1;
    justify-content: flex-end;
}
.xu5-topbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    padding: 6px calc(50% - 550px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 1100px) {
    .xu5-topbar.sticky {
        padding: 6px 16px;
    }
}
.xu5-topbar.sticky .xu5-topbar-desc {
    display: none;
}
.xu5-topbar.sticky .xu5-topbar-logo {
    font-size: 18px;
}
.xu5-topbar.sticky .xu5-topbar-logo-img {
    height: 24px;
}
.xu5-topbar-placeholder {
    display: none;
}
.xu5-topbar-placeholder.active {
    display: block;
}

/* ============================================
   容器子元素
   ============================================ */
.container .item-tabs{
    flex:1;
    background:#fff;
    border-radius:6px
}
.container .item-tabs .tab-content{
    padding:0 1px
}
.container .item-tabs .tab-content .item .item-name{
    font-size:15px
}
.container .item-tabs .tab-content .item .img{
    width:100%;
    height:100%;
    margin-right:0;
    background:transparent;
    border-radius:3px
}
.container .footer{
    margin:15px auto 15px
}
.container .footer .time{
    display:block;
    font-size:13px;
    text-align:center;
    color:#b3b3b3
}
/* ============================================
   响应式设计 - 平板
   ============================================ */

@media (max-width:768px){
    .container{
        width:100%
    }
    .tab-content{
        padding:0 10px
    }
    .tab-content .item .item-name{
        font-size:14px;
        font-weight:400;
        display:-webkit-box;
        -webkit-box-orient:vertical;
        -webkit-line-clamp:1;
        overflow:hidden
    }
    .item-content{
        padding:5px 10px
    }
    .item-content .nav{
        width:100%;
        flex-direction:column;
        align-items:unset
    }
    .item-content .nav .name{
        max-width:100%;
        margin-right:0
    }
    .item-content .nav .urls{
        margin-top:10px
    }
}

/* ============================================
   布局组件
   ============================================ */

.version{
    font-size:14px;
    color:#607D8B;
    margin-left:4px
}
.header{
    padding:10px
}
.header .logo{
    font-size:24px;
    font-weight:700
}
.item-tabs{
    margin-top:5px
}
.nav{
    cursor:pointer;
    margin:2px 0
}

/* ============================================
   底部和特效
   ============================================ */

.footer{
    text-align:center;
    padding:0px 0
}
/* .btn 旧样式已移除，各模块使用自己的按钮样式 */

/* .modal 样式已移至各自定义模板内联，默认主题不使用 */

/* ============================================
   导航文字链接
   ============================================ */

.nav-btn{
    display:inline-flex;
    align-items:center;
    cursor:pointer;
    text-decoration:none;
    white-space:nowrap;
    flex-shrink:0
}

/* ============================================
   响应式设计 - 导航栏
   ============================================ */

@media screen and (max-width:768px){
    .xu5-topbar {
        flex-direction: column;
        align-items: center;
        padding: 8px 10px;
        gap: 6px;
    }
    .xu5-topbar-brand {
        justify-content: center;
    }
    .xu5-topbar-desc {
        display: none;
    }
    .xu5-topbar-logo {
        font-size: 18px;
    }
    .xu5-topbar-logo-img {
        height: 26px;
    }
    .xu5-topbar-nav {
        justify-content: center;
        flex: none;
        width: 100%;
        gap: 8px;
        flex-wrap: wrap;
        overflow-x: visible;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .xu5-topbar-nav::-webkit-scrollbar { display: none; }
    .nav-btn, .nav-btn span {
        font-size: 13px;
    }
    .xu5-topbar.sticky {
        flex-direction: row;
        padding: 5px 10px;
    }
    .xu5-topbar.sticky .xu5-topbar-brand {
        display: none;
    }
    .xu5-topbar.sticky .xu5-topbar-nav {
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    .xu5-tip-banner {
        font-size: 11px;
        padding: 4px 10px;
    }
}
@media screen and (max-width:480px){
    .nav-btn, .nav-btn span {
        font-size: 12px;
    }
}

.item-content .nav{transition:all 0.2s cubic-bezier(.4,0,.2,1)}
.item-content .nav{border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,0.04);margin-bottom:1px;padding:12px 10px;border:1px solid #f0f0f0}
.item-content .nav:hover{box-shadow:0 4px 16px rgba(255,152,0,0.08);border-color:#ffd54f}

/* ==========================================================
   导航文字链接样式
   ========================================================== */

.nav-btn, .nav-btn span {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 15px;
    padding: 4px 0;
    transition: color 0.2s;
    letter-spacing: 0.5px;
}
.nav-btn:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
    pointer-events: none;
}
.nav-btn:hover, .nav-btn:hover span {
    color: #fff;
}
.nav-btn.active, .nav-btn.active span {
    color: #ffc107;
    font-weight: 700;
}
.xu5-topbar.sticky .nav-btn,
.xu5-topbar.sticky .nav-btn span {
    font-size: 14px;
    padding: 3px 0;
}

.icon-container {
  position: relative;
  width: 30px;
  height: 30px;
  margin-right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* 软件名称 Flex 布局 */
.name.name-flex {
    display: inline-flex;
    align-items: center;
}

/* 版本标签样式 */
.version-tag {
    display: inline-block;
    font-size: 15px;
    color: #fff;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* .version-item / .add-version 后台样式已移至 software-meta.php 内联 */


/* .pinned-badge / .pinned-item 样式已移至 archive-tutorial.css */

/* ==========================================================================
   网站标题 - 简洁Logo
   ========================================================================== */

.sitename-metal-shine {
    display: inline-block;
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-weight: 800 !important;
    letter-spacing: 2px;
    transition: opacity 0.2s;
}

.sitename-metal-shine:hover {
    opacity: 0.8;
}



@media (max-width: 768px) {
    .sitename-metal-shine {
        letter-spacing: 1.5px;
    }
}

/* ==========================================================================
   分类网格展现模式
   ========================================================================== */
.xu5-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 14px;
}
.xu5-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}
.xu5-grid-item:hover {
    background: #f5f7fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.xu5-grid-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}
.xu5-grid-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
.xu5-grid-icon .xu5-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8c8c8' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/40% no-repeat;
    border-radius: 8px;
    font-size: 0;
    color: transparent;
}
.xu5-grid-name {
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
    word-break: break-all;
}
@media (max-width: 768px) {
    .xu5-grid-view {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
        padding: 10px;
    }
    .xu5-grid-item {
        padding: 10px 6px;
    }
    .xu5-grid-icon {
        width: 40px;
        height: 40px;
    }
    .xu5-grid-name {
        font-size: 12px;
    }
}
