/* 导入字体 */
@import url("https://cdn-font.hyperos.mi.com/font/css?family=MiSans_Latin_VF:VF:Latin&display=swap");
@import url("https://cdn-font.hyperos.mi.com/font/css?family=MiSans_VF:VF:Chinese_Simplify,Latin&display=swap");
@import url("https://cdn-font.hyperos.mi.com/font/css?family=MiSans:100,200,300,400,450,500,600,650,700,900:Chinese_Simplify,Latin&display=swap");
@import url("https://cdn-font.hyperos.mi.com/font/css?family=Misans_TC_VF:VF:Chinese_Traditional_TW&display=swap");

:root {
    --primary-color:#9e94d8;
    --secondary-color:#333333;
    --background-color:#f2eefc;
    --card-bg:#FAFAFA;
    --text-color:#444444;
    --online-color:#00BFA6;
    --nav-bg:rgba(109, 91, 154, 0.8);
    --nav-bg-scroll:#424a55;
    --button-hover:#b6ade6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'MiSans VF', sans-serif;
}

body {
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

.news-markdown h1 { font-size: 1.5em; color: var(--secondary-color); }
.news-markdown ul { padding-left: 20px; }
.news-markdown strong { color: var(--primary-color); }

.news-content a.external-link svg {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    vertical-align: sub; /* 保持对齐 */
}
/* banner-header */
nav {
    display: flex;
    align-items: center;
    height: 81px;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    position: fixed;
    width: 100%;
    z-index: 100;
    top: 0;
}

/* nav.scrolled {
    height: 81px;
    background: var(--nav-bg-scroll);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
} */
/* 导航链接通用样式 */
nav a:hover {
    color: var(--button-hover);
}
nav a {
    display: inline-block;
    margin:  20px;
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--button-hover);
}
.AAA{
    margin-right: 1.2em;
}
/* 桌面端导航布局 */
@media (min-width: 769px) {
    nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    nav > a[href="/"] {
        order: -3;
        /* 主页：左边界 20px，与服务器规则 15px */
        margin: 0 15px 0 20px; 
    }
    nav > .dropdown:first-of-type {
        order: -2;
        /* 服务器规则：与主页 15px，与支持我们 15px */
        margin: 0 15px; 
    }
    nav > a[href="/support"] {
        order: -1;
        /* 支持我们：与服务器规则 15px，与 LuminolMC 15px */
        margin: 0 15px; 
    }
    .logo-container {
        display: flex;
        align-items: center;
        order: 0;
    }
    nav > .right-align {
        order: 1;
        margin-left: auto;
        margin-right: 20px;
    }
}

/* 移动端汉堡菜单 */
@media (max-width: 768px) {
    .menu-button {
        display: block;
        position: absolute;
        right: 20px;
        top: 19.4px;
        color: white;
        font-size: 1.1em;
        cursor: pointer;
        z-index: 102;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg-scroll);
        padding: 20px;
        flex-direction: column;
        z-index: 101;
    }
    .menu-toggle:checked ~ .nav-links {
        display: flex;
    }
    .nav-links a:not(.dropdown-toggle):not(.dropdown-item) {
        display: block;
        margin: 10px 0;
        color: white;
        /* 主页大标题 */
        font-size: 1.2em;
        font-weight: bold;
        text-align: left;
        pointer-events: auto;
    }
    .nav-links .dropdown {
        display: block;
        margin: 10px 0;
    }
    .nav-links .dropdown-toggle {
        display: block;
        color: white;
        /* 服务器规则大标题 */
        font-size: 1.2em; 
        font-weight: bold;
        padding: 10px 0;
        /* 禁用点击，因为是标题 */
        pointer-events: none; 
    }
    .nav-links .dropdown-toggle .menu-icon {
        /* 隐藏下拉箭头 */
        display: none; 
    }
    .nav-links .dropdown-menu {
        /* 直接显示子项 */
        display: block; 
        position: static;
        transform: none;
        width: 100%;
        /* 无背景，与主菜单融合 */
        background: transparent; 
        box-shadow: none;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: scaleY(1);
    }
    .nav-links .dropdown-item {
        display: block;
        /* 缩进 15px */
        padding: 8px 0 8px 15px; 
        color: white;
        /* 小标题 */
        font-size: 0.8em; 
        font-weight: normal;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* 移动端汉堡菜单修复 */
@media (max-width: 768px) {
    .menu-button {
        display: block;
        position: absolute;
        right: 20px;
        top: 19.4px;
        color: white;
        font-size: 1.1em;
        cursor: pointer;
        z-index: 102;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg-scroll);
        padding: 20px;
        flex-direction: column;
        z-index: 101;
    }
    .menu-toggle:checked ~ .nav-links {
        /* checkbox 选中时显示 */
        display: flex; 
    }
    .nav-links a, .nav-links .dropdown {
        display: block;
        margin: 10px 0;
        color: white;
        font-size: 1.2em;
        text-align: left;
        pointer-events: auto;
    }
    .nav-links .dropdown-toggle {
        display: flex;
        align-items: center;
        padding: 10px 0;
    }
    .nav-links .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
        margin-top: 5px;
        opacity: 1;
        visibility: visible;
        transform: scaleY(1);
    }
    .nav-links .dropdown-item {
        padding: 10px 15px;
        opacity: 1;
        transform: translateY(0);
    }
}




