@charset "utf-8";

body {
    background-color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.breadcrumb {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
}
.breadcrumb > li + li:before {
    color: #cbd5e1;
    content: "/\00a0";
}
.breadcrumb a {
    color: #64748b;
    text-decoration: none;
}
.breadcrumb > .active {
    color: #334155;
}

.filter-panel {
    margin-bottom: 20px;
    border: none;
    box-shadow: none;
    border-radius: 4px;
    background: #fff;
}
.filter-panel .panel-body {
    padding: 20px;
}
.filter-group {
    margin-bottom: 15px;
    display: flex;
    align-items: baseline;
}
.filter-group:last-child {
    margin-bottom: 0;
}
.filter-label {
    color: #64748b;
    font-weight: 500;
    margin-right: 15px;
    min-width: 50px;
}
.filter-item {
    display: inline-block;
    padding: 5px 15px;
    color: #334155;
    border-radius: 20px;
    margin-right: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.filter-item:hover {
    color: #2563eb;
    background-color: #eff6ff;
    text-decoration: none;
}
.filter-item.active {
    background-color: #2563eb;
    color: #fff;
    text-decoration: none;
}

.soft-list-item {
    background: #fff;
    border: none;
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    transition: all 0.2s;
}
.soft-list-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}
.soft-list-img {
    width: 80px;
    height: 80px;
    margin-right: 25px;
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    padding: 5px;
}
.soft-list-img img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
}
.soft-list-info {
    flex-grow: 1;
    min-width: 0;
}
.soft-list-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
}
.soft-list-title a {
    color: #1e293b;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.soft-list-title a:hover {
    color: #2563eb;
}
.soft-list-version {
    flex-shrink: 0;
    background-color: #f1f5f9;
    color: #64748b;
    font-weight: normal;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
}
.soft-list-desc {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.soft-list-meta {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    gap: 20px;
}
.soft-list-meta span {
    display: flex;
    align-items: center;
}
.soft-list-meta i {
    margin-right: 6px;
    font-size: 14px;
}
.soft-list-action {
    margin-left: 30px;
    flex-shrink: 0;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.soft-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}
.btn-download-list {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 4px;
    font-size: 14px;
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-favorite-list {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-favorite-list i {
    pointer-events: none;
}
.btn-favorite i {
    pointer-events: none;
}
.btn-download-list:hover {
    background-color: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Pagination Customization */
.pagination > li > a, .pagination > li > span {
    color: #64748b;
    border-color: #e5e7eb;
    margin: 0 3px;
    border-radius: 4px;
}
.pagination > .active > a, 
.pagination > .active > span, 
.pagination > .active > a:hover, 
.pagination > .active > span:hover, 
.pagination > .active > a:focus, 
.pagination > .active > span:focus {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Software Detail Page Styles */
.soft-detail-header {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    background: #fff;
}
.soft-detail-header .panel-body {
    padding: 30px;
}
.soft-icon-wrapper {
    width: 120px;
    height: 120px;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.soft-icon-lg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
.soft-title-lg {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
}
.soft-title-lg small {
    font-size: 16px;
    color: #64748b;
    margin-left: 15px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: normal;
}
.soft-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
    margin-bottom: 25px;
    color: #475569;
}
.meta-item {
    font-size: 14px;
    display: flex;
    align-items: center;
}
.meta-item span {
    color: #4b5563;
    margin-right: 5px;
    font-weight: 500;
}
.meta-item i {
    width: 20px;
    text-align: center;
}
.soft-actions {
    display: flex;
    gap: 15px;
}
.btn-download-lg {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.soft-detail-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    background: #fff;
    margin-bottom: 20px;
}
.soft-detail-content .panel-heading {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 15px 25px;
}
.soft-detail-content .panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    border-left: 4px solid #2563eb;
    padding-left: 10px;
}
.soft-detail-content .panel-body {
    padding: 25px;
}
.article-content {
    color: #334155;
    line-height: 1.8;
    font-size: 15px;
}
.article-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #1e293b;
}
.article-content ul {
    padding-left: 20px;
    color: #475569;
}
.article-content li {
    margin-bottom: 8px;
}
.soft-screenshots {
    margin-top: 20px;
}

/* Modal Vertical Alignment */
#downloadModal {
    text-align: center;
    padding: 0!important;
}

#downloadModal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px;
}

#downloadModal .modal-dialog {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
    margin: 0;
}

/* Related Software Section */
.soft-related-wrapper {
    margin-top: 30px;
}

.related-header {
    margin-bottom: 20px;
}

.related-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    border-left: 4px solid #2563eb;
    padding-left: 10px;
}

/* Related Software Card Styles */
a.soft-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}

a.soft-card:hover {
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.soft-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 5px;
}

