body {
    font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f7 50%, #f0f4ff 100%);
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

/* 导航栏 */
.nav-bar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 15px 24px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.page-title {
    color: #e91e63;
    font-size: 18px;
    font-weight: 600;
}

.back-btn {
    background: linear-gradient(135deg, #e91e63, #ad1457);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.back-btn:hover {
    background: linear-gradient(135deg, #c2185b, #880e4f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

/* 使用说明卡片 */
.instruction-card {
    background: linear-gradient(135deg, #fff9e6, #ffe5f3);
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 200, 124, 0.2);
    border: 2px solid rgba(233, 30, 99, 0.1);
}

.instruction-title {
    font-size: 18px;
    font-weight: 600;
    color: #e91e63;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    width: 24px;
    height: 24px;
    stroke: #e91e63;
    flex-shrink: 0;
}

.instruction-content {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
}

.instruction-step {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.instruction-step::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #e91e63;
    border-radius: 50%;
}

.instruction-tip {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(233, 30, 99, 0.1);
    border-radius: 6px;
    color: #c2185b;
    font-weight: 500;
    font-size: 14px;
}

/* 页面标题 */
h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 模版容器 */
.templates-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 分类区块 */
.category-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #fce4ec;
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.15);
    flex-shrink: 0;
}

.category-icon img {
    width: 100%;
    height: 100%;
    stroke: #e91e63;
}

.category-title {
    font-size: 24px;
    background: linear-gradient(135deg, #e91e63, #ff4081);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

/* 模版卡片 */
.template-card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.15);
    border-color: #e91e63;
}

.template-card:last-child {
    margin-bottom: 0;
}

/* 手风琴样式 */
.template-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.template-header:hover {
    opacity: 0.8;
}

.template-info {
    flex: 1;
}

.template-name {
    font-size: 18px;
    font-weight: 600;
    color: #e91e63;
    margin-bottom: 8px;
}

.template-desc {
    font-size: 14px;
    color: #777;
    margin-bottom: 8px;
    font-style: italic;
}

.template-summary {
    font-size: 13px;
    color: #999;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(233, 30, 99, 0.05);
    border-radius: 6px;
    border-left: 3px solid #e91e63;
}

.template-toggle {
    flex-shrink: 0;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(233, 30, 99, 0.1);
    transition: all 0.3s ease;
}

.template-toggle:hover {
    background: rgba(233, 30, 99, 0.2);
}

.toggle-icon {
    font-size: 14px;
    color: #e91e63;
    transition: transform 0.3s ease;
    display: inline-block;
}

.template-card.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.template-body {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    margin-top: 15px;
}

.template-card.collapsed .template-body {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.template-content {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: "SF Mono", Monaco, "Courier New", monospace;
}

.template-content::-webkit-scrollbar {
    width: 8px;
}

.template-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.template-content::-webkit-scrollbar-thumb {
    background: #e91e63;
    border-radius: 6px;
}

.template-content::-webkit-scrollbar-thumb:hover {
    background: #c2185b;
}

.copy-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

/* 底部提示 */
.footer-tip {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 6px;
    padding: 20px 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.footer-tip-title {
    font-weight: 600;
    color: #e91e63;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.footer-icon {
    width: 20px;
    height: 20px;
    stroke: #e91e63;
}

.footer-tip p {
    margin: 5px 0;
}

/* 手机版优化 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .nav-bar {
        padding: 10px 12px;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 16px;
    }

    .back-btn {
        font-size: 13px;
        padding: 8px 16px;
    }

    .instruction-card {
        padding: 12px 12px;
        margin-bottom: 20px;
    }

    .instruction-title {
        font-size: 16px;
    }

    .instruction-content {
        font-size: 14px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .templates-container {
        gap: 30px;
    }

    .category-section {
        padding: 20px 16px;
    }

    .category-header {
        gap: 10px;
        margin-bottom: 20px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .category-title {
        font-size: 20px;
    }

    .template-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .template-name {
        font-size: 16px;
    }

    .template-desc {
        font-size: 13px;
    }

    .template-content {
        font-size: 13px;
        padding: 14px;
        max-height: 300px;
    }

    .copy-btn {
        font-size: 13px;
        padding: 9px 20px;
    }

    .footer-tip {
        padding: 12px 12px;
        margin-top: 30px;
        font-size: 13px;
    }
}

/* 平板优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        max-width: 900px;
    }

    .category-section {
        padding: 25px;
    }

    .template-card {
        padding: 18px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: fadeInUp 0.5s ease-out;
}

.template-card {
    animation: fadeInUp 0.4s ease-out;
}