/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s;
    cursor: pointer;
}


.menu-icon {
    display: flex;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    fill: currentColor;
    transition: transform 0.3s;
}



/* .dropdown:hover .menu-icon {鼠标悬停时旋转图标实际上图标本身就是倒过来的。。
    transform: rotate(90deg);
} */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0; 
    width: 150px;
    background: var(--nav-bg-scroll);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-out;
    z-index: 101;
    transform-origin: top left;
    transform: scaleY(0.8);
}
/* 最喜欢的效果之一 */
/*当鼠标悬停在.dropdown上的时候.dropdown-menu就会哈气 */
 .dropdown:hover .dropdown-menu {
    /*渐变 */
     opacity: 1;
    /*使下拉菜单在悬停时显示*/
     visibility: visible;
    /*垂直缩放元素 */
     transform: scaleY(1)

       
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(-5px);
}
.dropdown-item svg{
    width: 18px;
    height: 18px;
    margin-left: 8px;
    text-align: right;
}
.dropdown:hover .dropdown-item {
    opacity: 1;
    transform: translateY(0);
}

.item-icon {
    width: 16px;
    height: 16px;
    margin-left: 10px;
    fill: currentColor;
    transition: transform 0.3s;
}

.dropdown-item:hover .item-icon {
    transform: translateX(-3px);
}


.logo-and-text {
    width: 130px;
    margin-right: auto; 
    margin-left: 20px;
}
.menu-button {
    display: none;
    position: absolute;
    right: 20px;
    top: 19.4px;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    
}


.logo-container {
    
    margin-left: 20px;  
}
.logo-container img {
    height: 37px; 
    width: 37px;
}
.right-align {
    margin-left: auto;
    margin-right: 20px;
}
.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.logo-and-text {
    display: flex;
    align-items: center;
    
    color: white;
    font-size: 1.1em;
    text-decoration: none;
}


.logo-and-text svg {
    width: 18px;
    height: 18px;
    margin-left: 3px;
    margin-bottom: 3px;
}
















.news-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 100px auto 0;
}

.intro {
    text-align: center;
    margin-bottom: 40px;
}

.intro h2 {
    font-family: 'MiSans VF', sans-serif;
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.intro p {
    font-family: 'MiSans VF', sans-serif;
    font-size: 1.1em;
    color: var(--text-color);
    opacity: 0.8;
}

.news-search {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.news-search input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'MiSans VF', sans-serif;
    font-size: 1em;
    width: 300px;
}

.news-search button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: 'MiSans VF', sans-serif;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.news-search button:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.tag-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.tag-filter label {
    font-family: 'MiSans VF', sans-serif;
    font-size: 1em;
    color: var(--text-color);
    font-weight: 500;
}

.tag-filter select {
    appearance: none; /* 移除浏览器默认下拉箭头 */
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--card-bg); /* 背景色与新闻卡片一致 */
    border: 1px solid var(--primary-color); /* 边框使用主题色 */
    border-radius: 8px; /* 更圆润的边角 */
    padding: 10px 32px 10px 12px; /* 留出右边箭头空间 */
    font-family: 'MiSans VF', sans-serif;
    font-size: 1em;
    color: var(--text-color);
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%239e94d8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>'); /* 自定义倒三角 */
    background-repeat: no-repeat;
    background-position: right 12px center; /* 箭头位置 */
    transition: border-color 0.3s, background-color 0.3s, transform 0.2s;
    min-width: 150px; /* 确保宽度适中 */
}

.tag-filter select:hover {
    border-color: var(--button-hover);
    background-color: #f8f6ff; /* 轻微背景变化 */
}

