/* ========== CSS Variables ========== */
:root {
    --primary: #6C5CE7;
    --primary-light: #a29bfe;
    --primary-dark: #5a4bd1;
    --accent: #00cec9;
    --accent-light: #81ecec;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;
    --pink: #fd79a8;
    --orange: #ff9f43;
    --blue: #74b9ff;
    --bg: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-card-hover: #1c2a4a;
    --text: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c85;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.4);
    --glow-primary: 0 0 40px rgba(108,92,231,0.3);
    --glow-accent: 0 0 40px rgba(0,206,201,0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg: #f0f2f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5ff;
    --text: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #8a8aa0;
    --border: rgba(0,0,0,0.08);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.12);
    --glow-primary: 0 0 30px rgba(108,92,231,0.15);
    --glow-accent: 0 0 30px rgba(0,206,201,0.15);
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== Animated Background ========== */
.bg-effects { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.12; animation: float 20s ease-in-out infinite; }
.bg-orb:nth-child(1) { width: 500px; height: 500px; background: var(--primary); top: -10%; left: -5%; }
.bg-orb:nth-child(2) { width: 400px; height: 400px; background: var(--accent); top: 50%; right: -10%; animation-delay: -7s; animation-duration: 25s; }
.bg-orb:nth-child(3) { width: 350px; height: 350px; background: #e84393; bottom: -5%; left: 30%; animation-delay: -14s; animation-duration: 22s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* ========== Navigation ========== */
.top-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(15,15,26,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
[data-theme="light"] .top-nav { background: rgba(240,242,248,0.9); }
.nav-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.nav-logo {
    font-size: 16px; font-weight: 800; color: var(--primary-light);
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    text-decoration: none;
}
.nav-logo span { font-size: 20px; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
    padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
    color: var(--text-secondary); cursor: pointer; transition: var(--transition);
    white-space: nowrap; text-decoration: none; border: none; background: none;
}
.nav-link:hover, .nav-link.active { background: rgba(108,92,231,0.15); color: var(--primary-light); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.theme-toggle {
    width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-card); color: var(--text); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.theme-toggle:hover { background: var(--bg-card-hover); transform: scale(1.05); }
.mobile-menu-btn {
    display: none; width: 38px; height: 38px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--bg-card); color: var(--text); font-size: 20px;
    cursor: pointer; align-items: center; justify-content: center;
}

/* ========== Layout ========== */
.container { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========== Hero ========== */
.hero {
    text-align: center; padding: 100px 0 30px;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px; background: rgba(108,92,231,0.15);
    border: 1px solid rgba(108,92,231,0.3); border-radius: 20px;
    font-size: 13px; color: var(--primary-light); margin-bottom: 20px;
}
.hero-badge .dot {
    width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.hero h1 {
    font-size: clamp(28px, 5vw, 48px); font-weight: 800; line-height: 1.2; margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
[data-theme="light"] .hero h1 {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
    font-size: clamp(14px, 2vw, 17px); color: var(--text-secondary);
    max-width: 650px; margin: 0 auto 32px;
}

/* Stats */
.stats-row {
    display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px;
}
.stat-chip {
    display: flex; align-items: center; gap: 6px; padding: 8px 18px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    font-size: 13px; color: var(--text-secondary);
}
.stat-chip b { font-size: 20px; font-weight: 800; color: var(--primary-light); }

/* Quick Search */
.quick-search {
    max-width: 480px; margin: 0 auto 20px; position: relative;
}
.quick-search input {
    width: 100%; padding: 12px 20px 12px 44px; border-radius: 14px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
    font-size: 14px; outline: none; transition: var(--transition);
}
.quick-search input:focus { border-color: var(--primary); box-shadow: var(--glow-primary); }
.quick-search input::placeholder { color: var(--text-muted); }
.quick-search .search-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-size: 18px; color: var(--text-muted);
}

/* ========== Section ========== */
.section { margin-bottom: 56px; }
.section-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.section-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.section-icon.tools { background: rgba(108,92,231,0.2); }
.section-icon.prompts { background: rgba(0,206,201,0.2); }
.section-icon.platforms { background: rgba(253,121,168,0.2); }
.section-icon.resources { background: rgba(255,159,67,0.2); }
.section-icon.faq { background: rgba(116,185,255,0.2); }
.section-icon.safety { background: rgba(0,184,148,0.2); }
.section-title { font-size: 20px; font-weight: 700; }
.section-subtitle { font-size: 13px; color: var(--text-muted); }
.section-count {
    margin-left: auto; font-size: 12px; padding: 3px 10px;
    background: rgba(108,92,231,0.15); color: var(--primary-light);
    border-radius: 10px; font-weight: 600;
}

/* ========== Tool Cards ========== */
.tools-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}
.tool-card {
    position: relative; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; cursor: pointer; transition: var(--transition);
    text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
}
.tool-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--card-color, var(--primary)), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover {
    background: var(--bg-card-hover); border-color: rgba(108,92,231,0.3);
    transform: translateY(-4px); box-shadow: var(--shadow-hover);
}
.tool-card-header { display: flex; align-items: flex-start; gap: 14px; }
.tool-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; flex-shrink: 0; transition: var(--transition);
}
.tool-card:hover .tool-icon { transform: scale(1.1); }
.tool-icon.c1 { background: linear-gradient(135deg, rgba(108,92,231,0.3), rgba(108,92,231,0.1)); }
.tool-icon.c2 { background: linear-gradient(135deg, rgba(0,206,201,0.3), rgba(0,206,201,0.1)); }
.tool-icon.c3 { background: linear-gradient(135deg, rgba(255,159,67,0.3), rgba(255,159,67,0.1)); }
.tool-icon.c4 { background: linear-gradient(135deg, rgba(0,184,148,0.3), rgba(0,184,148,0.1)); }
.tool-icon.c5 { background: linear-gradient(135deg, rgba(253,121,168,0.3), rgba(253,121,168,0.1)); }
.tool-icon.c6 { background: linear-gradient(135deg, rgba(116,185,255,0.3), rgba(116,185,255,0.1)); }
.tool-icon.c7 { background: linear-gradient(135deg, rgba(255,159,67,0.3), rgba(162,155,254,0.2)); }
.tool-info { flex: 1; min-width: 0; }
.tool-name {
    font-size: 16px; font-weight: 700; margin-bottom: 3px;
    display: flex; align-items: center; gap: 8px;
}
.tool-badge {
    font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap;
}
.tool-badge.hot { background: rgba(255,71,87,0.15); color: #ff4757; }
.tool-badge.new { background: rgba(0,206,201,0.15); color: #00cec9; }
.tool-badge.recommend { background: rgba(255,159,67,0.15); color: #ff9f43; }
.tool-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tool-tag {
    font-size: 11px; padding: 3px 9px; border-radius: 6px;
    background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border);
}
.tool-arrow {
    position: absolute; bottom: 24px; right: 24px; width: 28px; height: 28px;
    border-radius: 7px; background: rgba(108,92,231,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--primary-light); transition: var(--transition);
    opacity: 0; transform: translateX(-6px);
}
.tool-card:hover .tool-arrow { opacity: 1; transform: translateX(0); }

/* ========== Platform Cards ========== */
.platform-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.platform-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; transition: var(--transition); text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: 12px;
}
.platform-card:hover {
    background: var(--bg-card-hover); border-color: rgba(108,92,231,0.3);
    transform: translateY(-3px); box-shadow: var(--shadow-hover);
}
.platform-head { display: flex; align-items: center; gap: 12px; }
.platform-logo {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; flex-shrink: 0;
}
.platform-name { font-size: 16px; font-weight: 700; }
.platform-company { font-size: 12px; color: var(--text-muted); }
.platform-features { display: flex; flex-wrap: wrap; gap: 5px; }
.platform-feat {
    font-size: 11px; padding: 3px 8px; border-radius: 5px;
    background: rgba(108,92,231,0.1); color: var(--primary-light);
}
.platform-action {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 8px; border-top: 1px solid var(--border);
}
.platform-price { font-size: 12px; color: var(--success); font-weight: 600; }
.platform-link {
    font-size: 12px; padding: 4px 12px; border-radius: 6px;
    background: rgba(108,92,231,0.15); color: var(--primary-light);
    text-decoration: none; transition: var(--transition);
}
.platform-link:hover { background: rgba(108,92,231,0.3); }

/* ========== Prompt Templates ========== */
.prompt-tabs {
    display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap;
}
.prompt-tab {
    padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 500;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary);
    cursor: pointer; transition: var(--transition);
}
.prompt-tab:hover { border-color: var(--primary); color: var(--primary-light); }
.prompt-tab.active { background: rgba(108,92,231,0.2); border-color: var(--primary); color: var(--primary-light); }

.prompt-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 16px;
}
.prompt-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: var(--transition);
}
.prompt-card:hover { border-color: rgba(0,206,201,0.3); }
.prompt-card-head {
    padding: 16px 20px 12px; display: flex; align-items: flex-start; justify-content: space-between;
}
.prompt-card-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.prompt-card-scene { font-size: 12px; color: var(--text-muted); }
.prompt-copy-btn {
    padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
    background: rgba(0,206,201,0.15); color: var(--accent); border: none; cursor: pointer;
    transition: var(--transition); white-space: nowrap;
}
.prompt-copy-btn:hover { background: rgba(0,206,201,0.3); }
.prompt-copy-btn.copied { background: rgba(0,184,148,0.2); color: var(--success); }
.prompt-body {
    padding: 0 20px 16px;
}
.prompt-text {
    font-size: 13px; color: var(--text-secondary); line-height: 1.7;
    background: rgba(0,0,0,0.15); border-radius: var(--radius-sm); padding: 14px;
    border: 1px solid var(--border); max-height: 180px; overflow-y: auto;
    white-space: pre-wrap; word-break: break-word;
}
[data-theme="light"] .prompt-text { background: rgba(0,0,0,0.03); }
.prompt-text::-webkit-scrollbar { width: 4px; }
.prompt-text::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ========== Resource Cards ========== */
.resource-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.resource-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; transition: var(--transition); text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: 12px;
}
.resource-card:hover {
    background: var(--bg-card-hover); transform: translateY(-3px);
    box-shadow: var(--shadow-hover); border-color: rgba(255,159,67,0.3);
}
.resource-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 24px;
    background: linear-gradient(135deg, rgba(255,159,67,0.25), rgba(255,159,67,0.1));
}
.resource-name { font-size: 16px; font-weight: 700; }
.resource-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.resource-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; color: var(--primary-light); font-weight: 600; margin-top: auto;
}

