:root {
    --wecom-background: #f0f7ff;
    --wecom-foreground: #1a1a1a;
    --wecom-card: #ffffff;
    --wecom-primary: #1677ff;
    --wecom-primary-foreground: #ffffff;
    --wecom-muted-foreground: #8c8c8c;
    --wecom-border: #e5e7eb;
    --wecom-blue-50: #e6f4ff;
    --wecom-radius-md: 12px;
    --wecom-radius-lg: 16px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--wecom-foreground);
    background: linear-gradient(180deg, var(--wecom-blue-50) 0%, var(--wecom-background) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    background: linear-gradient(180deg, var(--wecom-blue-50) 0%, var(--wecom-background) 100%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wecom-foreground);
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--wecom-foreground);
    cursor: pointer;
}

.icon-btn:active {
    background: rgba(0, 0, 0, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-bar {
    padding: 4px 16px 12px;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 9999px;
    background: var(--wecom-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--wecom-foreground);
}

.search-input input::placeholder {
    color: var(--wecom-muted-foreground);
}

.search-input svg {
    flex-shrink: 0;
    color: var(--wecom-muted-foreground);
}

.content {
    padding: 8px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card {
    background: var(--wecom-card);
    border-radius: var(--wecom-radius-lg);
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--wecom-foreground);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 4px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--wecom-radius-md);
    background: var(--wecom-primary);
    color: var(--wecom-primary-foreground);
    flex-shrink: 0;
}

.app-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.app-name {
    width: 100%;
    font-size: 12px;
    line-height: 1.3;
    color: var(--wecom-foreground);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    flex-shrink: 0;
}