/* ========== 全局变量 ========== */
:root {
    --primary-gradient: linear-gradient(145deg, #0a0f1c 0%, #12182a 100%);
    --nav-bg: rgba(8, 12, 22, 0.92);
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-color: #f0f3fa;
    --accent-color: #2ecc71;
    --demo-color: #f39c12;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.5);
    --gold-glow: 0 0 12px rgba(255, 215, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--primary-gradient);
    color: var(--text-color);
    min-height: 100vh;
    font-family: 'Segoe UI', 'Poppins', 'Arial', sans-serif;
    padding-top: 78px;
    line-height: 1.6;
    position: relative;
}

.bg-decoration {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 15% 30%, rgba(120, 100, 200, 0.2) 0%, transparent 45%),
                radial-gradient(circle at 85% 70%, rgba(220, 100, 130, 0.15) 0%, transparent 50%),
                repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 8px);
    z-index: -1; pointer-events: none;
}

/* ========== 导航栏 ========== */
.top-navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: var(--nav-bg); backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    z-index: 1000; padding: 6px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}
.top-navbar.navbar-hidden { transform: translateY(-100%); }
.top-navbar.navbar-visible { transform: translateY(0); }
.top-navbar .container {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: nowrap; gap: 20px;
}
.navbar-brand {
    display: flex; align-items: center; flex-shrink: 0; text-decoration: none;
}
.brand-icon {
    background: #ffd966; width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-right: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.brand-icon i { font-size: 28px; color: #0a0f1c; }
.brand-text {
    color: #ffd966; font-weight: 700; font-size: 1.35rem; letter-spacing: 1px;
}

.top-navbar .navbar-nav {
    display: flex; flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem; margin: 0; padding: 4px 0; list-style: none;
    scrollbar-width: none; -ms-overflow-style: none;
}
@media (min-width: 993px) {
    .top-navbar .navbar-nav { overflow: visible !important; }
}
.top-navbar .navbar-nav::-webkit-scrollbar { display: none; }
.nav-item {
    position: relative; flex-shrink: 0; list-style: none;
}
.parent-link {
    display: flex; align-items: center; gap: 8px; padding: 10px 20px;
    color: #f8fafc; font-size: 1rem; font-weight: 600;
    text-decoration: none; transition: all 0.25s; border-radius: 40px;
    background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(4px);
    white-space: nowrap; cursor: pointer;
}
.parent-link i { font-size: 12px; transition: transform 0.25s; }
.parent-link:hover {
    background: rgba(255, 215, 0, 0.2); color: #ffecb3; box-shadow: var(--gold-glow);
}
.nav-item.dropdown-open .parent-link i { transform: rotate(180deg); }

.submenu {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px;
    background: rgba(12, 18, 30, 0.98); backdrop-filter: blur(20px);
    border-radius: 20px; padding: 10px 0; margin: 0; list-style: none;
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: all 0.2s ease; box-shadow: 0 20px 35px -10px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,215,0,0.3); z-index: 1060;
}
.nav-item.dropdown-open .submenu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu .nav-link {
    display: block; padding: 10px 24px; color: #e2e8f0;
    font-size: 0.9rem; font-weight: 500; transition: 0.2s;
    text-decoration: none; white-space: nowrap;
}
.submenu .nav-link:hover {
    background: rgba(255, 215, 0, 0.2); color: #ffec80; padding-left: 32px;
}
.submenu .nav-link.active {
    background: linear-gradient(90deg, #ffd96630, transparent);
    color: #ffd966; border-left: 3px solid #ffd966;
}

@media (max-width: 992px) {
    body { padding-top: 100px; }
    .top-navbar .container { flex-direction: column; align-items: stretch; gap: 8px; }
    .navbar-brand { justify-content: center; }
    .top-navbar .navbar-nav {
        width: 100%; overflow-x: auto; overflow-y: visible;
        padding-bottom: 6px;
    }
    .submenu {
        position: static; width: 100%; background: rgba(20, 28, 45, 0.98);
        margin-top: 8px; border-radius: 16px; display: none;
        opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none;
    }
    .nav-item.dropdown-open .submenu { display: block !important; }
    .submenu .nav-link { white-space: normal; padding: 10px 20px 10px 36px; }
}

/* 广告区 */
.ad-container { margin: 30px 0; }
.text-ad-container {
    background: var(--text-ad-bg); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,215,0,0.3); border-radius: 60px;
    padding: 8px 40px 8px 20px; position: relative; overflow: hidden;
    margin-top: 12px;
}
.text-ad-content {
    display: flex; gap: 35px; animation: scrollText 28s linear infinite;
    white-space: nowrap;
}
.text-ad-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.ad-icon { color: #f1c40f; }
.text-ad-close {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.2); border: none; border-radius: 50%;
    width: 24px; height: 24px; cursor: pointer; color: white;
}
@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 主要内容区 */
.site-section { padding: 60px 0; }
.section-heading { margin-bottom: 40px; text-align: center; }
.section-heading h1 {
    font-size: 2.8rem; font-weight: 800;
    background: linear-gradient(135deg, #fff, #ffd966);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { font-size: 1.2rem; opacity: 0.85; }

#gallery-loading {
    text-align: center; padding: 60px 20px; color: #ffd966; font-size: 1.2rem;
}
#gallery-loading i { margin-right: 8px; }

.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.gallery-item {
    background: var(--card-bg); backdrop-filter: blur(8px);
    border-radius: 24px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.gallery-item:hover { transform: translateY(-8px); box-shadow: var(--shadow-heavy); }
.gallery-item a { display: block; position: relative; text-decoration: none; }
.gallery-item img { width: 100%; height: auto; display: block; background: #1a2235; }
.status-badge {
    position: absolute; top: 14px; right: 14px; background: #2ecc71; color: white;
    padding: 4px 12px; border-radius: 40px; font-size: 0.75rem; font-weight: bold; z-index: 2;
}
.status-badge.demo { background: #f39c12; }
.view-button {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); color: #ffd966;
    padding: 8px 22px; border-radius: 40px; font-weight: bold;
    opacity: 0; transition: 0.25s; display: flex; align-items: center; gap: 8px;
    border: 1px solid rgba(255,215,0,0.5);
}
.gallery-item:hover .view-button { opacity: 1; bottom: 30px; }
.image-title { padding: 15px; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); }
.image-title h3, .image-title h4 { margin: 0; font-size: 1.1rem; }

.scroll-to-top-btn {
    position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px;
    background: #ffd966cc; backdrop-filter: blur(8px); border: none; border-radius: 30px;
    color: #0a0f1c; cursor: pointer; opacity: 0; visibility: hidden; transition: 0.2s;
    z-index: 999; font-size: 1.2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.scroll-to-top-btn.show { opacity: 1; visibility: visible; }
.scroll-to-top-btn:hover { background: #ffd966; transform: scale(1.05); }
.site-footer {
    text-align: center; padding: 30px 0; background: rgba(0,0,0,0.3);
    margin-top: 60px; border-top: 1px solid rgba(255,215,0,0.2);
}
.site-footer a { color: #ffd966; text-decoration: none; }

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .view-button { opacity: 1; bottom: 20px; }
    .section-heading h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .text-ad-content { animation: none; }
    * { transition-duration: 0.01ms; }
}

/* ========== 在线客服样式 ========== */
.customer-service {
    position: fixed;
    bottom: 120px;
    right: 30px;
    z-index: 1000;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.customer-service-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a2a6c 0%, #2c3e50 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 3px solid #fff;
}

.customer-service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #2c3e50 0%, #1a2a6c 100%);
}

.customer-service-btn i {
    font-size: 28px;
    color: #fff;
}

.customer-service-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    display: none;
    border: 1px solid #eaeaea;
    animation: slideUp 0.3s ease;
}

.customer-service-panel.active {
    display: block;
}

.customer-service-panel:before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
}

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

.panel-header h3 {
    margin: 0;
    color: #1a2a6c;
    font-size: 18px;
    font-weight: 600;
}

.close-panel {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    line-height: 1;
}

.close-panel:hover {
    color: #1a2a6c;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-method {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.contact-method:hover {
    background: #1a2a6c;
    color: #fff;
    transform: translateX(-5px);
    border-color: #1a2a6c;
}

.contact-method:hover .method-icon {
    background: #fff;
    color: #1a2a6c;
}

.contact-method:hover .method-text h4 {
    color: #fff;
}

.contact-method:hover .method-text p {
    color: rgba(255, 255, 255, 0.9);
}

.method-icon {
    width: 45px;
    height: 45px;
    background: #1a2a6c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.method-icon i {
    font-size: 20px;
    color: #fff;
}

.method-text {
    flex: 1;
}

.method-text h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
}

.method-text p {
    margin: 0;
    font-size: 12px;
    color: #666;
    transition: color 0.3s ease;
}

.contact-hours {
    margin-top: 15px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 8px;
    text-align: center;
}

.contact-hours p {
    margin: 0;
    font-size: 12px;
    color: #1a2a6c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .customer-service {
        bottom: 100px;
        right: 20px;
    }
    
    .customer-service-btn {
        width: 50px;
        height: 50px;
    }
    
    .customer-service-btn i {
        font-size: 24px;
    }
    
    .customer-service-panel {
        width: 260px;
        right: -20px;
    }
    
    .customer-service-panel:before {
        right: 30px;
    }
}

@media (max-width: 480px) {
    .customer-service {
        bottom: 90px;
        right: 15px;
    }
    
    .customer-service-panel {
        width: 240px;
        right: -30px;
    }
}