/* 页面布局 */

/* 头部信息样式 */
.detail-header {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.software-details-basic {
    display: flex;
    gap: 2rem;
}

.software-details-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.software-details-icon {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.free-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50px 50px 0 0;
    border-color: var(--primary) transparent transparent transparent;
    border-top-left-radius: 16px;
}

.free-badge span {
    position: absolute;
    top: -40px;
    left: 6px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    transform: rotate(-45deg);
}

.software-details-info {
    flex: 1;
    min-width: 0;
}

.software-details-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.group-icon {
    width: 24px;
    height: 24px;
}

.software-details-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.software-details-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.software-details-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.software-details-tag {
    padding: 0.25rem 0.75rem;
    background: var(--gray-50);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background: var(--primary-dark);
}

/* 详情内容样式 */
.detail-content {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-bottom: 2rem;
}

.detail-section {
    margin-bottom: 2.5rem;
    overflow: visible;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

/* Markdown 内容样式 */
.software-details-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--gray-700);
    width: 100%;
}

.software-details-desc h1,
.software-details-desc h2,
.software-details-desc h3,
.software-details-desc h4,
.software-details-desc h5,
.software-details-desc h6 {
    margin: 1em 0 0.5em;
    color: var(--gray-900);
    font-weight: 600;
    line-height: 1.3;
}

.software-details-desc h1 { font-size: 1.5rem; }
.software-details-desc h2 { font-size: 1.25rem; }
.software-details-desc h3 { font-size: 1.125rem; }
.software-details-desc h4 { font-size: 1rem; }
.software-details-desc h5 { font-size: 0.875rem; }
.software-details-desc h6 { font-size: 0.875rem; }

.software-details-desc p {
    margin: 0.5em 0;
    white-space: pre-wrap !important;
    word-break: break-word;
}

.software-details-desc ul,
.software-details-desc ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.software-details-desc li {
    margin: 0.25em 0;
}

.software-details-desc code {
    background: var(--gray-50);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

.software-details-desc pre {
    background: var(--gray-50);
    padding: 1em;
    border-radius: 6px;
    margin: 1em 0;
    overflow-x: auto;
}

.software-details-desc pre code {
    background: none;
    padding: 0;
}

.software-details-desc blockquote {
    margin: 0.5em 0;
    padding: 0.25em 0.75em;
    border-left: 4px solid var(--gray-200);
    background: var(--gray-50);
}

.software-details-desc img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 6px;
    display: block;
}

.software-details-desc a {
    color: var(--primary);
    text-decoration: none;
}

.software-details-desc a:hover {
    text-decoration: underline;
}

.software-details-desc table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.software-details-desc th,
.software-details-desc td {
    border: 1px solid var(--gray-200);
    padding: 0.5em 0.75em;
    text-align: left;
}

.software-details-desc th {
    background: var(--gray-50);
    font-weight: 600;
}

.screenshot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.screenshot-item {
    position: relative;
    padding-top: 56.25%;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.screenshot-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .detail-header {
        padding: 1.5rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .software-details-basic {
        gap: 1.25rem;
    }

    .software-details-icon-wrapper {
        width: 80px;
        height: 80px;
    }

    .free-badge {
        border-width: 40px 40px 0 0;
    }

    .free-badge span {
        top: -32px;
        left: 4px;
        font-size: 0.65rem;
    }

    .software-details-title {
        font-size: 1.25rem;
    }

    .software-details-meta {
        gap: 1rem;
        font-size: 0.75rem;
    }

    .download-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .detail-content {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .section-title {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    .software-details-desc {
        font-size: 0.75rem;
        line-height: 1.4;
        letter-spacing: 0.2px;
        font-weight: 500;
    }

    .software-details-desc h1 { font-size: 1.25rem; }
    .software-details-desc h2 { font-size: 1.125rem; }
    .software-details-desc h3 { font-size: 1rem; }
    .software-details-desc h4 { font-size: 0.875rem; }
    .software-details-desc h5 { font-size: 0.875rem; }
    .software-details-desc h6 { font-size: 0.875rem; }

    .screenshot-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
}

/* 猜你喜欢基础样式 */
.guess-like {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px 0;
}

/* PC端显示 */
.guess-like-pc {
    display: block;
}

/* 移动端显示 */
.guess-like-mobile {
    display: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .guess-like-pc {
        display: none;
    }

    .guess-like-mobile {
        display: block;
    }
}

/* 其他猜你喜欢样式保持不变 */
.guess-like-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--gray-900);
    font-size: 15px;
    font-weight: 500;
}

.guess-like-header svg {
    color: #f43f5e;
}

.guess-like-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-behavior: smooth;
}

/* 美化滚动条 */
.guess-like-list::-webkit-scrollbar {
    height: 4px;
}

.guess-like-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 2px;
}

.guess-like-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

.guess-like-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* 修改推荐项目样式 */
.guess-item {
    flex: 0 0 280px;  /* 增加每项的宽度 */
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;  /* 改为flex布局 */
    gap: 12px;      /* 图片和文字之间的间距 */
    align-items: center;  /* 垂直居中对齐 */
}

.guess-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.guess-item-icon {
    width: 40px;   /* 调整图片尺寸 */
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;  /* 防止图片被压缩 */
}

.guess-item-info {
    flex: 1;        /* 文字信息占据剩余空间 */
    min-width: 0;   /* 防止文字溢出 */
}

.guess-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guess-item-desc {
    font-size: 12px;
    color: var(--gray-600);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .guess-item {
        flex: 0 0 240px;  /* 移动端稍微窄一点 */
        padding: 10px;
    }

    .guess-item-icon {
        width: 36px;
        height: 36px;
    }
}

