@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0f172a;
    --primary-hover: #334155;
    --accent: #3b82f6;
    --text: #0f172a;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0, transparent 50%), 
        radial-gradient(at 50% 0%, rgba(168, 85, 247, 0.05) 0, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0, transparent 50%);
    background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; transition: all 0.2s ease; }
a:hover { opacity: 0.8; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Typography */
h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 700; color: var(--text); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border: none; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    color: white;
    opacity: 1;
}

.btn-secondary {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: var(--text);
    opacity: 1;
}

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo:hover { opacity: 0.8; }
.nav { display: flex; gap: 32px; align-items: center; }
.nav-link { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--text); opacity: 1; }
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    visibility: hidden; opacity: 0; position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
    background-color: var(--surface); min-width: 160px; box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm); border: 1px solid var(--border); z-index: 101;
    padding: 8px 0; margin-top: 8px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.dropdown-content a {
    color: var(--text-muted); padding: 10px 20px; text-decoration: none; display: block; font-size: 14px; font-weight: 500;
}
.dropdown-content a:hover { background-color: #f8fafc; color: var(--text); }
.dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
.user-nav { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: var(--text); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

/* Hero */
.hero { padding: 100px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(168, 85, 247, 0.08) 40%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}
.hero h1 { 
    font-size: 56px; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.04em;
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 20px; color: var(--text-muted); margin: 0 auto 40px; max-width: 600px; line-height: 1.6; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(241, 245, 249, 0.6) 50%, rgba(255,255,255,0) 100%); }
.section-title { font-size: 36px; margin-bottom: 12px; text-align: center; letter-spacing: -0.03em; }
.section-desc { color: var(--text-muted); margin-bottom: 48px; text-align: center; font-size: 18px; }

/* Cards */
.packages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.package-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 40px 32px; transition: all 0.3s ease;
    display: flex; flex-direction: column;
}
.package-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #cbd5e1; }
.package-card.recommended { border: 2px solid var(--accent); box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 8px 10px -6px rgba(59, 130, 246, 0.1); position: relative; }
.package-card.recommended::before {
    content: '最受欢迎'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); color: white; padding: 4px 16px; font-size: 13px; font-weight: 600; border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}
