/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
}

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

/* 按钮样式 */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

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

.btn-large {
    padding: 14px 36px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 20px;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

.user-area {
    display: flex;
    gap: 12px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .number {
    font-size: 36px;
    font-weight: 800;
}

.stat .label {
    font-size: 14px;
    opacity: 0.8;
}

/* Categories */
.categories {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 24px;
}

.categories h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.category-card .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 13px;
    color: var(--gray);
}

/* Prompts Section */
.prompts-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 32px;
}

.filter-bar {
    display: flex;
    gap: 12px;
}

.filter-bar select,
.filter-bar input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.filter-bar input {
    width: 200px;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.prompt-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.prompt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.prompt-card .category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}

.prompt-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.prompt-card .description {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prompt-card .price {
    font-weight: 700;
    font-size: 18px;
    color: var(--secondary);
}

.prompt-card .price.free {
    color: var(--success);
}

.prompt-card .price.vip {
    color: var(--primary);
}

.prompt-card .usage {
    font-size: 12px;
    color: var(--gray);
}

/* Membership */
.membership-section {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 80px 24px;
}

.membership-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.pricing-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    border: 2px solid var(--border);
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.pricing-card .price {
    font-size: 48px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 24px;
}

.pricing-card .price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--gray);
}

.pricing-card .features {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.pricing-card .features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.pricing-card .features li:last-child {
    border-bottom: none;
}

/* About */
.about-section {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px 24px;
    text-align: center;
}

.about-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.about-section p {
    color: var(--gray);
    font-size: 16px;
    line-height: 1.8;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 40px 24px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-content.prompt-detail {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 24px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-content input {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.modal-content .modal-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

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

/* Payment */
.payment-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.pay-option {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.pay-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.pay-qr {
    text-align: center;
    padding: 30px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 20px;
}

#qrCode {
    width: 150px;
    height: 150px;
    background: white;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

#qrCode::after {
    content: "📱";
    font-size: 60px;
}

/* Prompt Detail */
.prompt-detail-content {
    padding: 20px 0;
}

.prompt-detail-content h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.prompt-detail-content .full-description {
    color: var(--gray);
    margin-bottom: 24px;
    line-height: 1.8;
}

.prompt-box {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.prompt-box .copy-btn {
    float: right;
    background: #3d3d3d;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.prompt-detail-content .usage-tips {
    background: rgba(99, 102, 241, 0.05);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.prompt-detail-content .usage-tips h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.prompt-detail-content .usage-tips ul {
    padding-left: 20px;
    color: var(--gray);
    font-size: 14px;
}

.prompt-detail-content .usage-tips li {
    margin-bottom: 4px;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        display: none;
    }
    
    .filter-bar {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-bar input {
        width: 100%;
    }
    
    .pricing-card.featured {
        transform: none;
    }
}