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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo .logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text strong {
    color: #1e293b;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
}

.logo-text span {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1;
    display: block;
}

.nav-logo h2 {
    color: #2563eb;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: -5px;
}

.nav-logo span {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #2563eb;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主页横幅 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-animation {
    width: 300px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.code-line {
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    margin: 10px 0;
    border-radius: 2px;
    animation: codeTyping 2s ease-in-out infinite;
}

.code-line:nth-child(1) { width: 80%; animation-delay: 0s; }
.code-line:nth-child(2) { width: 60%; animation-delay: 0.5s; }
.code-line:nth-child(3) { width: 90%; animation-delay: 1s; }
.code-line:nth-child(4) { width: 70%; animation-delay: 1.5s; }

@keyframes codeTyping {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* 通用区块样式 */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* 关于我们 */
.about {
    padding: 6rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-text ul {
    list-style: none;
    margin-top: 1rem;
}

.about-text li {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #64748b;
}

.about-text li i {
    color: #10b981;
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #2563eb;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #64748b;
    font-weight: 500;
}

/* 服务展示 */
.services {
    padding: 6rem 0;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: #64748b;
    line-height: 1.6;
}

/* 技术栈 */
.tech-stack {
    padding: 6rem 0;
    background: #f8fafc;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tech-category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.tech-category:hover {
    transform: translateY(-3px);
}

.tech-category h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.tech-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
    justify-items: center;
}

.tech-item {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 100px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-item:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.05);
}

/* 联系我们 */
.contact {
    padding: 6rem 0;
    background: white;
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.contact-item h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: #64748b;
    margin: 0;
}

.contact-item a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 页脚 */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
}

/* 备案信息样式 */
#icp-record {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

#icp-record .icp-text {
    color: #94a3b8;
    font-size: 0.9rem;
    position: relative;
}

#icp-record .icp-text a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

#icp-record .icp-text a:hover {
    color: #64748b;
}

#icp-record .icp-police {
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

#icp-record .icp-police a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

#icp-record .icp-police a:hover {
    color: #64748b;
}

/* CSS生成的竖线分隔符（当两项备案均存在时显示） */
#icp-record.both-records .icp-police::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    background: #64748b;
    opacity: 0.6;
    margin: 0 8px;
    vertical-align: middle;
}

@media (prefers-color-scheme: dark) {
    #icp-record .icp-text,
    #icp-record .icp-police { 
        color: #94a3b8; 
    }
    
    #icp-record .icp-text a,
    #icp-record .icp-police a {
        color: #94a3b8;
    }
    
    #icp-record .icp-text a:hover,
    #icp-record .icp-police a:hover {
        color: #cbd5e1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-logo .logo-img { height: 32px; }
    .logo-text { display: none; }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-items {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.6rem;
    }

    .tech-item {
        min-width: 90px;
        max-width: 120px;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .service-card,
    .tech-category {
        padding: 1.5rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .tech-items {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.5rem;
    }

    .tech-item {
        min-width: 75px;
        max-width: 100px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* 深色模式覆盖（集中维护，避免分散在文件各处） */
@media (prefers-color-scheme: dark) {
    body {
        color: #e5e7eb;
        background: #0b1220;
    }

    /* 导航栏与滚动态 */
    .navbar {
        background: rgba(17, 24, 39, 0.85);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .navbar.scrolled {
        background: rgba(17, 24, 39, 0.92);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    }
    .nav-menu a { color: #cbd5e1; }
    .nav-menu a:hover { color: #93c5fd; }
    .logo-text strong { color: #e5e7eb; }
    .logo-text span { color: #94a3b8; }

    /* 英雄区 */
    .hero { background: linear-gradient(135deg, #334155 0%, #0f172a 100%); }

    /* 区块与卡片背景 */
    .about { background: #0b1220; }
    .services { background: #0b1220; }
    .tech-stack { background: #0b1220; }
    .contact { background: #0b1220; }

    .section-header h2 { color: #e5e7eb; }
    .section-header p { color: #94a3b8; }

    .stat-item,
    .service-card,
    .tech-category,
    .contact-form {
        background: #0f172a;
        border: 1px solid #1f2937;
        box-shadow: none;
    }

    /* 联系我们图标 */
    .contact-item i { background: #1d4ed8; }

    /* 页脚 */
    .footer { background: #0b1220; }

    /* Logo 图像在深色模式的反色处理（若上传深色版Logo，可移除本规则） */
    .nav-logo .logo-img {
        filter: invert(1) hue-rotate(180deg) saturate(0.9) contrast(1.05);
    }
}