/* ========== FAQ Accordion ========== */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    overflow: hidden; transition: var(--transition);
}
.faq-item:hover { border-color: rgba(116,185,255,0.3); }
.faq-q {
    padding: 16px 20px; display: flex; align-items: center; gap: 12px;
    cursor: pointer; font-size: 14px; font-weight: 600; user-select: none;
}
.faq-q .q-icon {
    width: 26px; height: 26px; border-radius: 7px;
    background: rgba(116,185,255,0.15); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.faq-q .arrow {
    margin-left: auto; font-size: 12px; color: var(--text-muted);
    transition: transform 0.3s;
}
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
}
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner {
    padding: 0 20px 16px 58px; font-size: 13px; color: var(--text-secondary); line-height: 1.7;
}

/* ========== Safety Tips Cards ========== */
.safety-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.safety-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.safety-card-title {
    display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700;
}
.safety-card-icon { font-size: 20px; }
.safety-card-list { list-style: none; }
.safety-card-list li {
    font-size: 13px; color: var(--text-secondary); padding: 4px 0;
    padding-left: 18px; position: relative; line-height: 1.5;
}
.safety-card-list li::before {
    content: '•'; position: absolute; left: 4px; color: var(--accent);
}
.safety-dont li::before { content: '✕'; color: var(--danger); font-size: 11px; }
.safety-do li::before { content: '✓'; color: var(--success); font-size: 12px; }

