/* =============================================
   UZU 增强功能 - 专业样式
   设计原则：简洁、现代、信息层级清晰
   ============================================= */

/* ---- 通用容器 ---- */

/* ===== 左侧导航美化 ===== */
#layout_aside {
    border-right: 1px solid #e8ecf3 !important;
    background: #fafbfc !important;
}

/* 导航按钮 - 悬停效果 */
.aside-btn {
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}
.aside-btn:hover {
    background: #eef1f7 !important;
}

/* 一级分类按钮 */
.aside-item > a.aside-btn.hide-target {
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 3px 8px !important;
    padding: 7px 8px !important;
    border-left: 3px solid transparent !important;
}
.aside-item > a.aside-btn.hide-target:hover {
    border-left-color: #6366f1 !important;
    background: #edf0f7 !important;
}

/* 子分类按钮 */
.aside-sub .aside-btn.change-href {
    padding: 5px 8px 5px 14px !important;
    margin: 1px 8px !important;
    font-size: 12px !important;
    color: #475569 !important;
}
.aside-sub .aside-btn.change-href:hover {
    background: #e8ecf5 !important;
    color: #1e293b !important;
    padding-left: 18px !important;
}

/* 展开指示器 - 小箭头 */
.aside-item .icon-arrow-b {
    font-size: 10px !important;
    opacity: 0.5 !important;
    transition: transform 0.2s !important;
}

/* 侧边栏滚动条美化 */
.aside-ul::-webkit-scrollbar {
    width: 3px !important;
}
.aside-ul::-webkit-scrollbar-thumb {
    background: #d1d5db !important;
    border-radius: 3px !important;
}

.uzu-home-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    border: 1px solid #edf2f7;
    transition: box-shadow 0.2s;
}

/* ---- 模块标题栏 ---- */
.uzu-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
}
.uzu-section-header h3 {
    margin: 0;
    font-size: inherit;
    font-weight: 600;
    color: #0f172a;
}
.uzu-section-header h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: middle;
}
.uzu-section-header .uzu-section-more {
    font-size: 14px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}
.uzu-section-header .uzu-section-more:hover {
    color: #4f46e5;
}

/* =============================================
   AI快讯
   ============================================= */
