:root {
    --primary: #059669;
    --primary-dark: #047857;
    --secondary: #2563EB;
    --secondary-light: #3B82F6;
    --accent: #DC2626;
    --background: #F8FAFC;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --success: #059669;
    --warning: #F59E0B;
    --error: #EF4444;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-secondary);
    font-size: 15px;
    transition: color 0.2s;
}

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

.header-actions {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: #1D4ED8;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.main {
    min-height: calc(100vh - 64px - 200px);
}

.hero {
    background: linear-gradient(135deg, var(--primary), #10B981);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 24px;
}

.hero-search {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 15px;
    outline: none;
}

.hero-search button {
    padding: 14px 28px;
    background: var(--primary);
    border: none;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.3);
}

.categories {
    padding: 60px 0;
}

.section-title {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-weight: 700;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.cat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
}

.cat-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.cat-card p {
    font-size: 12px;
    color: var(--text-muted);
}

.templates {
    padding: 40px 0;
}

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

.template-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.template-image {
    height: 160px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--white);
    position: relative;
}

.template-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
}

.template-badge.hot {
    background: var(--accent);
    color: var(--white);
}

.template-badge.new {
    background: var(--secondary);
    color: var(--white);
}

.template-badge.free {
    background: var(--primary);
    color: var(--white);
}

.template-content {
    padding: 16px;
}

.template-content h3 {
    font-size: 15px;
    margin-bottom: 8px;
}

.template-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.template-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.template-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.promises {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px 0;
}

.promise-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.promise-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.promise-card h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.promise-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

.topics {
    padding: 40px 0;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.topic-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.topic-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: var(--white);
}

.topic-card:nth-child(1) .topic-image {
    background: linear-gradient(135deg, #DC2626, #EF4444);
}

.topic-card:nth-child(2) .topic-image {
    background: linear-gradient(135deg, #059669, #10B981);
}

.topic-card:nth-child(3) .topic-image {
    background: linear-gradient(135deg, #2563EB, #3B82F6);
}

.topic-content {
    padding: 20px;
}

.topic-content h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.topic-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

.topic-tags {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.topic-tag {
    padding: 4px 10px;
    background: var(--background);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.footer {
    background: var(--text-primary);
    color: var(--white);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 48px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 16px;
    opacity: 0.9;
}

.breadcrumb {
    padding: 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb span {
    margin: 0 8px;
}

.filter-section {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 6px 14px;
    background: var(--background);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--primary);
    color: var(--white);
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
}

.auth-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.auth-containera {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 1100px;
    padding: 40px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.link {
    color: var(--primary);
}

.help-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.help-cat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.help-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.help-cat-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.help-cat-card h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.help-cat-card p {
    font-size: 12px;
    color: var(--text-secondary);
}

.help-section {
    margin-bottom: 40px;
}

.faq-list {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    padding: 16px 20px;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 18px;
    color: var(--text-secondary);
}

.faq-item[open] summary::after {
    content: "-";
}

.faq-item p {
    padding: 0 20px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.user-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.user-menu {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.user-menu-item:hover,
.user-menu-item.active {
    background: var(--background);
    color: var(--primary);
    border-left-color: var(--primary);
}

.user-main {
    flex: 1;
}

.user-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.user-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
}

.user-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.user-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
}

.stat-item .num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-item .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-md);
}

.download-item .icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.download-item .info {
    flex: 1;
}

.download-item .info h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.download-item .info p {
    font-size: 12px;
    color: var(--text-secondary);
}

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

    .nav {
        display: none;
    }

    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .promises {
        grid-template-columns: repeat(2, 1fr);
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-sidebar {
        width: 100%;
    }

    .user-menu {
        display: flex;
        overflow-x: auto;
    }

    .user-menu-item {
        flex-shrink: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .user-menu-item.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }

    .help-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}