/* 基础样式 */
:root {
    --primary-red: #e60012;
    --dark-red: #cc0000;
    --pure-black: #000000;
    --off-white: #f5f5f5;
    --text-gray: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    background: var(--pure-black);
    color: var(--off-white);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 10px rgba(230, 0, 18, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--off-white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--primary-red);
}

/* 汉堡菜单样式 */
#menu-toggle {
    display: none;
}

.menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 2px 10px rgba(230, 0, 18, 0.2);
    }

    .nav-links li a {
        padding: 1rem;
        display: block;
        text-align: center;
    }

    #menu-toggle:checked ~ .nav-links {
        display: flex;
    }

    .rotating-card {
        width: 150px;
        height: 150px;
    }

    .slogan-text {
        font-size: 1.5rem;
    }
}

/* 各个区块的基础样式 */
section {
    padding: 6rem 2rem;
    background: var(--pure-black);
}

section h2 {
    color: var(--off-white);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-red);
}

/* 主要展示区域样式 */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('head.png') center/cover no-repeat;
    filter: brightness(0.7);
    z-index: 1;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* 旋转卡片动画 */
.card-container {
    perspective: 1000px;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.rotating-card {
    width: 180px;
    height: 330px;
    position: relative;
    margin: 0 auto;
    animation: cardEntrance 1.5s ease-out forwards,
               cardPulse 2s ease-in-out infinite 1.5s;
}

.rotating-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(230, 0, 18, 0.4);
}

/* 标语样式 */
.slogan-container {
    margin-top: 2rem;
}

.slogan-line {
    width: 100px;
    height: 3px;
    background: var(--primary-red);
    margin: 0 auto 1rem;
    animation: lineExtend 1s ease-out forwards 0.5s;
}

.slogan-text {
    font-size: 2rem;
    color: var(--off-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: textFadeIn 1s ease-out forwards 1s;
}

/* 服务卡片样式 */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(230, 0, 18, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-red);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* 动画定义 */
@keyframes cardEntrance {
    0% {
        transform: rotateY(720deg) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: rotateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes cardPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes lineExtend {
    0% { width: 0; }
    100% { width: 100px; }
}

@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计补充 */
@media screen and (max-width: 768px) {
    .menu-btn {
        display: flex;
    }

    .menu-btn span {
        background: var(--off-white);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 2px 10px rgba(230, 0, 18, 0.2);
    }

    .nav-links li a {
        padding: 1rem;
        display: block;
        text-align: center;
    }

    #menu-toggle:checked ~ .nav-links {
        display: flex;
    }

    .rotating-card {
        width: 120px;
        height: 220px;
    }

    .card-container {
        padding: 1rem 0;
    }

    .slogan-text {
        font-size: 1.5rem;
    }
}

/* AI产品展示区样式 */
.products {
    background: linear-gradient(to bottom, var(--pure-black), #1a1a1a);
    padding: 8rem 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(230, 0, 18, 0.1);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(230, 0, 18, 0.1),
        transparent
    );
    transition: 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(230, 0, 18, 0.2);
    border-color: var(--primary-red);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: linear-gradient(145deg, #1a1a1a, #000);
    padding: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    color: var(--off-white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-card p {
    color: #999;
    font-size: 1rem;
}

/* 数字信息区域样式 */
.digital-info {
    background: linear-gradient(to bottom, #1a1a1a, var(--pure-black));
    padding: 8rem 2rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(230, 0, 18, 0.1);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
}

.info-card .number {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--primary-red);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(230, 0, 18, 0.3);
}

.info-card .label {
    font-size: 1.2rem;
    color: var(--off-white);
}

/* 关于我们区域样式 */
.about {
    background: url('head.png') center/cover fixed;
    position: relative;
    padding: 8rem 2rem;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.about-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(230, 0, 18, 0.1);
}

.about-text p {
    color: var(--off-white);
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* 联系我们区域样式 */
.contact {
    background: linear-gradient(to bottom, var(--pure-black), #1a1a1a);
    padding: 8rem 2rem;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid rgba(230, 0, 18, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--off-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 10px rgba(230, 0, 18, 0.2);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    padding: 1rem 2rem;
    background: var(--primary-red);
    color: var(--off-white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
}

.contact-info {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(230, 0, 18, 0.1);
}

.contact-info p {
    color: var(--off-white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 页脚样式 */
footer {
    background: var(--pure-black);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(230, 0, 18, 0.1);
}

.footer-content p {
    color: #666;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .product-grid,
    .info-cards,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .about-text {
        padding: 2rem 1rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .info-card .number {
        font-size: 2.5rem;
    }

    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
}

/* 添加淡入动画类 */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