/* ========== Footer ========== */
.footer {
    text-align: center; padding: 48px 0 32px; border-top: 1px solid var(--border); margin-top: 32px;
}
.footer p { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.footer .team { font-size: 14px; color: var(--text-secondary); font-weight: 600; }

/* ========== Toast ========== */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(80px);
    padding: 10px 24px; background: var(--success); color: #fff; border-radius: 10px;
    font-size: 14px; font-weight: 600; z-index: 9999; opacity: 0; transition: all 0.3s ease;
    pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero { padding: 80px 0 20px; }
    .nav-links { display: none; }
    .nav-links.show {
        display: flex; flex-direction: column; position: absolute;
        top: 56px; left: 0; right: 0; background: var(--bg-secondary);
        border-bottom: 1px solid var(--border); padding: 8px 16px; gap: 2px;
    }
    .mobile-menu-btn { display: flex; }
    .tools-grid, .platform-grid, .prompt-grid, .resource-grid, .safety-grid {
        grid-template-columns: 1fr;
    }
    .tool-arrow { display: none; }
    .stats-row { gap: 10px; }
    .stat-chip { padding: 6px 12px; font-size: 12px; }
    .stat-chip b { font-size: 16px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .tools-grid, .platform-grid { grid-template-columns: repeat(2, 1fr); }
    .prompt-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== Animations ========== */
.fade-in {
    opacity: 0; transform: translateY(20px); animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ========== Back to Top ========== */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px; width: 42px; height: 42px;
    border-radius: 12px; background: var(--primary); color: #fff; border: none;
    font-size: 18px; cursor: pointer; z-index: 90; opacity: 0; transform: translateY(10px);
    transition: var(--transition); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(108,92,231,0.4);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(108,92,231,0.5); }