.package-name { font-size: 18px; font-weight: 600; color: var(--text-muted); margin-bottom: 16px; }
.package-price { font-size: 48px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.03em; color: var(--primary); }
.package-card.recommended .package-price { background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.package-price span { font-size: 16px; font-weight: 500; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }
.package-list { margin: 32px 0; list-style: none; flex-grow: 1; }
.package-list li { padding: 12px 0; color: var(--text); font-size: 15px; display: flex; align-items: center; border-bottom: 1px solid #f1f5f9; }
.package-list li:last-child { border-bottom: none; }
.package-list li::before { content: ''; display: inline-block; width: 20px; height: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f172a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'%3E%3C/path%3E%3C/svg%3E"); margin-right: 12px; }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature-item { padding: 32px; background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); transition: all 0.3s ease; }
.feature-item:hover { box-shadow: var(--shadow-md); border-color: #cbd5e1; transform: translateY(-2px); }
.feature-item h3 { font-size: 18px; margin-bottom: 8px; }
.feature-item p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.feature-icon { font-size: 32px; margin-bottom: 20px; background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); color: var(--accent); width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 16px; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1); }

/* FAQ */
.faq-list { max-width: 768px; margin: 0 auto; }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item h4 { font-size: 18px; margin-bottom: 12px; }
.faq-item p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* Resources Grid */
.resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.resource-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    cursor: pointer; position: relative; transition: all 0.3s ease;
    display: flex; flex-direction: column; overflow: hidden;
}
.resource-cover {
    width: 100%; height: 200px; overflow: hidden; background: #f1f5f9; position: relative;
}
.resource-cover img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.resource-card:hover .resource-cover img { transform: scale(1.05); }
.resource-content { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; }
.resource-card:hover { box-shadow: var(--shadow-hover); border-color: #cbd5e1; transform: translateY(-4px); }

.resource-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.resource-header .cat { font-size: 24px; }
.resource-header .cat-name { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.resource-card h3 { font-size: 16px; margin-bottom: 0; line-height: 1.4; flex-grow: 1; font-weight: 600; text-align: center; }
.resource-meta { display: flex; justify-content: center; font-size: 13px; color: var(--text-muted); font-weight: 500; border-top: 1px solid #f1f5f9; padding-top: 12px; margin-top: 12px; }

/* Gallery */
.gallery-grid { 
    columns: 4 200px;
    column-gap: 16px;
}
.gallery-item {
    border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: all 0.3s ease;
    background: #f1f5f9; margin-bottom: 16px; break-inside: avoid;
}
.gallery-item img {
    width: 100%; height: auto; display: block; transition: transform 0.3s ease;
}
.gallery-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gallery-item:hover img { transform: scale(1.05); }

/* Pagination */
.pagination-btn {
    padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text-muted); cursor: pointer;
    font-size: 14px; font-weight: 500; transition: all 0.2s ease;
}
.pagination-btn:hover:not(:disabled) {
    border-color: var(--accent); color: var(--accent); background: #eff6ff;
}
.pagination-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: white; border-color: transparent;
}
.pagination-btn:disabled {
    opacity: 0.5; cursor: not-allowed;
}

/* Category Nav */
.category-nav { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.category-nav a {
    padding: 8px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
    color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.category-nav a:hover { border-color: var(--text-muted); color: var(--text); opacity: 1; }
.category-nav a.active { background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); color: white; border-color: transparent; opacity: 1; box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2); }

.subcategory-nav a {
    padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
    color: var(--text-muted); background: var(--surface); border: 1px dashed var(--border);
    transition: all 0.2s ease;
}
.subcategory-nav a:hover { border-color: var(--accent); color: var(--accent); }
.subcategory-nav a.active { background: #eff6ff; color: var(--accent); border: 1px solid var(--accent); }

/* Modals */
.modal {
    display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 1000; padding: 24px; overflow-y: auto; align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-panel {
    background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.1);
    transform: scale(0.95); opacity: 0; animation: modalIn 0.2s forwards cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn { to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 32px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 20px; }
.modal-close { font-size: 24px; cursor: pointer; color: var(--text-muted); transition: color 0.2s; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 32px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.form-group input {
    width: 100%; padding: 12px 16px; background: var(--bg); border: 1px solid transparent;
    border-radius: var(--radius-sm); font-size: 15px; transition: all 0.2s; font-family: var(--font-sans);
}
.form-group input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-help { margin-top: 20px; text-align: center; font-size: 14px; color: var(--text-muted); }

/* Detail Panel */
.detail-panel { max-width: 768px; }
.detail-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.detail-top .tags { font-size: 14px; font-weight: 500; color: var(--text-muted); background: var(--bg); padding: 6px 12px; border-radius: 20px; }
.detail-content {
    background: #1e293b; color: #f8fafc; padding: 24px; border-radius: var(--radius-md);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px; line-height: 1.7; margin-bottom: 24px; overflow-x: auto;
}
.detail-example { background: #f0fdf4; border: 1px solid #bbf7d0; padding: 20px; border-radius: var(--radius-md); margin-bottom: 24px; font-size: 14px; color: #166534; line-height: 1.6; }
.detail-actions { display: flex; gap: 16px; margin-top: 32px; }
.detail-actions .btn { flex: 1; padding: 14px 24px; font-size: 16px; }
.fav-btn {
    width: 52px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm);
    cursor: pointer; font-size: 20px; transition: all 0.2s;
}
.fav-btn:hover { background: var(--bg); transform: scale(1.05); }

/* Dashboard */
.page { padding: 40px 0; }
.page-head { margin-bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
.page-head h1 { font-size: 32px; margin-bottom: 8px; }
.member-badge { padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.member-badge.none { background: #f1f5f9; color: #475569; }
.member-badge.basic { background: #dbeafe; color: #1e40af; }
.member-badge.premium { background: #fef3c7; color: #92400e; }
.member-badge.lifetime { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #9d174d; }

.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; }
.sidebar-box { background: transparent; border: none; padding: 0; }
.sidebar-menu { list-style: none; position: sticky; top: 100px; }
.sidebar-menu li { margin-bottom: 8px; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 500; color: var(--text-muted);
}
.sidebar-menu a:hover { background: var(--surface); color: var(--text); opacity: 1; box-shadow: var(--shadow-sm); }
.sidebar-menu a.active { background: var(--primary); color: white; opacity: 1; box-shadow: var(--shadow-sm); }

.content-box { background: transparent; border: none; padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.stat-item { background: var(--surface); padding: 24px; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-item .label { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-item .value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }

.promo-box { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border-radius: var(--radius-md); padding: 32px; color: white; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-md); }
.promo-box h3 { font-size: 20px; color: white; margin-bottom: 8px; }
.promo-box p { color: #94a3b8; font-size: 15px; margin: 0; }
.promo-box .btn { background: white; color: var(--primary); }
.promo-box .btn:hover { background: #f8fafc; color: var(--primary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0; margin-top: 80px; background: var(--surface); }
.footer-content { text-align: center; color: var(--text-muted); font-size: 14px; }

/* Toast */
.toast {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
    padding: 14px 24px; background: var(--primary); color: white; border-radius: 999px;
    font-size: 14px; font-weight: 500; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 2000; opacity: 0; animation: toastIn 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes toastIn { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
    .packages-grid, .features-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .packages-grid, .features-grid, .stats-grid, .resources-grid { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar-menu { position: static; display: flex; overflow-x: auto; padding-bottom: 16px; margin-bottom: 24px; }
    .sidebar-menu li { flex-shrink: 0; }
    .nav { display: none; }
    .hero h1 { font-size: 40px; }
    .promo-box { flex-direction: column; align-items: flex-start; gap: 20px; }
}
