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

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    padding-top: 70px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 0;
}

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

.nav-logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-logo a:hover {
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 移动端导航 */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
        gap: 0;
    }

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

    .nav-item {
        margin: 10px 0;
    }
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 500px;
    position: relative;
}

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

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 30px;
    text-align: center;
}

.carousel-caption h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 18px;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: background-color 0.3s;
    z-index: 10;
}

.carousel-controls:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--white);
}

/* 内容区域 */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
}

/* 卡片样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.card p {
    color: #666;
    line-height: 1.8;
}

/* 留言板样式 */
.message-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

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

.btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-block {
    width: 100%;
}

/* 留言列表 */
.message-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.message-item {
    background: var(--white);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.message-author {
    font-weight: bold;
    color: var(--primary-color);
}

.message-date {
    color: #999;
    font-size: 14px;
}

.message-content {
    color: #666;
    line-height: 1.8;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: var(--white);
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-slide {
        height: 300px;
    }

    .carousel-caption h2 {
        font-size: 24px;
    }

    .carousel-caption p {
        font-size: 14px;
    }

    .section-title {
        font-size: 28px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .message-form {
        padding: 20px;
    }
}

/* 合作商页面样式 */
.partner-link {
    display: inline-block;
    position: relative;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.partner-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.partner-logo {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: opacity 0.3s;
}

.partner-link:hover .partner-logo {
    opacity: 0.9;
}

.partner-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 144, 226, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 10px;
}

.partner-link-overlay span {
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.partner-link:hover .partner-link-overlay {
    opacity: 1;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    background-color: #000;
}

.partner-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: opacity 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--video-poster);
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.2);
    z-index: 0;
}

.video-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
}

.video-overlay-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 20px;
}

.video-overlay-text {
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.video-overlay-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.video-overlay-subtitle {
    font-size: 16px;
    opacity: 0.85;
}

.video-play-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-play-button::before {
    content: '';
    position: absolute;
    left: 34px;
    width: 0;
    height: 0;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 18px solid var(--primary-color);
}

.video-play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.video-play-button:focus {
    outline: 3px solid rgba(74, 144, 226, 0.6);
    outline-offset: 4px;
}

/* 响应式设计 - 合作商页面 */
@media (max-width: 768px) {
    .partner-logo {
        max-width: 100%;
    }
    
    .partner-link-overlay span {
        font-size: 16px;
    }

    .video-overlay-title {
        font-size: 22px;
    }

    .video-overlay-subtitle {
        font-size: 14px;
    }

    .video-play-button {
        width: 64px;
        height: 64px;
    }

    .video-play-button::before {
        left: 27px;
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 16px solid var(--primary-color);
    }
}

