/* 整体布局优化 */
.layout {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
}

/* 顶部导航栏优化 */
.layout-header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06) !important;
    padding: 0 32px !important;
    height: 64px !important;
    position: sticky;
    top: 0;
    z-index: 100;
}

.layout-brand img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 公告栏优化 */
.layout-notice {
    background: linear-gradient(90deg, #fff7e6 0%, #fffbe6 100%) !important;
    border-radius: 8px !important;
    padding: 6px 16px !important;
    margin: 0 20px !important;
    border: 1px solid #ffe58f !important;
}

.notice-tag {
    background: #faad14 !important;
    color: white !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    font-size: 12px !important;
    font-weight: 500;
}

/* 导航按钮优化 */
.layout-nav .el-button--primary {
    color: white !important;
    background: linear-gradient(135deg, #1f1f2e 0%, #2d2d3f 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 20px !important;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.wallet-balance {
    background: #f6ffed !important;
    color: #52c41a !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #b7eb8f !important;
}

/* 主内容区优化 */
.layout-main {
    padding: 32px !important;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 页面头部优化 */
.page-head h3 {
    font-size: 32px !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #1f1f2e 0%, #4a4a6a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    padding-left: 16px;
    position: relative;
}
.page-head h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 32px;
    background: linear-gradient(180deg, #1f1f2e 0%, #4a4a6a 100%);
    border-radius: 2px;
}
.page-head h3 {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    letter-spacing: -0.5px;
}

.page-head .el-input__wrapper {
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* 模板卡片优化 */
.tpl-card {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    background: white !important;
}

.tpl-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
}

.tpl-card img {
    transition: transform 0.3s ease !important;
}

.tpl-card:hover img {
    transform: scale(1.02) !important;
}

.tpl-card p, .tpl-card h4, .tpl-card h3 {
    font-weight: 600 !important;
    color: #333 !important;
    padding: 16px !important;
    margin: 0 !important;
    font-size: 15px !important;
}

/* 分页优化 */
.el-pagination {
    margin-top: 40px !important;
}

.el-pagination .el-pager li {
    border-radius: 8px !important;
    margin: 0 4px !important;
}

.el-pagination .el-pager li.active {
    background: linear-gradient(135deg, #1f1f2e 0%, #2d2d3f 100%) !important;
    color: white !important;
}
/* 模板展示区进一步优化 */
.tpl-card {
    margin-bottom: 24px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.tpl-card img {
    border-radius: 16px 16px 0 0 !important;
    width: 100%;
    height: auto;
    display: block;
}

.tpl-card p, .tpl-card h4, .tpl-card h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    padding: 16px 20px !important;
    letter-spacing: 0.3px;
}

/* 网格间距优化 */
.layout-main .el-row {
    margin: 0 -12px !important;
}

.layout-main .el-col {
    padding: 0 12px !important;
}

/* 搜索框优化 */
.page-head .el-input__wrapper {
    padding: 12px 16px !important;
    border-radius: 12px !important;
}

.page-head .el-input__inner {
    font-size: 14px !important;
}

/* 模板展示区进一步优化 */
.tpl-card {
    margin-bottom: 24px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.tpl-card img {
    border-radius: 16px 16px 0 0 !important;
    width: 100%;
    height: auto;
    display: block;
}

.tpl-card p, .tpl-card h4, .tpl-card h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    padding: 16px 20px !important;
    letter-spacing: 0.3px;
}

/* 网格间距优化 */
.layout-main .el-row {
    margin: 0 -12px !important;
}

.layout-main .el-col {
    padding: 0 12px !important;
}

/* 搜索框优化 */
.page-head .el-input__wrapper {
    padding: 12px 16px !important;
    border-radius: 12px !important;
}

.page-head .el-input__inner {
    font-size: 14px !important;
}
/* 每页显示10个模板（一行5个） */
.layout-main .el-col {
    max-width: 20% !important;
    flex: 0 0 20% !important;
}

@media (max-width: 1200px) {
    .layout-main .el-col {
        max-width: 25% !important;
        flex: 0 0 25% !important;
    }
}

@media (max-width: 992px) {
    .layout-main .el-col {
        max-width: 33.33% !important;
        flex: 0 0 33.33% !important;
    }
}

@media (max-width: 768px) {
    .layout-main .el-col {
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

@media (max-width: 576px) {
    .layout-main .el-col {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}
/* 模板网格布局：一行5个 */
.card-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;
}

@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .card-grid {
        grid-template-columns: 1fr !important;
    }
}