/* 
 * IMG团队官网主样式
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a3a5c;
    --secondary-color: #5a9fd4;
    --text-dark: #1a3a5c;
    --text-light: #666;
    --bg-gradient: linear-gradient(135deg, #e8eef5 0%, #d4e5ed 50%, #c5dce8 100%);
    --white: #fff;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-gradient);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* 头部导航 */
.header {
    background: linear-gradient(180deg, #4a6b7c 0%, #5a7a8c 100%);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #5a9fd4;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.nav {
    display: flex;
    gap: 60px;
}

.nav a {
    color: var(--white);
    font-size: 18px;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 8px 0;
}

.nav a:hover {
    opacity: 0.8;
}

.nav a.active {
    border-bottom: 2px solid var(--white);
}

.search-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: rgba(255,255,255,0.3);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--white);
}

/* 主体内容 */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
}

/* 首页Hero区域 */
.hero {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-gradient);
    position: relative;
}

.hero-slogan {
    font-size: 72px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: 10px;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-light);
}

/* 焦点图轮播 */
.focus-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    margin: 40px 0;
}

.focus-slider .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.focus-slider .slide.active {
    opacity: 1;
}

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

.focus-slider .slide-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white);
    font-size: 24px;
}

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

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

.slider-dots .dot.active {
    background: var(--white);
}

/* 新闻列表 */
.news-section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 40px;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.news-card .cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .info {
    padding: 20px;
}

.news-card .title {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .date {
    font-size: 14px;
    color: var(--text-light);
}

/* 直播页 */
.live-section {
    padding: 40px 0;
}

.live-player {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.live-player video {
    width: 100%;
    height: 100%;
}

.live-title {
    text-align: center;
    font-size: 28px;
    margin: 30px 0;
    color: var(--text-dark);
}

.live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ff4444;
    color: var(--white);
    border-radius: 20px;
    font-size: 14px;
}

.live-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-offline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 24px;
}

/* 往期节目 */
.archive-section {
    padding: 60px 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.video-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-3px);
}

.video-card .thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.video-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card .duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-card .title {
    padding: 15px;
    font-size: 14px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 关于我们 */
.about-section {
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

.about-section h1 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.about-content {
    font-size: 16px;
    line-height: 2;
    color: var(--text-light);
}

/* 搜索页 */
.search-section {
    padding: 60px 0;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--secondary-color);
}

.search-box button {
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--secondary-color);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    border-radius: 5px;
    background: var(--white);
    color: var(--text-dark);
    transition: all 0.3s;
}

.pagination a:hover, .pagination span.current {
    background: var(--primary-color);
    color: var(--white);
}

/* 页脚 */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    opacity: 0.8;
    font-size: 14px;
}

/* 文创商店样式 */
.shop-section {
    padding: 60px 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-top: -30px;
    margin-bottom: 40px;
}

