/* ============================================
   菜鸟网络科技工作室系统 - 前端样式
   www.cnmnm.com
   浅色科技风格 | 动效丰富 | 响应式
   ============================================ */

:root {
    --primary: #4f6ef7;
    --primary-light: #eef1ff;
    --primary-dark: #3a55d9;
    --secondary: #00d4ff;
    --accent: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1a1a2e;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #4f6ef7 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #00d4ff 0%, #4f6ef7 100%);
    --gradient-hero: linear-gradient(180deg, #f8faff 0%, #eef1ff 50%, #f9fafb 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.05);
    --shadow-glow: 0 0 40px rgba(79,110,247,.2);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all .3s cubic-bezier(.4,0,.2,1);
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--gray-700);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

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

/* ============ 导航栏 ============ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(255,255,255,.95);
    border-bottom-color: var(--gray-200);
    box-shadow: var(--shadow);
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.navbar-menu a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: .95rem;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

/* ============ Hero区域 ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(79,110,247,.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(0,212,255,.08) 0%, transparent 50%);
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 2%); }
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: .3;
    animation: particleFloat 15s infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: .5; }
    90% { opacity: .5; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: .85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
    50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.hero h1 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--gray-500);
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(79,110,247,.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79,110,247,.5);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

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

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.stat-item .stat-number span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item .stat-label {
    font-size: .9rem;
    color: var(--gray-500);
    margin-top: 8px;
}

/* ============ 通用Section ============ */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-description {
    font-size: 1.1rem;
    color: var(--gray-500);
}

/* ============ 服务卡片 ============ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    border: 1px: var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 64px; height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 24px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotateY(180deg);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--gray-500);
    font-size: .95rem;
}

/* ============ 案例展示 ============ */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 28px;
}

.case-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.case-image {
    height: 220px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-image .overlay {
    position: absolute;
    inset: 0;
    background: rgba(79,110,247,.9);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.case-card:hover .case-image .overlay {
    opacity: 1;
}

.case-image .overlay a {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
}

.case-content {
    padding: 24px;
}

.case-category {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.case-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.case-card p {
    color: var(--gray-500);
    font-size: .9rem;
}

/* ============ 文章列表 ============ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.article-cover {
    height: 200px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 24px;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: .85rem;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.article-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--gray-900);
}

.article-card h3 a:hover {
    color: var(--primary);
}

.article-card p {
    color: var(--gray-500);
    font-size: .9rem;
}

/* ============ 联系我们 ============ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--primary-light);
}

.contact-item-icon {
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 12px;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--gray-500);
    font-size: .9rem;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: .95rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* ============ CTA区域 ============ */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 32px;
}

.cta-content .btn-white {
    background: var(--white);
    color: var(--primary);
    padding: 16px 40px;
    font-size: 1.1rem;
}

.cta-content .btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

/* ============ 页脚 ============ */
.footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: .95rem;
    line-height: 1.8;
}

.footer h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-400);
    font-size: .95rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.1);
    border-radius: 10px;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 24px 0;
    text-align: center;
    font-size: .9rem;
}

/* ============ 页面Banner ============ */
.page-banner {
    padding: 160px 0 80px;
    background: var(--gradient-hero);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(79,110,247,.05) 0%, transparent 50%);
}

.page-banner h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
    position: relative;
}

.page-banner p {
    font-size: 1.1rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* ============ 文章详情页 ============ */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-detail-header {
    margin-bottom: 40px;
}

.article-detail-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-detail-meta {
    display: flex;
    gap: 24px;
    color: var(--gray-500);
    font-size: .95rem;
}

.article-detail-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--gray-700);
}

.article-detail-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 32px 0 16px;
}

.article-detail-content p {
    margin-bottom: 16px;
}

.article-detail-content img {
    border-radius: var(--radius);
    margin: 24px 0;
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.tag {
    padding: 4px 12px;
    background: var(--gray-100);
    border-radius: 50px;
    font-size: .85rem;
    color: var(--gray-600);
}

/* ============ 分页 ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin-top: 48px;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
}

.pagination .page-item .page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
}

/* ============ 动画 ============ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ 响应式 ============ */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-stats { flex-wrap: wrap; gap: 24px; }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--gray-200);
    }
    
    .navbar-menu.open { display: flex; }
    .navbar-toggle { display: block; }
    
    .hero h1 { font-size: 2rem; }
    .hero-description { font-size: 1rem; }
    .section { padding: 60px 0; }
    .section-title { font-size: 1.75rem; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .page-banner h1 { font-size: 2rem; }
    .article-detail-header h1 { font-size: 1.75rem; }
}

/* ============ 404页面 ============ */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 0;
}

.error-page h1 {
    font-size: 8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-page p {
    font-size: 1.2rem;
    color: var(--gray-500);
    margin-bottom: 32px;
}
