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

:root {
    /* X.com 风格配色 */
    --primary-color: #1DA1F2;
    --primary-hover: #1a8cd8;
    --secondary-color: #14171a;
    --text-dark: #ffffff;
    --text-light: #8b98a5;
    --bg-dark: #000000;
    --bg-card: #16181c;
    --bg-hover: #1a1a1a;
    --border-color: #2f3336;
    --border-hover: #536471;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-dark);
    overflow-x: hidden;
}

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

/* 导航栏 - x.ai 风格 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 20px;
    gap: 3rem;
}

.nav-brand {
    flex-shrink: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: block;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    color: var(--text-dark);
}

/* 移除下划线动画，使用更简洁的样式 */

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 首页横幅 */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    color: var(--text-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
    text-align: center;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.75rem;
    margin-bottom: 3rem;
    opacity: 0.7;
    text-align: center;
    height: 3.5rem; /* 固定高度，防止删除时布局跳动 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    font-weight: 400;
}

.typing-text-container {
    display: inline-block;
    white-space: nowrap;
    text-align: center;
    font-size: 1.75rem;
    line-height: 1.5;
    font-weight: 400;
    /* 宽度将在JavaScript中动态设置 */
}

.typing-cursor {
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    color: var(--primary-color);
    font-weight: 400;
    vertical-align: baseline;
    font-size: 1.75rem;
    line-height: 1.5;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

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

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(29, 161, 242, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-dark);
    border-bottom: 2px solid var(--text-dark);
    transform: rotate(45deg);
}

/* 通用区块 */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* 关于我们 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .lead {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.stat-item {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 160px; /* 统一最小高度 */
    height: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
}

.stat-item:hover {
    background: rgba(29, 161, 242, 0.05);
    border-color: rgba(29, 161, 242, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(29, 161, 242, 0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
}

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

.service-card {
    background: var(--bg-card);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.service-card:hover {
    background: rgba(29, 161, 242, 0.05);
    border-color: rgba(29, 161, 242, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(29, 161, 242, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.service-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.service-link:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-color);
    transform: translateX(3px);
}

/* 产品 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-card);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    background: rgba(29, 161, 242, 0.05);
    border-color: rgba(29, 161, 242, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(29, 161, 242, 0.1);
}

.product-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.placeholder-image {
    font-size: 3rem;
    color: var(--text-dark);
}

.product-info {
    padding: 0;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.product-info p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0;
}

/* 联系我们 */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .contact-content {
        gap: 3rem;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.wechat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: left;
    width: 100%;
    max-width: 320px;
    position: sticky;
    top: 100px;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.wechat-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.wechat-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.wechat-trigger .contact-icon {
    font-size: 2.5rem;
    margin: 0 0 0.75rem 0;
    display: block;
    transition: transform 0.3s ease;
}

.wechat-trigger h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.wechat-trigger-hint {
    font-size: 0.85em;
    color: var(--text-light);
    margin-top: 0.5rem;
    opacity: 0.8;
}

.wechat-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wechat-qr img {
    display: block;
    max-width: 180px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.wechat-qr a:hover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.wechat-hint {
    margin-top: 12px;
    font-size: 0.85em;
    color: var(--text-light);
    opacity: 0.8;
}

/* 桌面端：悬停显示二维码 */
@media (min-width: 769px) {
    .wechat-qr {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.4s ease;
        margin-top: 0;
    }
    
    .wechat-card:hover .wechat-qr {
        max-height: 500px;
        opacity: 1;
        margin-top: 1.5rem;
    }
    
    .wechat-card:hover .wechat-trigger .contact-icon {
        transform: scale(1.1);
    }
    
    .wechat-trigger-hint {
        display: block;
    }
}

/* 移动端：点击显示二维码 */
@media (max-width: 768px) {
    .wechat-qr {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.4s ease;
        margin-top: 0;
    }
    
    .wechat-card.active .wechat-qr {
        max-height: 500px;
        opacity: 1;
        margin-top: 1.5rem;
    }
    
    .wechat-card.active .wechat-trigger .contact-icon {
        transform: scale(1.1);
    }
    
    .wechat-trigger-hint {
        display: block;
    }
    
    .wechat-card {
        max-width: 100%;
        position: relative;
        top: 0;
        min-height: auto;
    }
    
    .contact-wechat {
        justify-content: center;
        width: 100%;
    }
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}


.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-color);
}

.wechat-qr {
    margin-top: 0.5rem;
}

.wechat-qr a {
    display: inline-block;
    text-decoration: none;
    border: none;
    transition: transform 0.3s ease;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .wechat-qr a {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .wechat-qr img {
        margin: 0 auto;
        max-width: 180px;
    }
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* 表单消息提示 */
.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.form-message.info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮禁用状态 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 页脚 */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
}

.footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color);
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        gap: 1.5rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .hamburger {
        display: flex;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-card);
        border-right: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
        height: 3rem; /* 固定高度，防止删除时布局跳动 */
        padding: 0 1rem;
        text-align: center;
    }
    
    .typing-text-container {
        font-size: 1.3rem;
    }
    
    .typing-cursor {
        font-size: 1.3rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
    
    .wechat-card {
        max-width: 100%;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}