.uzu-news-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.uzu-news-card {
    background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #eef2ff;
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}
.uzu-news-card:hover {
    box-shadow: 0 4px 14px rgba(99,102,241,0.08);
    border-color: #c7d2fe;
}
.uzu-news-card h4 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}
.uzu-news-card h4 a {
    color: #0f172a;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.uzu-news-card h4 a:hover { color: #6366f1; }
.uzu-news-card p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.uzu-news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
}
.uzu-news-source {
    display: inline-block;
    background: #eef2ff;
    color: #6366f1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* ---- AI快讯列表页 ---- */
.uzu-news-list {}
.uzu-news-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
}
.uzu-news-item:last-child { border-bottom: none; }
.uzu-news-date {
    min-width: 48px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    line-height: 1.3;
}
.uzu-news-content { flex: 1; min-width: 0; }
.uzu-news-content h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.uzu-news-content h4 a { color: #0f172a; text-decoration: none; transition: color 0.2s; }
.uzu-news-content h4 a:hover { color: #6366f1; }
.uzu-news-content p { margin: 0 0 6px; color: #64748b; font-size: 13px; line-height: 1.6; }
.uzu-news-meta { display: flex; gap: 10px; font-size: 11px; color: #94a3b8; }
.uzu-news-cat {
    background: #eef2ff;
    color: #6366f1;
    padding: 1px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* =============================================
   活动日历
   ============================================= */
.uzu-events-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.uzu-event-mini {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: default;
}
.uzu-event-mini:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99,102,241,0.06);
}
.uzu-event-mini h5 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
}
.uzu-event-mini-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}
.uzu-event-countdown {
    color: #e11d48;
    font-weight: 500;
}
.uzu-event-countdown.urgent {
    color: #dc2626;
    font-weight: 700;
    animation: uzu-pulse 1.5s ease-in-out infinite;
}
.uzu-event-countdown.ended {
    color: #94a3b8;
}
.uzu-event-org {
    color: #6366f1;
}
.uzu-event-mini-btn, .uzu-event-register {
    display: inline-block;
    background: #6366f1;
    color: #fff !important;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
    margin-left: auto;
}
.uzu-event-mini-btn:hover, .uzu-event-register:hover {
    background: #4f46e5;
    color: #fff !important;
    text-decoration: none;
}
@keyframes uzu-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 活动详情页 */
.uzu-event-item {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 14px;
    transition: box-shadow 0.2s;
}
.uzu-event-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.uzu-event-item.expired { opacity: 0.6; }
.uzu-event-item h4 {
    margin: 0 0 10px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.uzu-event-item h4 a { color: #0f172a; text-decoration: none; }
.uzu-event-item h4 a:hover { color: #6366f1; }
.uzu-event-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.uzu-event-status.active { background: #dcfce7; color: #166534; }
.uzu-event-status.ended { background: #fef2f2; color: #991b1b; }
.uzu-event-body { color: #475569; font-size: 13px; margin-bottom: 10px; line-height: 1.6; }
.uzu-event-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #64748b; }

/* =============================================
   热门排行
   ============================================= */
.uzu-rankings-list {
    max-height: 480px;
    overflow-y: auto;
}
.uzu-rankings-list::-webkit-scrollbar { width: 4px; }
.uzu-rankings-list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

.uzu-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    transition: background 0.15s;
    cursor: pointer;
}
.uzu-rank-item:hover { background: #f8fafc; }
.uzu-rank-item.top-1 { background: linear-gradient(90deg, #fffbeb 0%, transparent 100%); }
.uzu-rank-item.top-2 { background: linear-gradient(90deg, #f1f5f9 0%, transparent 100%); }
.uzu-rank-item.top-3 { background: linear-gradient(90deg, #fff7ed 0%, transparent 100%); }

.uzu-rank-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.uzu-rank-item.top-1 .uzu-rank-num { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.uzu-rank-item.top-2 .uzu-rank-num { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.uzu-rank-item.top-3 .uzu-rank-num { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }

.uzu-rank-info { flex: 1; min-width: 0; }
.uzu-rank-info h5 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.uzu-rank-info p { margin: 2px 0 4px; font-size: 13px; color: #64748b; line-height: 1.4; }
.uzu-rank-info h5 a { color: #0f172a; text-decoration: none; transition: color 0.2s; }
.uzu-rank-info h5 a:hover { color: #6366f1; }
.uzu-rank-views { font-size: 12px; color: #94a3b8; }

/* =============================================
   AI教程
   ============================================= */
.uzu-tutorials {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.uzu-tutorial-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.uzu-tutorial-item:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    border-color: #cbd5e1;
}
.uzu-tutorial-body { padding: 18px; }
.uzu-tutorial-cat {
    display: inline-block;
    background: #eef2ff;
    color: #6366f1;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}
.uzu-tutorial-body h4 { margin: 0 0 8px; font-size: 15px; }
.uzu-tutorial-body h4 a { color: #0f172a; text-decoration: none; transition: color 0.2s; }
.uzu-tutorial-body h4 a:hover { color: #6366f1; }
.uzu-tutorial-body p { color: #64748b; font-size: 13px; margin: 0 0 8px; line-height: 1.6; }
.uzu-tutorial-date { font-size: 11px; color: #94a3b8; }

/* 教程卡片（首页用） */
.uzu-tut-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    height: 100%;
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}
.uzu-tut-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}
.uzu-tut-tag {
    display: inline-block;
    background: #eef2ff;
    color: #6366f1;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 500;
}
.uzu-tut-card h5 { margin: 0 0 6px; font-size: 14px; font-weight: 500; }
.uzu-tut-card h5 a { color: #0f172a; text-decoration: none; transition: color 0.2s; }
.uzu-tut-card h5 a:hover { color: #6366f1; }
.uzu-tut-card p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   AI百科
   ============================================= */
.uzu-encyc-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.uzu-encyc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border: 1px solid transparent;
}
.uzu-encyc-item:hover {
    background: #eef2ff;
    border-color: #e0e7ff;
}
.uzu-encyc-char {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.uzu-encyc-title {
    font-size: 14px;
    color: #0f172a;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uzu-encyc-cat {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}
.uzu-encyc-letter { cursor: pointer; }

/* 百科详情页 */
.uzu-ency-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}
.uzu-ency-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #94a3b8;
    font-weight: 600;
    font-size: 13px;
    border-radius: 6px;
}
.uzu-ency-letter[data-has="1"] { color: #6366f1; background: #eef2ff; }
.uzu-ency-letter[data-has="1"]:hover { background: #6366f1; color: #fff; }
.uzu-ency-section { margin-bottom: 20px; }
.uzu-ency-letter-title {
    font-size: 20px;
    color: #6366f1;
    border-bottom: 2px solid #e0e7ff;
    padding-bottom: 6px;
    margin-bottom: 12px;
    font-weight: 700;
}
.uzu-ency-list { list-style: none; padding: 0; margin: 0; }
.uzu-ency-list li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.uzu-ency-list li a { text-decoration: none; }
.uzu-ency-list li strong { color: #0f172a; }
.uzu-ency-list li span { color: #64748b; font-size: 13px; margin-left: 10px; }

/* =============================================
   APP专区
   ============================================= */
.uzu-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.uzu-app-list .uzu-app-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s;
}
.uzu-app-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.uzu-app-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.uzu-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.uzu-app-icon-placeholder {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    border-radius: 12px;
}
.uzu-app-info { flex: 1; min-width: 0; }
.uzu-app-info h4 { margin: 0 0 4px; font-size: 14px; }
.uzu-app-info p { margin: 0 0 6px; color: #64748b; font-size: 13px; line-height: 1.5; }
.uzu-app-meta { display: flex; gap: 10px; font-size: 11px; color: #94a3b8; }
.uzu-app-dl-btn {
    padding: 6px 16px;
    background: #6366f1;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}
.uzu-app-dl-btn:hover { background: #4f46e5; color: #fff; }

/* =============================================
   首页底部布局
   ============================================= */
.uzu-home-features { margin: 0 -10px; }
.uzu-home-features > [class*="col-"] { padding: 0 10px; }

/* =============================================
   响应式：移动端
   ============================================= */
@media (max-width: 768px) {
    .uzu-home-section {
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 16px 14px;
        margin-bottom: 16px;
    }
    .uzu-section-header { margin-bottom: 12px; padding-bottom: 10px; }
    .uzu-section-header h3 { font-size: 15px; }
    .uzu-section-more { font-size: 12px; }

    /* 快讯：垂直堆叠 */
    .uzu-news-scroll { grid-template-columns: 1fr; gap: 10px; }
    .uzu-news-card { padding: 14px; }
    .uzu-news-card h4 { font-size: 13px; }
    .uzu-news-card p { -webkit-line-clamp: 1; }

    /* 活动：横向滑动 */
    .uzu-events-row {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
    }
    .uzu-event-mini {
        flex: 0 0 200px;
        scroll-snap-align: start;
        padding: 12px;
    }
    .uzu-event-mini h5 { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .uzu-event-mini-meta { font-size: 11px; }

    /* 底部：全宽堆叠 */
    .uzu-home-features { margin: 0; width: 100%; }
    .uzu-home-features > [class*="col-"] {
        padding: 0 !important;
        flex: 0 0 100%;
        max-width: 100%;
    }
    .uzu-rankings-list { max-height: 300px; }
    .uzu-rank-item { padding: 8px 10px; }
    .uzu-rank-num { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }
    .uzu-rank-info h5 { font-size: 14px; }
    .uzu-tut-card { padding: 12px; }
    .uzu-tut-card h5 { font-size: 13px; }

    /* 百科：2列，紧凑 */
    .uzu-encyc-row { grid-template-columns: 1fr 1fr; gap: 6px; }
    .uzu-encyc-item { padding: 8px 10px; }
    .uzu-encyc-title { font-size: 13px; }
    .uzu-encyc-char { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }

    /* 列表页 */
    .uzu-tutorials, .uzu-app-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .uzu-home-section { padding: 12px 10px; }
    .uzu-news-card h4 { font-size: 12px; }
    .uzu-news-card { padding: 10px; }
    .uzu-encyc-row { grid-template-columns: 1fr 1fr; gap: 4px; }
    .uzu-encyc-item { padding: 6px 8px; gap: 6px; }
    .uzu-encyc-title { font-size: 11px; }
    .uzu-rank-item { padding: 6px 8px; }
}
