/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.nav-logo h1 {
    color: #e74c3c;
    font-size: 1.8rem;
    font-weight: 600;
}

.nav-logo h1 a {
    text-decoration: none;
    color: inherit;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #e74c3c;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e74c3c;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄区域 */
.hero {
    height: 45vh;
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.6s both;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.hero-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(231, 76, 60, 0.4);
}

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

/* 分类展示区域 */
.categories {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 2px;
}

.category-section {
    margin-bottom: 5rem;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
}

.category-header h3 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.category-header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.item-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.item-image {
    width: 100%;
    height: 0;
    padding-bottom: 177.78%; /* 9:16 比例 (16/9 = 1.7778) */
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    position: relative;
    overflow: hidden;
}

.item-image img,
.item-image video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* 视频预览卡片样式 */
.item-card.video .item-image {
    position: relative;
    background: #000;
}

.item-card.video:hover .video-overlay {
    opacity: 1;
    border-left-color: rgba(255, 255, 255, 1);
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 12px solid rgba(255, 255, 255, 0.8);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.item-card:hover .item-image img {
    transform: scale(1.1);
}

.item-content {
    padding: 0.8rem;
}

.item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.item-description {
    color: #7f8c8d;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.3;
}

.item-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e74c3c;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 查看更多按钮 */
.view-more-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2rem;
}

.view-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* 页脚样式 */
.footer {
    position: relative;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    overflow: hidden;
}

.footer-wave {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
    color: #f8f9fa;
}

.footer-content {
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brand-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #ecf0f1;
    font-weight: 600;
}

.brand-logo p {
    color: #bdc3c7;
    font-size: 1rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #ecf0f1;
    font-weight: 600;
    position: relative;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #e74c3c;
    border-radius: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
}

.footer-links a:hover {
    color: #e74c3c;
    transform: translateX(5px);
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #bdc3c7;
    font-size: 0.95rem;
}

.contact-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    margin-top: 2rem;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin-bottom: 1.5rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-slogan {
    font-style: italic;
    color: #95a5a6;
}

/* 语言选择器样式 */
.language-selector {
    margin-left: 1rem;
    position: relative;
}

.language-dropdown {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 25px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #2c3e50;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 80px;
}

.language-btn:hover {
    border-color: #e74c3c;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.2);
}

.globe-icon {
    font-size: 1rem;
}

.current-lang {
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.language-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.language-option:hover {
    background: #f8f9fa;
}

.language-option:first-child {
    border-radius: 8px 8px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 8px 8px;
}

.language-option .flag {
    font-size: 1rem;
}

/* 移动端菜单样式 */
.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    z-index: 999;
}

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

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

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

.no-items, .error-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #7f8c8d;
    font-size: 1.1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.error-message {
    color: #e74c3c;
}

/* 中等屏幕响应式设计 */
@media (max-width: 1400px) {
    .items-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 1200px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 992px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
}

@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* 小屏幕响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
        order: 3;
    }

    .nav-logo {
        order: 1;
    }

    .language-selector {
        margin-left: auto;
        margin-top: 0;
        order: 2;
    }

    .language-btn {
        width: auto;
        justify-content: center;
        min-width: 60px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .hero {
        height: 50vh;
        min-height: 350px;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .category-header h3 {
        font-size: 1.8rem;
    }

    .item-content {
        padding: 0.6rem;
    }

    .item-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
        margin-bottom: 0.2rem;
    }

    .item-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        margin-bottom: 0.4rem;
    }

    .item-price {
        font-size: 0.85rem;
    }

    /* 移动端视频样式 - 与分类页面保持一致 */
    .item-image img,
    .item-image video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* 微信模态框样式 */
.wechat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wechat-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.wechat-modal-header h3 {
    margin: 0;
    color: #07C160;
    font-size: 1.3rem;
}

.wechat-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.wechat-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.wechat-modal-body {
    padding: 25px;
    text-align: center;
}

.wechat-id {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #07C160;
}

.wechat-id strong {
    font-size: 1.2rem;
    color: #07C160;
    font-family: monospace;
}

.copy-btn {
    background: #07C160;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #06AD56;
}

.wechat-tip {
    color: #666;
    margin: 20px 0 15px;
    font-size: 0.95rem;
}

/* 二维码容器样式 */
.qr-code-container {
    margin: 20px 0;
    text-align: center;
}

.qr-code-image {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
}

.qr-fallback {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px 20px;
    color: #666;
}

.qr-fallback p {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.qr-fallback small {
    font-size: 0.85rem;
    color: #aaa;
}