.category-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-filter .filter-item {
    padding: 10px 25px;
    background: var(--white);
    border-radius: 25px;
    color: var(--text-dark);
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-filter .filter-item:hover,
.category-filter .filter-item.active {
    background: var(--primary-color);
    color: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-card .product-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-card .product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-cover img {
    transform: scale(1.05);
}

.product-card .no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8eef5, #d4e5ed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-card .discount-badge,
.product-card .soldout-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.product-card .discount-badge {
    background: #ff6b6b;
    color: var(--white);
}

.product-card .soldout-badge {
    background: rgba(0,0,0,0.6);
    color: var(--white);
}

.product-card .product-info {
    padding: 20px;
}

.product-card .product-name {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.product-card .product-price .price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

.product-card .product-price .original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.product-card .product-sales {
    font-size: 13px;
    color: var(--text-light);
}

/* 产品详情页 */
.product-detail-section {
    padding: 60px 0;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.product-gallery .main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery .thumbnail-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.product-gallery .thumbnail {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.product-gallery .thumbnail:hover,
.product-gallery .thumbnail.active {
    border-color: var(--secondary-color);
}

.product-detail .product-info .product-title {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.product-detail .product-info .product-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.product-detail .product-info .current-price {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
}

.product-detail .product-info .original-price {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.product-detail .product-info .discount {
    padding: 4px 12px;
    background: #ff6b6b;
    color: var(--white);
    border-radius: 15px;
    font-size: 14px;
}

.product-detail .product-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.product-detail .meta-item .label {
    color: var(--text-light);
    margin-right: 8px;
}

.product-detail .meta-item .value {
    color: var(--text-dark);
    font-weight: 500;
}

.product-detail .product-desc {
    margin-bottom: 30px;
}

.product-detail .product-desc h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.product-detail .product-desc .desc-content {
    color: var(--text-light);
    line-height: 1.8;
}

.product-detail .product-actions {
    display: flex;
    gap: 15px;
}

.product-detail .btn-buy {
    padding: 15px 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-detail .btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(90, 159, 212, 0.4);
}

.product-detail .btn-soldout {
    padding: 15px 50px;
    background: #ccc;
    color: #666;
    border-radius: 30px;
    font-size: 16px;
    cursor: not-allowed;
}

.product-detail .btn-back {
    padding: 15px 30px;
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid #eee;
    border-radius: 30px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.product-detail .btn-back:hover {
    border-color: var(--secondary-color);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.empty-state p {
    font-size: 18px;
}

/* 支付弹窗样式 */
.pay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.pay-modal-content {
    background: var(--white);
    border-radius: 15px;
    width: 450px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

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

.pay-modal-header h3 {
    font-size: 18px;
    color: var(--text-dark);
}

.close-modal {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-dark);
}

.pay-modal-body {
    padding: 20px;
}

.order-product {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.order-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.order-product-info h4 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.order-product-info .order-price {
    font-size: 18px;
    color: #e74c3c;
    font-weight: bold;
}

.order-form .form-item {
    margin-bottom: 20px;
}

.order-form .form-item label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-selector button:first-child {
    border-radius: 6px 0 0 6px;
}

.quantity-selector button:last-child {
    border-radius: 0 6px 6px 0;
}

.quantity-selector button:hover {
    background: #eee;
}

.quantity-selector input {
    width: 60px;
    height: 36px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 16px;
}

.pay-methods {
    display: flex;
    gap: 15px;
}

.pay-method {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.pay-method input {
    display: none;
}

.pay-method.active {
    border-color: var(--secondary-color);
    background: rgba(90, 159, 212, 0.05);
}

.pay-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.alipay-icon {
    background: linear-gradient(135deg, #1677ff, #00b4ff);
}

.wxpay-icon {
    background: linear-gradient(135deg, #07c160, #00e070);
}

.pay-method span:last-child {
    font-size: 14px;
    color: var(--text-dark);
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.order-total .total-price {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.pay-modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.pay-modal-footer button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: #f0f0f0;
    color: var(--text-dark);
}

.btn-cancel:hover {
    background: #e0e0e0;
}

.btn-confirm {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 159, 212, 0.3);
}

/* 响应式 */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav {
        gap: 30px;
    }
    .nav a {
        font-size: 16px;
    }
    .hero-slogan {
        font-size: 48px;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-detail {
        padding: 25px;
    }
    .product-detail .product-info .product-title {
        font-size: 22px;
    }
    .product-detail .product-info .current-price {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .nav {
        gap: 20px;
    }
    .nav a {
        font-size: 14px;
    }
    .hero-slogan {
        font-size: 36px;
        letter-spacing: 5px;
    }
    .video-grid {
        grid-template-columns: 1fr;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .category-filter {
        gap: 10px;
    }
    .category-filter .filter-item {
        padding: 8px 18px;
        font-size: 14px;
    }
    .product-detail .product-actions {
        flex-direction: column;
    }
    .product-detail .btn-buy,
    .product-detail .btn-soldout,
    .product-detail .btn-back {
        text-align: center;
    }
}
