* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: black;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 20px;
}

.title {
    font-size: 80px;
    font-weight: 700;
    color: white;
}

.subtitle {
    font-size: 16px;
    color: red;
    margin-top: -10px;
}

.main-content {
    max-width: 1000px;
    width: 100%;
    background-color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 0;
}

.search-bar {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.search-input-container {
    display: flex;
    align-items: center;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    overflow: hidden;
}

.search-prefix {
    padding: 0 15px;
    background-color: #f5f7fa;
    color: #909399;
    border-right: 1px solid #dcdfe6;
    height: 40px;
    line-height: 40px;
}

.search-input {
    flex: 1;
    height: 40px;
    border: none;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
}

.clear-button {
    padding: 0 15px;
    background: none;
    border: none;
    color: #909399;
    cursor: pointer;
    font-size: 16px;
}

.main-layout {
    display: flex;
    flex: 1;
}

.category-menu {
    width: 110px;
    height: 100%;
    overflow-y: auto;
    border-right: 2px solid #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.category-item {
    width: 100%;
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #333;
    transition: all 0.3s;
}

.category-item:hover {
    color: #409EFF;
    background-color: #f5f7fa;
}

.category-item.active {
    color: #409EFF;
    background-color: #ecf5ff;
}

.software-list {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
}

.software-item {
    margin-bottom: 8px;
}

.software-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    border: 1px solid #eee;
    border-radius: 4px;
}

.software-header:hover {
    background-color: #f5f7fa;
}

.software-icon {
    width: 24px;
    height: 24px;
}

.software-title {
    font-size: 15px;
}

.version-list {
    display: none;
    margin-top: 10px;
    gap: 10px;
}

.version-list.active {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.version-item {
    background-color: #555;
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(50% - 5px);
    margin-bottom: 0;
}

/* 只有一个版本时，让它居中且宽度不变 */
.version-list.active:has(.version-item:only-child) {
    justify-content: left;
}

.download-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.download-button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s;
}

.download-button:hover {
    opacity: 0.8;
}

.download-button.xunlei {
    background-color: #409EFF;
}

.download-button.kuake {
    background-color: #67C23A;
}

.download-button.tutorial {
    background-color: #F56C6C;
}

footer {
    margin: 40px 10px;
    color: #ccc;
    font-size: 13px;
    text-align: center;
}

footer a {
    color: #fff;
    text-decoration: none;
}

/* Search results styles */
.search-results {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-item {
    width: calc(50% - 5px);
    margin-bottom: 0;
}

.search-results .version-item {
    /* margin-bottom: 5px; */
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    .main-content {
        max-width: 100vw;
        border-radius: 0;
        min-height: 100vh;
    }
    .header {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    .title {
        font-size: 32px;
        word-break: break-all;
    }
    .subtitle {
        font-size: 12px;
        margin-top: 0;
    }
    .main-layout {
        flex-direction: row;
        height: 100vh;
        min-height: 0;
    }
    .category-menu {
        width: 90px;
        min-width: 70px;
        max-width: 120px;
        height: 100vh;
        border-right: 2px solid #ccc;
        border-bottom: none;
        flex-direction: column;
        align-items: stretch;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        background: #f8f8f8;
        position: relative;
        z-index: 2;
    }
    .category-item {
        width: 100%;
        min-width: 0;
        padding: 12px 0;
        font-size: 14px;
        margin: 0;
        border-radius: 0;
        text-align: center;
    }
    .software-list {
        flex: 1;
        padding: 10px 4px;
        overflow-y: auto;
        background: #fff;
        height: 100vh;
        min-width: 0;
    }
    .search-bar {
        padding: 8px 4px 8px 4px;
        border-bottom: 1px solid #eee;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 3;
    }
    .software-header {
        padding: 8px;
        font-size: 14px;
    }
    .software-title {
        font-size: 14px;
    }
    .version-list {
        gap: 6px;
        margin-top: 6px;
    }
    .version-item {
        padding: 10px 8px;
        font-size: 13px;
        border-radius: 6px;
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 0;
    }
    .download-buttons {
        gap: 4px;
    }
    .download-button {
        font-size: 13px;
        padding: 5px 8px;
        border-radius: 3px;
    }
    .search-input-container {
        height: 36px;
    }
    .search-input {
        height: 36px;
        font-size: 13px;
        padding: 0 8px;
    }
    .search-prefix {
        height: 36px;
        line-height: 36px;
        font-size: 13px;
        padding: 0 8px;
    }
    .clear-button {
        font-size: 15px;
        padding: 0 8px;
    }
    .search-results {
        gap: 0;
    }
    h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    .version-item,
    .search-item {
        width: 100% !important;
        min-width: 0 !important;
    }
    footer {
        font-size: 11px;
        margin: 20px 2px;
    }
    .search-results .version-item {
        margin-bottom: 5px;
    }
} 