.soft-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.soft-card-content {
    text-align: center;
}

.soft-card-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #334155;
}

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.soft-card-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.btn-card-action {
    display: block;
    width: 100%;
    padding: 8px 0;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

a.soft-card:hover .btn-card-action {
    background: #2563eb;
    color: #fff;
}

/* Sidebar Essentials Styles */
.essentials-body {
    padding: 20px; /* Increase padding */
}

.soft-item {
    margin-bottom: 20px; /* Add space between rows */
}

.soft-item:nth-last-child(-n+3) {
    margin-bottom: 0; /* Remove bottom margin for last row */
}

.soft-link {
    display: block;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.soft-link:hover {
    color: #2563eb;
    text-decoration: none;
    transform: translateY(-2px);
}

.soft-mini-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.soft-mini-name {
    font-size: 13px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tutorial List Styles */
.tutorial-item {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    transition: all 0.2s;
}
.tutorial-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}
.tutorial-img {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 20px;
    border-radius: 4px;
    overflow: hidden;
}
.tutorial-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tutorial-info {
    flex: 1;
}
.tutorial-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}
.tutorial-title a {
    color: #333;
    text-decoration: none;
}
.tutorial-title a:hover {
    color: #18bc9c;
}
.tutorial-meta {
    color: #999;
    font-size: 13px;
}
.tutorial-meta span {
    margin-right: 15px;
}
.tutorial-desc {
    color: #666;
    margin-top: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 3. 软件详情页适配 */
@media (max-width: 768px) {
    .soft-detail-header .panel-body {
        padding: 20px;
    }

    .soft-detail-header .media {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .soft-detail-header .media-left,
    .soft-detail-header .media-body {
        display: block;
        width: 100%;
        padding: 0;
    }

    .soft-detail-header .media-left {
        margin-bottom: 20px;
    }

    .soft-icon-wrapper {
        margin: 0 auto;
        width: 100px;
        height: 100px;
    }

    .soft-title-lg {
        justify-content: center;
        flex-wrap: wrap;
        font-size: 20px;
        margin-top: 0;
    }

    .soft-title-lg small {
        margin-left: 8px;
        font-size: 13px;
    }

    .soft-meta-grid {
        justify-content: center;
        gap: 10px 15px;
        margin-bottom: 20px;
    }

    .soft-actions {
        flex-direction: column;
        width: 100%;
    }

    .soft-actions .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .soft-actions .btn:last-child {
        margin-bottom: 0;
    }
}

/* =========================================
   移动端响应式适配 (补充)
   ========================================= */
@media (max-width: 768px) {
    /* 1. 筛选面板适配 */
    .filter-panel .panel-body {
        padding: 15px;
    }
    
    .filter-group {
        display: block;
        margin-bottom: 15px;
    }
    
    .filter-label {
        display: block;
        margin-bottom: 8px;
        color: #334155;
        font-weight: 600;
    }
    
    .filter-items {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-item {
        margin-bottom: 0;
    }

    /* 2. 软件列表项适配 */
    .soft-list-item {
        flex-direction: column;
        padding: 15px;
        position: relative;
    }
    
    .soft-list-img {
        width: 60px;
        height: 60px;
        margin-right: 15px;
        margin-bottom: 10px;
        float: none;
    }
    
    .soft-list-info {
        width: 100%;
    }
    
    .soft-list-title {
        font-size: 16px;
        margin-bottom: 5px;
        flex-wrap: wrap;
    }
    
    .soft-list-version {
        font-size: 11px;
        padding: 1px 5px;
        margin-left: 5px;
    }
    
    .soft-list-desc {
        font-size: 13px;
        margin-bottom: 8px;
        height: auto;
        -webkit-line-clamp: 2;
    }
    
    .soft-list-meta {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
    }
    
    .soft-list-meta span {
        margin-right: 5px;
    }
    
    .soft-list-action {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        align-self: auto;
    }

    .soft-price-tags {
        margin-bottom: 0;
        text-align: left;
    }

    .soft-action-buttons {
        gap: 10px;
    }

    /* 3. 教程列表适配 */
    .tutorial-item {
        flex-direction: column;
        padding: 15px;
    }
    .tutorial-img {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 15px;
        max-height: 180px;
    }
    .tutorial-title {
        font-size: 16px;
    }
    .tutorial-meta {
        font-size: 12px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .tutorial-meta span {
        margin-right: 0;
    }
}

/* 截图滚动容器 */
.soft-screenshots-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.soft-screenshots-wrapper::-webkit-scrollbar {
    height: 6px;
}

.soft-screenshots-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.soft-screenshots-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.screenshot-item {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
}

.soft-screenshots-container:hover .scroll-btn {
    opacity: 1;
}

.scroll-left { left: 10px; }
.scroll-right { right: 10px; }
