:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #6b7280;
    --secondary-hover: #4b5563;
    --background: #f9fafb;
    --text: #111827;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --tag-bg: #e5e7eb;
    --tag-text: #374151;
    --code-bg: #1f2937;
    --code-text: #f9fafb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

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

/* 导航栏 */
nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

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

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

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* 首页 Hero */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--background) 0%, #e5e7eb 100%);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 热门循环 */
.trending {
    padding: 4rem 0;
    background: var(--card-bg);
}

.trending h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.loop-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.loop-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.loop-card.featured {
    max-width: 600px;
    margin: 0 auto;
    border-color: var(--primary);
}

.loop-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.loop-card h2,
.loop-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.loop-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.loop-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* 兼容性 */
.compatibility {
    padding: 4rem 0;
    text-align: center;
}

.compatibility h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.tools-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tool-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* 精选循环 */
.featured-loops {
    padding: 4rem 0;
    background: var(--card-bg);
}

.featured-loops h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.loops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* 浏览循环页面 */
.browse-loops {
    padding: 3rem 0;
}

.browse-loops h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--card-bg);
}

.filter-group input {
    min-width: 200px;
}

.loops-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.loop-header {
    margin-bottom: 1rem;
}

.loop-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.loop-agents {
    display: flex;
    gap: 0.5rem;
}

.agent {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.loop-actions {
    display: flex;
    gap: 0.5rem;
}

.loop-kickoff {
    margin-top: 1rem;
    background: var(--code-bg);
    border-radius: 0.5rem;
    overflow: hidden;
}

.loop-kickoff pre {
    padding: 1rem;
    overflow-x: auto;
}

.loop-kickoff code {
    color: var(--code-text);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* 关于页面 */
.about {
    padding: 3rem 0;
}

.about h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-content {
    max-width: 800px;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.about-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    margin-bottom: 0;
    color: var(--text-light);
}

.resource-links {
    display: flex;
    gap: 1rem;
}

/* 页脚 */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .tools-grid {
        flex-direction: column;
        align-items: center;
    }

    .filters {
        flex-direction: column;
    }

    .loop-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .resource-links {
        flex-direction: column;
    }
}
