/* 嗨码科技官网 - 公共样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary-color: #2c7be5;
    --primary-dark: #1a5dba;
    --secondary-color: #00d97e;
    --wechat-green: #07C160;
    --dark-color: #12263f;
    --light-color: #f9fbfd;
    --gray-color: #6e84a3;
    --light-gray: #edf2f9;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    color: var(--dark-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-color);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(44, 123, 229, 0.25);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text span:last-child {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 400;
}

.logo-image {
    height: 50px;
    margin-right: 15px;
    vertical-align: middle;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* Carousel */
.carousel-section {
    padding-top: 140px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #f5f9ff 0%, #edf2f9 100%);
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 30px;
}

.carousel-caption h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    max-width: 600px;
}

.carousel-btn {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.carousel-btn:hover {
    background-color: #00c571;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-color);
}

.carousel-nav:hover {
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* Home: advantages */
.advantages-section {
    background-color: white;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.advantage-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.advantage-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.advantage-icon {
    width: 70px;
    height: 70px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.advantage-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.advantage-card p {
    color: var(--gray-color);
}

/* Home: process */
.process-section {
    background-color: var(--light-gray);
}

.process-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    position: relative;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 3px;
    background-color: var(--primary-color);
    z-index: 1;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 15px;
}

.process-step .step-number {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 25px;
    border: 8px solid var(--light-gray);
}

.process-step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.process-step p {
    color: var(--gray-color);
}

/* Contact */
.contact-section {
    background-color: white;
}

.contact-info {
    background-color: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 800px;
    margin: 50px auto 0;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark-color);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    background-color: var(--light-gray);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--gray-color);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 30px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    width: 100%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.copyright a {
    color: rgba(255, 255, 255, 0.6);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: var(--gray-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-body h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.5rem;
}

.wechat-qr {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    display: block;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
}

.modal-body p {
    color: var(--gray-color);
    font-size: 1rem;
}

/* Detail pages */
.back-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
    margin-top: 20px;
}

.back-btn i {
    margin-right: 8px;
}

.back-btn:hover {
    color: var(--primary-dark);
}

.detail-section {
    padding: 120px 0 40px;
}

.detail-header {
    text-align: center;
    margin-bottom: 40px;
}

.detail-header h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.detail-header p {
    font-size: 1.2rem;
    color: var(--gray-color);
    max-width: 800px;
    margin: 0 auto;
}

.platform-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    background-color: var(--light-gray);
    color: var(--dark-color);
}

.platform-tag.wechat {
    background-color: rgba(7, 193, 96, 0.12);
    color: #059669;
}

.platform-tag.douyin {
    background-color: rgba(44, 123, 229, 0.12);
    color: var(--primary-dark);
}

.platform-tag.vivo {
    background-color: rgba(65, 85, 255, 0.12);
    color: #4155ff;
}

.platform-tag.oppo {
    background-color: rgba(0, 180, 100, 0.12);
    color: #008a4e;
}

.platform-tag.hongguo {
    background-color: rgba(255, 77, 79, 0.12);
    color: #d4380d;
}

.content-block {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    border-left: 4px solid var(--primary-color);
}

.content-block h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.content-block h2 i {
    margin-right: 15px;
    color: var(--primary-color);
}

.content-block > p {
    margin-bottom: 20px;
    color: var(--gray-color);
}

.step-container {
    margin: 30px 0 0;
}

.step-item {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--light-gray);
}

.step-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-item .step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
    border: none;
    font-size: 1rem;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.step-content p {
    color: var(--gray-color);
}

.strategy-grid,
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.strategy-card,
.feature-item {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 25px;
    transition: var(--transition);
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.strategy-card:hover,
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.strategy-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.strategy-card h3 i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.strategy-card p {
    color: var(--gray-color);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.feature-item p {
    color: var(--gray-color);
}

.cta-block {
    text-align: center;
    border-left-color: var(--secondary-color);
}

.cta-block h2 {
    justify-content: center;
}

.game-library-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
    border-radius: var(--border-radius);
}

.tool-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.tool-link-card {
    color: white;
    text-align: center;
    padding: 48px 24px;
    border-radius: var(--border-radius);
}

.tool-link-card.game-library-section {
    margin-bottom: 0;
    padding: 48px 24px;
}

.tool-link-card.ecpm-section {
    background: linear-gradient(135deg, #00b37a, #008f62);
}

.tool-link-card h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: white;
}

.tool-link-card p {
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.game-library-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: white;
}

.game-library-section p {
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.library-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background-color: white;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: var(--transition);
}

.ecpm-section .library-btn {
    color: #008f62;
}

.library-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Case gallery */
.cases-section {
    background-color: white;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.case-grid--single-row {
    grid-template-columns: repeat(4, 1fr);
}

.case-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.case-card-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background-color: var(--light-gray);
}

.case-card-body {
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.case-card-body h3 {
    font-size: 1.15rem;
    color: var(--dark-color);
    margin: 0;
}

.case-card-tip {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-card-tip i {
    color: var(--primary-color);
}

.case-card-badge {
    margin: 0;
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cases-more {
    text-align: center;
    margin-top: 36px;
}

.platform-tag.douyin-primary {
    background-color: rgba(44, 123, 229, 0.18);
    color: var(--primary-dark);
    box-shadow: 0 0 0 2px rgba(44, 123, 229, 0.25);
}

/* Responsive */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .carousel-image {
        height: 400px;
    }

    .process-steps {
        flex-direction: column;
        gap: 40px;
    }

    .process-steps::before {
        display: none;
    }

    .detail-header h1 {
        font-size: 2.4rem;
    }

    .content-block {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul li {
        margin: 15px 0;
    }

    .carousel-section {
        padding-top: 120px;
    }

    .carousel-image {
        height: 350px;
    }

    .carousel-caption {
        padding: 20px;
    }

    .carousel-caption h3 {
        font-size: 1.6rem;
    }

    .carousel-caption p {
        font-size: 1rem;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .detail-section {
        padding-top: 100px;
    }

    .detail-header h1 {
        font-size: 2rem;
    }

    .detail-header p {
        font-size: 1.1rem;
    }

    .content-block h2 {
        font-size: 1.6rem;
    }

    .case-grid--single-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }

    .carousel-image {
        height: 300px;
    }

    .carousel-caption h3 {
        font-size: 1.4rem;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding: 30px 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .detail-header h1 {
        font-size: 1.8rem;
    }

    .content-block {
        padding: 25px 20px;
    }

    .strategy-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .step-item {
        flex-direction: column;
    }

    .step-item .step-number {
        margin-bottom: 15px;
    }

    .case-grid {
        grid-template-columns: 1fr;
    }

    .case-grid--single-row {
        grid-template-columns: 1fr;
    }
}
