/* 智步照明产品安装指导中心 - 精简版样式 */

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

:root {
    --primary: #0071e3;
    --primary-dark: #005bb5;
    --secondary: #5e5ce6;
    --dark: #1d1d1f;
    --gray: #86868b;
    --gray-light: #f5f5f7;
    --gray-border: #e8e8ed;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--gray-light);
    color: var(--dark);
    line-height: 1.6;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
}

.logo-sub {
    font-size: 12px;
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    opacity: 0.8;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: rgba(26,26,46,0.98);
    padding: 16px;
}

.mobile-menu a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

/* 侧边栏 */
.sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-border);
}

.sidebar-title {
    font-size: 15px;
    font-weight: 700;
}

.category {
    margin-bottom: 8px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--gray-light);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.category-header:hover {
    background: var(--gray-border);
}

.category-header.active {
    background: var(--primary);
    color: var(--white);
}

.category-icon {
    font-size: 16px;
}

.category-name {
    flex: 1;
}

.category-toggle {
    font-size: 11px;
}

.video-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.video-list.expanded {
    max-height: 600px;
    margin-top: 8px;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.video-item:hover {
    background: var(--gray-light);
}

.video-item.active {
    background: rgba(0,113,227,0.08);
    color: var(--primary);
}

.video-item.coming-soon {
    opacity: 0.5;
    cursor: default;
}

.video-number {
    width: 22px;
    height: 22px;
    background: var(--gray-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.video-item.active .video-number {
    background: var(--primary);
    color: var(--white);
}

/* 内容区 */
.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 视频播放器 */
.video-player-wrapper {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-player-container {
    aspect-ratio: 16/9;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.play-icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.video-placeholder h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.video-placeholder p {
    opacity: 0.6;
    font-size: 14px;
}

/* 视频信息栏 */
.video-info-bar {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.video-badge {
    padding: 4px 12px;
    background: rgba(0,113,227,0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.video-title-small {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.video-meta-small {
    font-size: 13px;
    color: var(--gray);
}

/* 产品分类 */
.products-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 24px;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.product-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-card > p {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 12px;
}

.product-card ul {
    list-style: none;
}

.product-card li {
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-border);
    color: var(--dark);
}

.product-card li:last-child {
    border-bottom: none;
}

.product-card li::before {
    content: "✓ ";
    color: var(--success);
    font-weight: bold;
}

/* AI客服 */
.ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.ai-chat-button-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ai-chat-button {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,113,227,0.4);
    transition: var(--transition);
}

.ai-chat-button svg {
    width: 26px;
    height: 26px;
    color: var(--white);
}

.ai-chat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--white);
    padding: 3px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ai-chat-panel {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 360px;
    height: 450px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat-panel.active {
    display: flex;
}

.ai-chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-chat-info h4 {
    font-size: 15px;
    font-weight: 600;
}

.ai-chat-info p {
    font-size: 12px;
    opacity: 0.9;
}

.ai-chat-close {
    margin-left: auto;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
}

.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: var(--gray-light);
}

.ai-message {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.ai-message-content {
    background: var(--white);
    padding: 12px 16px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    max-width: calc(100% - 50px);
}

.user-message {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.user-message-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    font-size: 13px;
    max-width: 80%;
}

.ai-chat-input {
    display: flex;
    padding: 12px 16px;
    background: var(--white);
    border-top: 1px solid var(--gray-border);
    gap: 10px;
}

.ai-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-border);
    border-radius: 20px;
    font-size: 13px;
    outline: none;
}

.ai-chat-input button {
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
}

/* 响应式 */
@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 16px;
    }
    
    .ai-chat-panel {
        width: calc(100vw - 40px);
        right: -10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}
