/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部标题和搜索栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

.header h1 {
    font-size: 32px;
    color: #ffffff;
    font-weight: 600;
}

.search-container {
    display: flex;
    gap: 10px;
}

#search-input {
    padding: 12px 20px;
    width: 300px;
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 16px;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #555;
    background-color: #333;
}

#search-btn {
    padding: 12px 24px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#search-btn:hover {
    background-color: #444;
    border-color: #555;
}

/* 主内容区布局 */
.main-content {
    display: flex;
    gap: 30px;
    min-height: calc(100vh - 150px);
}

/* 左侧导航菜单 */
.sidebar {
    width: 200px;
    background-color: #222;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.sidebar ul {
    list-style: none;
}

.nav-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.nav-item:hover {
    background-color: #333;
    color: #ffffff;
}

.nav-item.active {
    background-color: #444;
    color: #ffffff;
    font-weight: 500;
}

/* 右侧内容区域 */
.content {
    flex: 1;
    background-color: #222;
    border-radius: 8px;
    padding: 30px;
    min-height: 500px;
}

.category-title {
    font-size: 24px;
    margin-bottom: 25px;
    color: #ffffff;
    font-weight: 500;
}

/* 软件网格布局 */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 软件卡片样式 */
.software-card {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.software-card:hover {
    background-color: #333;
    border-color: #444;
    transform: translateY(-2px);
}

.software-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
}

.logo-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.software-info {
    flex: 1;
}

.software-name {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
}

.software-description {
    font-size: 14px;
    color: #aaa;
}

/* 弹出提示框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #222;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.modal-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #ffffff;
}

.modal-content p {
    margin-bottom: 25px;
    color: #aaa;
    font-size: 16px;
}

#modal-url {
    color: #00a8ff;
    word-break: break-all;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

#cancel-btn, #confirm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cancel-btn {
    background-color: #333;
    color: #e0e0e0;
}

#cancel-btn:hover {
    background-color: #444;
}

#confirm-btn {
    background-color: #00a8ff;
    color: white;
}

#confirm-btn:hover {
    background-color: #0091d6;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .software-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .search-container {
        width: 100%;
    }
    
    #search-input {
        width: 100%;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .nav-item {
        margin-bottom: 0;
        flex: 0 0 auto;
    }
    
    .software-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}