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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 32px;
    color: white;
}

.header h1 {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 24px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.search-box {
    max-width: 500px;
    margin: 0 auto 20px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.category-tab.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    font-weight: 600;
}

.tab-icon {
    font-size: 15px;
}

.tab-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.category-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* 标签筛选器 */
.tag-filter {
    position: relative;
}

.tag-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
}

.tag-filter-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.filter-icon {
    font-size: 16px;
}

.selected-count {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.tag-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border: 2px solid;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tag-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tag-item.active {
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.tag-dot {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tag-name {
    flex: 1;
}

.tag-check {
    font-size: 13px;
    font-weight: bold;
    margin-left: 2px;
}

.tag-clear {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.tag-clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 排序控件 */
.sort-control select {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
}

.sort-control select:hover,
.sort-control select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.sort-control select option {
    background: #5a67d8;
    color: white;
}

/* 分区标题 */
.app-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.section-icon {
    font-size: 24px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

.section-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 4px;
}

/* 应用网格 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    padding: 0 0 8px;
}

.app-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.app-name {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.app-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 10px;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    justify-content: center;
}

.app-tag {
    font-size: 11px;
    padding: 4px 11px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    white-space: nowrap;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.app-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    margin-top: auto;
}

.no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    padding: 60px 20px;
}

.footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin: 0;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 32px;
    }

    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .app-card {
        padding: 20px;
    }

    .filter-bar {
        flex-direction: column;
        gap: 12px;
    }

    .section-title {
        font-size: 18px;
    }

    .tag-list {
        right: auto;
        left: 0;
        max-width: calc(100vw - 40px);
    }
}
