/* 白色卡片网格风格首页 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f7f7f7;
    color: #333;
    min-height: 100vh;
}

/* ========== 顶部导航 ========== */
.header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

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

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    background: #f5f5f5;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-box input:focus {
    background: #fff;
    border-color: #ff2442;
    box-shadow: 0 0 0 3px rgba(255,36,66,0.1);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.5;
}

.header-right {
    flex-shrink: 0;
    font-size: 14px;
    color: #999;
    font-variant-numeric: tabular-nums;
}

/* ========== 主内容区 ========== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.welcome-text h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.welcome-text p {
    font-size: 14px;
    opacity: 0.85;
}

.welcome-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 8px 18px;
    border-radius: 18px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    border-color: #ff2442;
    color: #ff2442;
}

.tab.active {
    background: #ff2442;
    border-color: #ff2442;
    color: #fff;
}

/* ========== 应用卡片网格 ========== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.app-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #f0f0f0;
    animation: card-in 0.4s ease backwards;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
}

.app-card:active {
    transform: translateY(-1px);
}

/* 卡片封面区 */
.app-card-cover {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.app-card-cover::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
}

.app-card-icon {
    font-size: 48px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

.app-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.9);
    color: #333;
    z-index: 2;
}

.app-card-badge.hot {
    background: #ff2442;
    color: #fff;
}

.app-card-badge.new {
    background: #4CAF50;
    color: #fff;
}

/* 卡片内容区 */
.app-card-body {
    padding: 14px 16px;
}

.app-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-card-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}

.app-card-meta span {
    font-size: 11px;
    color: #bbb;
}

.app-card-arrow {
    font-size: 14px;
    color: #ccc;
    transition: transform 0.2s;
}

.app-card:hover .app-card-arrow {
    transform: translateX(3px);
    color: #ff2442;
}

/* 不可用卡片 */
.app-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.app-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 封面渐变背景 */
.cover-blog { background: linear-gradient(135deg, #667eea, #764ba2); }
.cover-poker { background: linear-gradient(135deg, #11998e, #38ef7d); }
.cover-forum { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.cover-calc { background: linear-gradient(135deg, #f093fb, #f5576c); }
.cover-notes { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.cover-weather { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.cover-music { background: linear-gradient(135deg, #ff6a00, #ee0979); }
.cover-photos { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.cover-games { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.cover-tools { background: linear-gradient(135deg, #a8edea, #fed6e3); }
.cover-about { background: linear-gradient(135deg, #fa709a, #fee140); }
.cover-settings { background: linear-gradient(135deg, #434343, #000000); }

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #bbb;
    font-size: 13px;
}

/* ========== 应用打开动画 ========== */
.app-launch-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-launch-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.launch-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    animation: launch-zoom 0.4s ease forwards;
}

@keyframes launch-zoom {
    0% { transform: scale(0.3); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header-inner { padding: 10px 16px; gap: 10px; }
    .logo-text { display: none; }
    .header-right { display: none; }
    .main { padding: 16px; }
    .welcome-banner { padding: 20px; flex-direction: column; gap: 16px; text-align: center; }
    .welcome-stats { gap: 24px; }
    .app-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .app-card-cover { height: 100px; }
    .app-card-icon { font-size: 36px; }
    .app-card-body { padding: 10px 12px; }
    .app-card-title { font-size: 14px; }
    .app-card-desc { font-size: 11px; }
}

@media (min-width: 1024px) {
    .app-grid { grid-template-columns: repeat(4, 1fr); }
}
