:root {
    --color-index: #4f46e5;
    --color-font:#fff;/*默认的字体颜色*/
    --color-sub-index: #4f46e5;
    --color-border: #f2f2f2;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f7f9fc;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a {
    text-decoration: none;
    color: inherit;
}


/* ======================
   统一顶部导航（全站通用）
====================== */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    font-size: 22px;
    font-weight: bold;
    color: #4f46e5;
}
.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-menu li a {
    font-size: 15px;
    font-weight: 500;
    color: #444;
    transition: 0.2s;
}
.nav-menu li a:hover,
.nav-menu li a.active {
    color: #4f46e5;
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.btn-login {
    color: #4f46e5;
    background: #fff;
    border: 1px solid #4f46e5;
}
.btn-login:hover {
    background: #f5f7ff;
}
.btn-register {
    color: #fff;
    background: #4f46e5;
    border: 1px solid #4f46e5;
}
.btn-register:hover {
    background: #4338ca;
}

/* ======================
   统一底部（全站通用）
====================== */
footer {
    margin-top: auto;
    background: #1e1b4b;
    color: #ccc;
    padding: 40px 0 24px;
    font-size: 13px;
}
.footer-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 30px;
}
.footer-col h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col ul li a {
    transition: 0.2s;
}
.footer-col ul li a:hover {
    color: #a5b4fc;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #888;
}

/* 响应式 */
@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
}

/*首页额外代码，后续交给豆包去进行整合，只要样式没有兼容问题*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f7f9fc;
    color: #333;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}


/* 导航 */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    font-size: 22px;
    font-weight: bold;
    color: #4f46e5;
}
.nav-menu {
    display: flex;
    gap: 28px;
}
.nav-menu a {
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-menu a:hover {
    color: #4f46e5;
}
.nav-user {
    display: flex;
    gap: 16px;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.banner h1 {
    font-size: 36px;
    margin-bottom: 12px;
}
.banner p {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 32px;
}
.search-box {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 20px;
    font-size: 15px;
}
.search-box button {
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 0 24px;
    cursor: pointer;
    font-weight: 500;
}
.search-box button:hover {
    background: #4338ca;
}
.tags {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.tag {
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    backdrop-filter: blur(4px);
}

/* 优势 */
.advantage {
    padding: 60px 0;
    background: #fff;
}
.advantage .title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 40px;
}
.ad-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.ad-item {
    text-align: center;
    padding: 24px;
    border-radius: 10px;
    background: #f7f9fc;
}
.ad-item h3 {
    margin: 12px 0 6px;
    font-size: 20px;
}
.ad-item p {
    font-size: 13px;
    color: #666;
}

/* 分类 */
.category {
    padding: 40px 0;
    background: #fff;
}
.cat-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    text-align: center;
}
.cat-item {
    padding: 20px;
    background: #f7f9fc;
    border-radius: 8px;
    transition: 0.2s;
}
.cat-item:hover {
    background: #edefff;
    color: #4f46e5;
}

/* 素材卡片 */
.material {
    padding: 60px 0;
}
.sec-title {
    font-size: 22px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.more {
    font-size: 14px;
    color: #4f46e5;
}
.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card-img {
    width: 100%;
    height: 140px;
    background: #dbeafe;
    object-fit: cover;
}
.card-info {
    padding: 14px;
}
.card-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}
.card-tag {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* 底部 */
footer {
    background: #1e1b4b;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 40px;
}
.foot-box {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 24px;
}
.foot-col h4 {
    color: #fff;
    margin-bottom: 14px;
    font-size: 15px;
}
.foot-col li {
    margin-bottom: 8px;
    font-size: 13px;
}
.copyright {
    text-align: center;
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid #312a80;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .banner h1 {
        font-size: 26px;
    }
}

/*图片素材CSS*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f7f9fc;
    color: #333;
}
a {
    text-decoration: none;
    color: inherit;
}


/* 导航 */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    font-size: 22px;
    font-weight: bold;
    color: #4f46e5;
}
.nav-menu {
    display: flex;
    gap: 28px;
}
.nav-menu a {
    color: #555;
    font-weight: 500;
}
.nav-menu a.active {
    color: #4f46e5;
    font-weight: 600;
}
.back-home {
    color: #4f46e5;
    font-size: 14px;
}

/* 筛选栏 */
.filter {
    background: #fff;
    padding: 20px 0;
    margin-bottom: 30px;
}
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.search {
    flex: 1;
    min-width: 280px;
    position: relative;
}
.search input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}
.search input:focus {
    border-color: #4f46e5;
}
.cat-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tab {
    padding: 8px 14px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}
.tab.active {
    background: #4f46e5;
    color: #fff;
}

/* 图片瀑布流 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}
.item {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    transition: 0.3s;
    cursor: pointer;
}
.item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.info {
    padding: 12px 14px;
}
.title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}
.free {
    color: #10b981;
    font-weight: 500;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 60px;
}

/* 底部 */
footer {
    background: #1e1b4b;
    color: #ccc;
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
}


