/* software.css - 绿色系 + 独特下载按钮 */

/* 页面布局 */
.software-page .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* 主面板 */
.software-panel {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,128,0,0.08);
    border: 1px solid #dcfce7;
    padding: 1.5rem 1.8rem;
}

/* 头部区域 */
.software-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.8rem;
    border-bottom: 2px solid #eef2ff;
    padding-bottom: 1rem;
}

.software-header h2 {
    font-size: 1.7rem;
    font-weight: 600;
    background: linear-gradient(135deg, #14532d, #166534);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.software-header p {
    color: #475569;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* 视图切换按钮组 */
.view-switch {
    display: flex;
    gap: 0.5rem;
    background: #e6f7ec;
    border-radius: 999px;
    padding: 4px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #334155;
}

.view-btn.active {
    background: #2e7d32;
    color: white;
    box-shadow: 0 1px 4px rgba(46,125,50,0.3);
}

.view-btn:not(.active):hover {
    color: #2e7d32;
}

/* 搜索框 */
.search-box {
    position: relative;
    max-width: 360px;
    margin-bottom: 2rem;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #2e7d32;
}

#software-search {
    width: 100%;
    padding: 0.7rem 0.7rem 0.7rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    font-size: 0.9rem;
    background: #ffffff;
    transition: 0.2s;
}

#software-search:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.15);
}

/* 软件列表容器 */
.software-list {
    list-style: none;
    display: grid;
    gap: 1.25rem;
}

.software-list.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.software-list.list-view {
    grid-template-columns: 1fr;
}

/* 卡片样式 */
.software-card {
    background: #ffffff;
    border: 1px solid #eef2ff;
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.2s;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.software-card:hover {
    border-color: #86efac;
    box-shadow: 0 8px 20px rgba(34,197,94,0.12);
    transform: translateY(-2px);
}

.grid-view .software-card {
    flex-direction: column;
    text-align: center;
}

.list-view .software-card {
    flex-direction: row;
    text-align: left;
}

/* 图标区 */
.software-icon {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.grid-view .software-icon {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
}

/* 信息区 */
.software-info {
    flex: 1;
}

.software-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
}

.software-desc {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 0.25rem;
}

.list-view .software-desc {
    margin-top: 0;
}

/* 标签区（居中） */
.software-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.tag {
    background: #dcfce7;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #166534;
}

/* 独特下载按钮 */
.download-link {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(95deg, #059669, #10b981);
    color: white;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.25s ease;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 5px rgba(5,150,105,0.3);
    letter-spacing: 0.5px;
}

.download-link:hover {
    background: linear-gradient(95deg, #047857, #059669);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(5,150,105,0.4);
    color: #fef9c3;
}

.download-link:active {
    transform: translateY(0);
}

.list-view .download-link {
    align-self: flex-start;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #4b5563;
}

/* 响应式 */
@media (max-width: 640px) {
    .software-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .grid-view {
        grid-template-columns: 1fr;
    }
    .software-panel {
        padding: 1rem;
    }
}

html[data-theme="dark"] .software-page .container {
    background: #020202;
}

html[data-theme="dark"] .software-panel {
    background: #090909;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .software-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .software-header h2 {
    color: #f8fafc;
    background: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

html[data-theme="dark"] .software-header p {
    color: #9ca3af;
}

html[data-theme="dark"] .search-box {
    background: #111111;
}

html[data-theme="dark"] .search-icon {
    color: #81c995;
}

html[data-theme="dark"] #software-search {
    background: #121212;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] #software-search:focus {
    border-color: #81c995;
    box-shadow: 0 0 0 3px rgba(129, 201, 149, 0.15);
}

html[data-theme="dark"] .software-card {
    background: #111111;
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .software-card:hover {
    border-color: rgba(129, 201, 149, 0.35);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .view-switch {
    background: rgba(14, 43, 19, 0.7);
}

html[data-theme="dark"] .view-btn {
    color: #cbd5e1;
}

html[data-theme="dark"] .view-btn.active {
    background: #1f4d2b;
    color: #f8fafc;
    box-shadow: 0 1px 4px rgba(129, 201, 149, 0.25);
}

html[data-theme="dark"] .view-btn:not(.active):hover {
    color: #81c995;
}

html[data-theme="dark"] .software-icon {
    background: #0f172a;
}

html[data-theme="dark"] .software-name,
html[data-theme="dark"] .software-desc,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .empty-state {
    color: #cbd5e1;
}

html[data-theme="dark"] .tag {
    background: rgba(56, 189, 80, 0.16);
    color: #86efac;
}
