/* Docsify 主题和布局样式 */
:root {
    --theme-color: #3f51b5;
    --sidebar-nav-spacing: 8px 15px;
}
.sidebar-nav > ul > li > a {
    font-weight: bold;
    font-size: 15px;
}
.search-input {
    border-radius: 5px !important;
}
/* 将侧边栏切换按钮改成查看导航文字 */
.sidebar-toggle {
    font-size: 14px !important;
    color: #666 !important;
    padding: 6px 12px !important;
    background: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}
.sidebar-toggle:hover {
    background: #e0e0e0 !important;
}
.sidebar-toggle::before {
    content: '查看导航' !important;
    font-family: inherit !important;
    font-style: normal !important;
    font-weight: normal !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    line-height: 1.5 !important;
}
section.cover {
    background: linear-gradient(135deg, #ffb6c1 0%, #ffdab9 100%);
}
section.cover .cover-main {
    color: #333;
    text-align: center;
}
section.cover h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}
section.cover p {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.8;
    margin: 0.5rem 0;
}
section.cover .cover-main p:last-of-type a {
    background-color: #42b983 !important;
    color: white !important;
    border: 2px solid #42b983 !important;
    padding: 14px 40px !important;
    border-radius: 30px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(66, 185, 131, 0.4) !important;
    cursor: pointer !important;
}
section.cover .cover-main p:last-of-type a:hover {
    background-color: #379a6b !important;
    border-color: #379a6b !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(66, 185, 131, 0.5) !important;
}
.cover-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.gallery {
    margin: 20px 0;
    padding: 0;
    background: none;
    border-radius: 0;
}
.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 720px;
}
.gallery-item {
    aspect-ratio: 1;
}
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    border: 2px solid #e0e0e0;
}
.gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 产品卡片样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    max-width: 100%;
}
.product-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 15px;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.35);
}
.product-image {
    width: 140px;
    height: 150px;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 8px;
    flex-shrink: 0;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-info {
    flex: 1;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 简单灯箱样式 */
.simple-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}
.simple-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}
.simple-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.1s ease-out;
}
.simple-lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}
.simple-lightbox-close:hover {
    color: #ccc;
}
.simple-lightbox-zoom-hint {
    position: absolute;
    top: -70px;
    left: 0;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.qrcode-container {
    margin-top: 40px;
    padding: 30px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}
.qrcode-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}
.qrcode {
    display: inline-block;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.qrcode:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.qrcode img {
    display: block;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .markdown-section {
        padding: 15px !important;
        margin: 0 auto !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        box-sizing: border-box !important;
        text-align: left !important;
        background: #fff !important;
        border-radius: 8px !important;
    }
    .content {
        padding: 0 !important;
        margin: 10px !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        float: none !important;
        position: static !important;
    }
    .sidebar-toggle {
        padding: 4px 8px !important;
        font-size: 12px !important;
    }
    table {
        font-size: 12px !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    table th, table td {
        padding: 6px 4px !important;
        word-break: break-word !important;
    }
    .gallery-item {
        flex: 1 1 calc(50% - 5px) !important;
        min-width: 100px !important;
    }
    .gallery-img {
        height: 120px !important;
    }
    /* 移动端产品卡片垂直布局 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .product-card {
        flex-direction: column !important;
        align-items: center !important;
        padding: 12px !important;
    }
    .product-image {
        width: 100% !important;
        height: 100px !important;
        max-width: 120px !important;
    }
    .product-info {
        padding-left: 0 !important;
        padding-top: 10px !important;
        text-align: center !important;
    }
    .product-name {
        font-size: 13px !important;
    }
    /* 确保主内容区域居中 */
    .main {
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
    .qrcode-container {
        margin-top: 40px !important;
        padding: 20px !important;
        text-align: center !important;
        border-top: 1px solid #e0e0e0 !important;
    }
    .qrcode-title {
        font-size: 14px !important;
        color: #666 !important;
        margin-bottom: 15px !important;
    }
    .qrcode {
        display: inline-block !important;
        padding: 10px !important;
        background: white !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
    }
    .qrcode img {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .markdown-section {
        padding: 12px !important;
        margin: 8px auto !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
    }
    .content {
        margin: 8px !important;
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
    }
    table {
        font-size: 11px !important;
    }
    .gallery-item {
        flex: 1 1 calc(50% - 5px) !important;
        min-width: 100px !important;
    }
    .gallery-img {
        height: 120px !important;
    }
    /* 确保主内容区域居中 */
    .main {
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
    .qrcode-container {
        margin-top: 40px !important;
        padding: 20px !important;
        text-align: center !important;
        border-top: 1px solid #e0e0e0 !important;
    }
    .qrcode-title {
        font-size: 14px !important;
        color: #666 !important;
        margin-bottom: 15px !important;
    }
    .qrcode {
        display: inline-block !important;
        padding: 10px !important;
        background: white !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
    }
    .qrcode img {
        display: block !important;
    }
}