* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #f7f8fb;
    color: #1f2937;
    font-size: 14px;
}

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

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

.container {
    width: 1200px;
    margin: 0 auto;
}

/* header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #edf0f5;
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    height: 66px;
    display: flex;
    align-items: center;
}

.logo {
    width: 190px;
}

.logo span {
    color: #ff5b22;
    font-size: 28px;
    font-weight: 800;
    font-style: italic;
}

.nav {
    flex: 1;
    display: flex;
    gap: 34px;
}

.nav a {
    color: #374151;
    font-weight: 600;
    padding: 24px 0;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: #ff5b22;
}

.nav a.active::after {
    content: "";
    width: 100%;
    height: 2px;
    background: #ff5b22;
    position: absolute;
    left: 0;
    bottom: 0;
}

.search-box form {
    width: 320px;
    height: 42px;
    display: flex;
    background: #f6f7fa;
    border: 1px solid #edf0f5;
    border-radius: 6px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 14px;
    color: #666;
}

.search-box button {
    width: 70px;
    border: 0;
    background: #ff5b22;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* breadcrumb */
.main {
    padding: 22px 0 40px;
}

.breadcrumb {
    color: #8b95a5;
    margin-bottom: 16px;
    font-size: 13px;
}

.breadcrumb a:hover {
    color: #ff5b22;
}

/* layout */
.list-layout {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 24px;
}

/* sidebar */
.side-card {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    margin-bottom: 18px;
    overflow: hidden;
}

.category-card h3,
.hot-card h3 {
    font-size: 18px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #edf0f5;
}

.category-card ul {
    list-style: none;
}

.category-card li a {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f2f6;
    color: #4b5563;
}

.category-card li a:hover,
.category-card li a.active {
    color: #ff5b22;
    background: #fff6f2;
    font-weight: 700;
}

.custom-card {
    height: 210px;
    background: linear-gradient(145deg, #2878ff, #72b7ff);
    position: relative;
    color: #fff;
}

.custom-card::after {
    content: "";
    width: 110px;
    height: 110px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    position: absolute;
    right: -30px;
    bottom: -20px;
}

.custom-text {
    padding: 26px 20px;
    position: relative;
    z-index: 2;
}

.custom-text h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.custom-text p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.custom-text a {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 4px;
}

.hot-card {
    padding-bottom: 8px;
}

.hot-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #f0f2f6;
}

.hot-img {
    width: 70px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    background: #eef1f5;
}

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

.hot-item h4 {
    font-size: 13px;
    line-height: 1.5;
    height: 38px;
    overflow: hidden;
}

.hot-item h4 a:hover {
    color: #ff5b22;
}

.hot-item p {
    color: #9aa2af;
    font-size: 12px;
    margin-top: 2px;
}

/* content */
.content {
    min-width: 0;
}

.page-head {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-head h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.page-head p {
    color: #7b8494;
    line-height: 1.7;
}

.view-switch {
    display: flex;
    gap: 8px;
}

.view-switch button {
    border: 1px solid #edf0f5;
    background: #fff;
    color: #4b5563;
    padding: 9px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.view-switch button.active {
    background: #ff5b22;
    color: #fff;
    border-color: #ff5b22;
}

/* filter */
.filter-bar {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    padding: 10px 20px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 44px;
    border-bottom: 1px solid #f0f2f6;
}

.filter-row:last-child {
    border-bottom: 0;
}

.filter-row strong {
    color: #1f2937;
    width: 70px;
}

.filter-row a {
    color: #6b7280;
}

.filter-row a:hover,
.filter-row a.active {
    color: #ff5b22;
    font-weight: 700;
}

/* grid list */
.template-list {
    margin-top: 18px;
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.template-card {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.25s;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.thumb {
    height: 126px;
    overflow: hidden;
    background: #eef1f5;
}

.thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: top center;
    transition: 0.3s;
}

.template-card:hover .thumb img {
    transform: scale(1.05);
}

.card-body {
    padding: 14px;
}

.tag-line {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8b95a5;
    font-size: 12px;
    margin-bottom: 8px;
}

.tag-line i {
    width: 1px;
    height: 11px;
    background: #d8dde6;
}

.card-body h2 {
    font-size: 15px;
    line-height: 1.45;
    height: 43px;
    overflow: hidden;
    margin-bottom: 8px;
}

.card-body h2 a:hover {
    color: #ff5b22;
}

.card-body p {
    color: #7b8494;
    font-size: 13px;
    line-height: 1.6;
    height: 40px;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9aa2af;
    font-size: 12px;
}

.card-meta strong {
    color: #ff5b22;
    font-size: 18px;
    margin-right: auto;
}

/* list view */
.template-list.list-view {
    display: block;
}

.template-list.list-view .template-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    margin-bottom: 18px;
}

.template-list.list-view .thumb {
    height: 170px;
}

.template-list.list-view .card-body {
    padding: 22px;
}

.template-list.list-view .card-body h2 {
    font-size: 20px;
    height: auto;
}

.template-list.list-view .card-body p {
    height: auto;
    margin: 12px 0 24px;
}

/* pagination */
.page-box {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.page-box a,
.page-box span {
    display: inline-block;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    line-height: 34px;
    text-align: center;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 4px;
    margin: 0 4px;
    color: #4b5563;
}

.page-box a:hover,
.page-box .current,
.page-box .active {
    background: #ff5b22;
    color: #fff;
    border-color: #ff5b22;
}

/* footer */
.footer {
    background: #fff;
    border-top: 1px solid #edf0f5;
    padding: 24px 0;
    text-align: center;
    color: #7b8494;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-bottom: 14px;
}

.footer-links a:hover {
    color: #ff5b22;
}

/* mobile */
@media (max-width: 1200px) {
    .container {
        width: 94%;
    }

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

@media (max-width: 900px) {
    .header-inner {
        height: auto;
        padding: 14px 0;
        flex-wrap: wrap;
    }

    .logo {
        width: 100%;
        margin-bottom: 12px;
    }

    .nav {
        width: 100%;
        overflow-x: auto;
        gap: 20px;
        margin-bottom: 12px;
    }

    .search-box,
    .search-box form {
        width: 100%;
    }

    .list-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .page-head {
        display: block;
    }

    .view-switch {
        margin-top: 15px;
    }

    .grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .template-list.list-view .template-card {
        grid-template-columns: 1fr;
    }

    .template-list.list-view .thumb {
        height: 160px;
    }

    .filter-row {
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 0;
    }
}