/* ========== 善语 AI 门户 - 公共样式 ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* Navigation */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 1rem 0; transition: var(--transition); background: transparent;
}
.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); padding: 0.75rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--white); }
.logo-icon {
    width: 40px; height: 40px; background: var(--gradient-primary);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.25rem; color: white; letter-spacing: -1px;
}
.logo-text { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.5px; }
.logo-text span { display: block; font-size: 0.7rem; font-weight: 400; color: var(--gray-400); letter-spacing: 1px; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--gray-300); font-size: 0.9rem;
    font-weight: 500; transition: var(--transition); position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0;
    height: 2px; background: var(--gradient-primary); transition: var(--transition); border-radius: 1px;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle {
    display: none; flex-direction: column; cursor: pointer; gap: 5px;
    background: none; border: none; padding: 4px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }

/* Footer */
.footer { background: var(--dark); padding: 3rem 0 2rem; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
    padding-bottom: 3rem; border-bottom: 1px solid var(--gray-800);
}
.footer-brand .logo-text { font-size: 1.2rem; font-weight: 600; color: var(--white); margin-bottom: 0.75rem; }
.footer-brand .logo-text span { display: block; font-size: 0.75rem; font-weight: 400; color: var(--gray-500); }
.footer-brand p { font-size: 0.9rem; color: var(--gray-500); line-height: 1.7; margin-top: 1rem; max-width: 300px; }
.footer-column h4 { font-size: 0.9rem; font-weight: 600; color: var(--white); margin-bottom: 1.25rem; }
.footer-column ul li { margin-bottom: 0.75rem; }
.footer-column ul li a { text-decoration: none; color: var(--gray-500); font-size: 0.9rem; transition: var(--transition); }
.footer-column ul li a:hover { color: var(--primary-light); }
.footer-bottom {
    display: flex; align-items: center; justify-content: center;
    padding-top: 2rem; font-size: 0.85rem; color: var(--gray-600); flex-wrap: wrap; gap: 1rem;
    text-align: center;
}
.footer-bottom span:last-child {
    white-space: nowrap;
}
.footer-bottom a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
.footer-bottom a:hover { color: var(--white); }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Page Hero */
.page-hero {
    background: var(--gradient-hero); padding: 10rem 2rem 5rem; text-align: center; color: var(--white);
}
.page-hero h1 {
    font-size: 3rem; font-weight: 700; margin-bottom: 1rem;
    background: var(--gradient-primary); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.page-hero p { font-size: 1.1rem; color: var(--gray-400); max-width: 600px; margin: 0 auto; }

/* Section */
.section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2rem; font-weight: 700; color: var(--dark); margin-bottom: 1rem; }
.section-subtitle { font-size: 1rem; color: var(--gray-500); margin-bottom: 3rem; }

/* Card Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.card {
    background: var(--white); border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--shadow-md); transition: var(--transition); border: 1px solid var(--gray-200);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem; font-size: 1.5rem;
}
.card-icon.blue { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.card-icon.cyan { background: rgba(6, 182, 212, 0.1); color: var(--secondary); }
.card-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--accent); }
.card-icon.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.card h3 { font-size: 1.2rem; font-weight: 600; color: var(--dark); margin-bottom: 0.75rem; }
.card p { font-size: 0.9rem; color: var(--gray-600); line-height: 1.6; }
.card a {
    display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem;
    color: var(--primary); font-weight: 500; font-size: 0.9rem; transition: var(--transition);
}
.card a:hover { color: var(--primary-dark); gap: 0.75rem; }

/* Tags */
.tag {
    display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 500; margin-right: 0.5rem; margin-bottom: 0.5rem;
}
.tag.blue { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.tag.cyan { background: rgba(6, 182, 212, 0.1); color: var(--secondary); }
.tag.purple { background: rgba(139, 92, 246, 0.1); color: var(--accent); }
.tag.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.tag.orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.tag.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Dark Section */
.dark-section { background: var(--dark); color: var(--white); padding: 5rem 2rem; }
.dark-section .section-title { color: var(--white); }
.dark-section .section-subtitle { color: var(--gray-400); }
.dark-section .card { background: var(--dark-light); border-color: var(--gray-700); color: var(--gray-300); }
.dark-section .card h3 { color: var(--white); }
.dark-section .card p { color: var(--gray-400); }

/* New Badge */
.new-badge {
    display: inline-block; background: #ef4444; color: white;
    font-size: 0.65rem; padding: 0.1rem 0.4rem; border-radius: 4px;
    margin-left: 0.5rem; font-weight: 600; vertical-align: middle;
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links {
        display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(15, 23, 42, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
    }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 1.2rem; }
    .nav-toggle { display: flex; }
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-bottom span:last-child { white-space: nowrap; }
    .page-hero h1 { font-size: 2rem; }
    .page-hero { padding: 8rem 1rem 3rem; }
    .section { padding: 3rem 1rem; }
    .card-grid { grid-template-columns: 1fr; }
}
