/**
 * ai-apps.css - AI应用列表页样式
 */
.ai-apps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 16px 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 8px;
}
.ai-apps-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ai-apps-header h1 i {
    color: #4a6cf7;
    background: rgba(74, 108, 247, 0.10);
    padding: 6px 10px;
    border-radius: 10px;
}
.ai-apps-header .app-count {
    font-size: 13px;
    color: #a0aec0;
    background: #f0f2f5;
    padding: 4px 16px;
    border-radius: 30px;
}

/* ===== 分类区块（白色背景） ===== */
.app-category-section {
    margin-bottom: 32px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s ease;
}
.app-category-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.app-category-section .category-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 14px;
    padding: 6px 18px;
    background: linear-gradient(135deg, #f0f5ff, #e8edfc);
    border-radius: 30px;
    border-left: 4px solid #4a6cf7;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.app-category-section .category-title .cat-count {
    font-size: 12px;
    font-weight: 400;
    color: #888;
    background: rgba(255,255,255,0.6);
    padding: 0 10px;
    border-radius: 30px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    padding: 0;
}

/* ===== 卡片样式 ===== */
.app-grid .content-urls-card {
    background: linear-gradient(145deg, #fafbfc, #f0f2f5) !important;
    border-radius: 12px !important;
    border: 1px solid #eef2f6 !important;
    padding: 12px 14px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    min-height: 82px !important;
    overflow: hidden !important;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    text-decoration: none !important;
    color: inherit !important;
}
.app-grid .content-urls-card:hover {
    border-color: #4a6cf7 !important;
    box-shadow: 0 8px 24px rgba(74, 108, 247, 0.08) !important;
    transform: translateY(-4px) !important;
    background: linear-gradient(145deg, #ffffff, #f0f5ff) !important;
}
.app-grid .content-urls-card.is-recommend {
    background: linear-gradient(145deg, #fffbeb, #fef3c7) !important;
    border-color: #f6e05e !important;
}
.app-grid .content-urls-card.is-recommend:hover {
    border-color: #ecc94b !important;
    box-shadow: 0 8px 24px rgba(236, 201, 75, 0.15) !important;
}

.app-grid .content-urls-body {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 10px !important;
}
.app-grid .content-url-flex {
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 0 !important;
    text-decoration: none !important;
    color: inherit !important;
}
.app-grid .content-card-body {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    flex: 1 !important;
    gap: 12px !important;
}

.app-grid .content-url-img {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #f7fafc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #edf2f7 !important;
}
.app-grid .content-url-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 6px !important;
}

.app-grid .content-url-info {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
.app-grid .content-url-info strong {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.2s !important;
    margin-bottom: 1px !important;
}
.app-grid .content-urls-card:hover .content-url-info strong {
    color: #4a6cf7 !important;
}
.app-grid .content-url-info p {
    font-size: 13px !important;
    color: #718096 !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.app-grid .content-url-info .app-stats-row {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-top: 4px !important;
    font-size: 12px !important;
    color: #a0aec0 !important;
}
.app-grid .content-url-info .app-stats-row span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.app-grid .content-url-info .app-stats-row i {
    font-size: 14px !important;
    color: #a0aec0 !important;
}

.app-grid .content-url-togo {
    flex-shrink: 0 !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    color: #cbd5e0 !important;
    transition: all 0.3s ease !important;
    background: #f7fafc !important;
    text-decoration: none !important;
    align-self: center !important;
}
.app-grid .content-url-togo:hover {
    color: #fff !important;
    background: #4a6cf7 !important;
    transform: rotate(45deg) scale(1.05) !important;
}
.app-grid .content-url-togo svg {
    width: 14px !important;
    height: 14px !important;
    stroke: currentColor !important;
    stroke-width: 2.5 !important;
}

/* ===== 卡片标签 ===== */
.app-grid .card-badge {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    right: auto !important;
    z-index: 99 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 56px !important;
    padding: 2px 18px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: center !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    pointer-events: none !important;
    transform: translate(-16px, 28px) rotate(-45deg) translateZ(0) !important;
    transform-origin: 0 0 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    transition: none !important;
    will-change: transform !important;
    box-shadow: none !important;
}
.app-grid .card-badge-recommend {
    background: linear-gradient(135deg, #f89250, #f1404b) !important;
}
.app-grid .card-badge-hot {
    background: linear-gradient(135deg, #f56565, #e53e3e) !important;
}
.app-grid .card-badge-default {
    background: linear-gradient(135deg, #4a6cf7, #6a8cff) !important;
}

/* ===== 响应式 ===== */
@media (max-width: 1400px) {
    .app-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 1200px) {
    .app-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .app-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .app-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ai-apps-header h1 { font-size: 20px; }
    .app-category-section { padding: 12px 14px; }
    .app-grid .content-url-img { width: 38px !important; height: 38px !important; }
    .app-grid .content-url-info strong { font-size: 14px !important; }
    .app-grid .content-url-info p { display: none !important; }
    .app-grid .content-url-info .app-stats-row { font-size: 11px !important; gap: 10px !important; }
    .app-grid .content-url-info .app-stats-row i { font-size: 13px !important; }
    .app-grid .content-urls-card { min-height: 70px !important; padding: 10px 12px !important; }
}
@media (max-width: 480px) {
    .app-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .ai-apps-header h1 { font-size: 18px; }
    .app-category-section { padding: 10px 12px; }
    .app-category-section .category-title { font-size: 14px; padding: 4px 14px; }
    .app-grid .content-url-img { width: 32px !important; height: 32px !important; }
    .app-grid .content-url-info strong { font-size: 12px !important; }
    .app-grid .content-url-info .app-stats-row { font-size: 10px !important; gap: 8px !important; }
    .app-grid .content-url-info .app-stats-row i { font-size: 11px !important; }
    .app-grid .content-urls-card { min-height: 62px !important; padding: 8px 10px !important; }
    .app-grid .card-badge { min-width: 44px !important; padding: 1px 12px !important; font-size: 9px !important; transform: translate(-10px, 20px) rotate(-45deg) translateZ(0) !important; }
}

/* ===== 深色模式 ===== */
body.dark-mode .ai-apps-header { border-bottom-color: #2a2a4a; }
body.dark-mode .ai-apps-header h1 { color: #e2e8f0; }
body.dark-mode .ai-apps-header .app-count { background: #2a2a4a; color: #888; }

body.dark-mode .app-category-section {
    background: #16213e;
    border-color: #2a3a5a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
body.dark-mode .app-category-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .app-category-section .category-title {
    background: linear-gradient(135deg, #1a2a4a, #2a3a5a);
    color: #e2e8f0;
}
body.dark-mode .app-category-section .category-title .cat-count {
    color: #888;
    background: rgba(255,255,255,0.05);
}

body.dark-mode .app-grid .content-urls-card {
    background: linear-gradient(145deg, #1a2a4a, #1e2a4a) !important;
    border-color: #2a3a5a !important;
}
body.dark-mode .app-grid .content-urls-card:hover {
    background: linear-gradient(145deg, #2a3a6a, #1e2a4a) !important;
    border-color: #4a6cf7 !important;
}
body.dark-mode .app-grid .content-urls-card.is-recommend {
    background: linear-gradient(145deg, #2a2a3a, #3a2a2a) !important;
    border-color: #5a4a2a !important;
}
body.dark-mode .app-grid .content-url-info strong {
    color: #e2e8f0 !important;
}
body.dark-mode .app-grid .content-urls-card:hover .content-url-info strong {
    color: #6a8cff !important;
}
body.dark-mode .app-grid .content-url-info p {
    color: #a0aec0 !important;
}
body.dark-mode .app-grid .content-url-info .app-stats-row {
    color: #888 !important;
}
body.dark-mode .app-grid .content-url-info .app-stats-row i {
    color: #666 !important;
}
body.dark-mode .app-grid .content-url-togo {
    background: #4a5568 !important;
    color: #a0aec0 !important;
}
body.dark-mode .app-grid .content-url-togo:hover {
    background: #4a6cf7 !important;
    color: #fff !important;
}
body.dark-mode .app-grid .content-url-img {
    background: #4a5568 !important;
    border-color: #5a6b7a !important;
}