.tag-filter select:focus {
    outline: none;
    border-color: var(--button-hover);
    box-shadow: 0 0 0 3px rgba(158, 148, 216, 0.2); /* 添加焦点光环 */
}

.tag-filter select option {
    background: var(--card-bg);
    color: var(--text-color);
    font-family: 'MiSans VF', sans-serif;
    padding: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 20px;
    background: transparent;
    border-radius: 12px;
}

/* 垂直滚动条样式 for .news-grid */
.news-grid::-webkit-scrollbar {
    width: 6px;
}

.news-grid::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, rgba(241, 241, 241, 0.3), rgba(241, 241, 241, 0.1));
    border-radius: 6px;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.news-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-color), var(--button-hover));
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--button-hover), var(--primary-color));
    box-shadow: 0 0 8px rgba(182, 173, 230, 0.5);
}

.news-item {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    position: relative;
    min-height: 400px;
    animation: fadeIn 0.5s ease calc(var(--news-index) * 0.1s);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 无图新闻：与绝对定位按钮的空白 */
.news-item.no-image {
    min-height: auto;
}

.news-item.no-image .news-content {
    height: auto;
    max-height: 260px;
}

.news-item.no-image .news-btn {
    position: static;
    left: auto;
    transform: none;
    margin-top: 12px;
}

.news-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

/* 新闻内容区域 */
.news-content {
    padding: 24px;
    height: 150px;
    overflow-x: auto; /* 启用水平滚动 */
    overflow-y: auto; /* 保持垂直滚动 */

}

/* 垂直滚动条样式 for .news-content */
.news-content::-webkit-scrollbar {
    width: 4px;
}

.news-content::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.3);
    border-radius: 4px;
}

.news-content::-webkit-scrollbar-thumb {
    background: rgba(158, 148, 216, 0.5); 
    border-radius: 4px;
}

.news-content::-webkit-scrollbar-thumb:hover {
    background: rgba(182, 173, 230, 0.7); 
}

/* 水平滚动条样式 for .news-content */
.news-content::-webkit-scrollbar:horizontal {
    height: 4px;
}

.news-content::-webkit-scrollbar-track:horizontal {
    background: linear-gradient(to right, rgba(241, 241, 241, 0.3), rgba(241, 241, 241, 0.1));
    border-radius: 4px;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.news-content::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(to right, var(--primary-color), var(--button-hover));
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-content::-webkit-scrollbar-thumb:horizontal:hover {
    background: linear-gradient(to right, var(--button-hover), var(--primary-color));
    box-shadow: 0 0 8px rgba(182, 173, 230, 0.5);
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.news-content h3 {
    font-family: 'MiSans VF', sans-serif;
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.news-date {
    font-family: 'MiSans VF', sans-serif;
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 10px;
}

.news-content p {
    font-family: 'MiSans VF', sans-serif;
    font-size: 1em;
    color: var(--text-color);
}

.news-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 5px;
    font-family: 'MiSans VF', sans-serif;
    font-size: 0.95em;
    position: absolute;
    bottom: 10px; /* 增加底部间距，减少紧贴感 */
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s;
}

.news-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 2px 8px rgba(158, 148, 216, 0.3);
}



.news-pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 12px;
    margin: 0 5px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: 'MiSans VF', sans-serif;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--button-hover);
    font-weight: bold;
    cursor: default;
    transform: none;
}

.pagination-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.empty-message,
.error-message {
    font-family: 'MiSans VF', sans-serif;
    font-size: 1.1em;
    text-align: center;
    color: var(--text-color);
}











/* feet */
footer {
    padding: 50px 15px;
    background: var(--secondary-color);
    color: white;
    text-align: center;
}
footer p {
    text-align: center;
}

.social-links {
    margin-bottom: 25px;
}

.social-links a {
    display: inline-block;
    margin: 0 12px;
    color: white;
    font-size: 1.3em;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-4px);
}


@keyframes fadeIn {/* 页头文字、页头按钮动画 */
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 页脚链接样式 */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.footer-column h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--primary-color);
}
.footer-column svg{
    width: 18px;
    height: 18px;
    margin-left: 8px;
}
/*版权*/
.copyright-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    color: #aaa;
}

.copyright-info p {
    margin: 8px 0;
}

.copyright-info a:any-link {
    color: #aaa;
}

.copyright-info a:hover {
    color: var(--primary-color);
}

.copyright-info svg {
    width: 12px;
    height: 12px;
    margin-left: 8px;
}



