/* ==========================================================================
   Apple 清新资讯模板  ——  基于 Bootstrap 5
   配色：深色导航 + 珊瑚红主色 + 青绿强调，清新现代风格
   ========================================================================== */

:root {
    --apl-dark: #1a1a2e;
    --apl-dark-2: #16213e;
    --apl-primary: #e94560;
    --apl-primary-dark: #c73e54;
    --apl-accent: #0f3460;
    --apl-accent-light: #533483;
    --apl-body: #f8f9fc;
    --apl-text: #2d3436;
    --apl-muted: #636e72;
    --apl-line: #e8ecf1;
    --apl-radius: 12px;
    --apl-shadow: 0 2px 16px rgba(26, 26, 46, .06);
    --apl-shadow-lg: 0 12px 36px rgba(26, 26, 46, .12);
    --apl-gradient: linear-gradient(135deg, #e94560 0%, #ff6b6b 50%, #feca57 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--apl-body);
    color: var(--apl-text);
    font-size: 15px;
    line-height: 1.75;
}

a { color: var(--apl-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--apl-primary-dark); }
img { max-width: 100%; }

.apl-container { max-width: 1200px; }

/* ---------- 通用工具 ---------- */
.apl-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.apl-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.apl-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.apl-btn-primary {
    background: var(--apl-gradient);
    border: 0;
    color: #fff;
    font-weight: 600;
    padding: .55rem 1.5rem;
    border-radius: 999px;
    display: inline-block;
    transition: transform .2s, box-shadow .2s;
}
.apl-btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 69, 96, .35);
}

/* ---------- 顶部导航 ---------- */
.apl-header {
    background: var(--apl-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
    transition: box-shadow .25s ease;
}
.apl-header.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.apl-header .navbar-brand {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.apl-header .navbar-brand .brand-icon {
    background: var(--apl-gradient);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.apl-header .nav-link {
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
    padding: .5rem .9rem !important;
    border-radius: 8px;
    transition: all .2s;
}
.apl-header .nav-link:hover,
.apl-header .nav-link.active {
    color: #fff;
    background: rgba(233, 69, 96, .15);
}
.apl-header .dropdown-menu {
    background: var(--apl-dark-2);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 6px;
}
.apl-header .dropdown-item {
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
    border-radius: 6px;
    padding: 8px 14px;
}
.apl-header .dropdown-item:hover { background: rgba(233, 69, 96, .12); color: #fff; }

.apl-search .form-control {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    height: 38px;
    width: 170px;
    border-radius: 8px 0 0 8px;
}
.apl-search .form-control::placeholder { color: rgba(255, 255, 255, .45); }
.apl-search .form-control:focus {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    box-shadow: none;
    border-color: var(--apl-primary);
}
.apl-search .btn {
    border: 0;
    background: var(--apl-primary);
    color: #fff;
    height: 38px;
    border-radius: 0 8px 8px 0;
    padding: 0 14px;
}
.apl-search .btn:hover { background: var(--apl-primary-dark); }

/* ---------- Hero 首屏 ---------- */
.apl-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 80%, #533483 130%);
    color: #fff;
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}
.apl-hero::before {
    content: "";
    position: absolute;
    left: -100px;
    bottom: -100px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233, 69, 96, .2), transparent 70%);
}
.apl-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 202, 87, .15), transparent 70%);
}
.apl-hero h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.3; }
.apl-hero .apl-hero-sub {
    color: #feca57;
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: .8rem;
}
.apl-hero p.lead { color: rgba(255, 255, 255, .75); font-size: 1.05rem; }
.apl-hero-img img { border-radius: 16px; box-shadow: var(--apl-shadow-lg); }
@media (max-width: 767.98px) {
    .apl-hero { padding: 40px 0; text-align: center; }
    .apl-hero h1 { font-size: 1.6rem; }
}

/* ---------- 区块标题 ---------- */
.apl-section { padding: 50px 0; }
.apl-section-title { text-align: center; margin-bottom: 36px; }
.apl-section-title h2 {
    font-size: 1.6rem;
    font-weight: 700;
    display: inline-block;
    padding-bottom: 14px;
    position: relative;
}
.apl-section-title h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    border-radius: 3px;
    background: var(--apl-gradient);
}
.apl-section-title p { color: var(--apl-muted); margin: 8px 0 0; }

/* ---------- 卡片 / 盒子 ---------- */
.apl-box {
    background: #fff;
    border: 1px solid var(--apl-line);
    border-radius: var(--apl-radius);
    box-shadow: var(--apl-shadow);
    margin-bottom: 22px;
    overflow: hidden;
}
.apl-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--apl-line);
}
.apl-box-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    padding-left: 12px;
    border-left: 4px solid var(--apl-primary);
    line-height: 1.2;
}
.apl-box-head .more { font-size: 13px; color: var(--apl-muted); }
.apl-box-head .more:hover { color: var(--apl-primary); }
.apl-box-body { padding: 20px; }

/* 文章卡片 */
.apl-card {
    background: #fff;
    border: 1px solid var(--apl-line);
    border-radius: var(--apl-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .25s, box-shadow .25s;
}
.apl-card:hover { transform: translateY(-5px); box-shadow: var(--apl-shadow-lg); }
.apl-card-thumb {
    display: block;
    position: relative;
    padding-top: 58%;
    overflow: hidden;
    background: #eceff4;
}
.apl-card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.apl-card:hover .apl-card-thumb img { transform: scale(1.06); }
.apl-card-body { padding: 14px 16px 18px; }
.apl-card-body h4 { font-size: 1rem; font-weight: 600; line-height: 1.5; margin: 0 0 8px; }
.apl-card-body h4 a { color: var(--apl-text); }
.apl-card-body h4 a:hover { color: var(--apl-primary); }
.apl-card-body .desc { color: var(--apl-muted); font-size: 13px; margin: 0 0 10px; }
.apl-meta { font-size: 12px; color: #9aa1ac; display: flex; gap: 14px; align-items: center; }
.apl-meta i { margin-right: 4px; }

/* 横向图文列表 */
.apl-list-item {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px dashed var(--apl-line);
}
.apl-list-item:last-child { border-bottom: 0; }
.apl-list-thumb {
    flex: 0 0 210px;
    position: relative;
    padding-top: 125px;
    border-radius: 10px;
    overflow: hidden;
    background: #eceff4;
}
.apl-list-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.apl-list-item:hover .apl-list-thumb img { transform: scale(1.06); }
.apl-list-content { flex: 1 1 auto; min-width: 0; }
.apl-list-content h4 { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px; line-height: 1.5; }
.apl-list-content h4 a { color: var(--apl-text); }
.apl-list-content h4 a:hover { color: var(--apl-primary); }
.apl-list-content .desc { color: var(--apl-muted); font-size: 13.5px; margin: 0 0 10px; }
@media (max-width: 575.98px) {
    .apl-list-item { flex-direction: column; gap: 10px; }
    .apl-list-thumb { flex: none; padding-top: 56%; }
}

/* 侧栏排行榜 */
.apl-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.apl-rank li {
    counter-increment: rank;
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--apl-line);
    font-size: 14px;
}
.apl-rank li:last-child { border-bottom: 0; }
.apl-rank li::before {
    content: counter(rank);
    flex: 0 0 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 5px;
    background: #eef1f6;
    color: var(--apl-muted);
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}
.apl-rank li:nth-child(-n+3)::before { background: var(--apl-primary); color: #fff; }
.apl-rank li a { color: var(--apl-text); }
.apl-rank li a:hover { color: var(--apl-primary); }

/* 标签云 */
.apl-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.apl-tags a {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid var(--apl-line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--apl-muted);
    background: #fafbfc;
    transition: all .2s;
}
.apl-tags a:hover { background: var(--apl-primary); border-color: var(--apl-primary); color: #fff; }

/* ---------- 面包屑 ---------- */
.apl-crumb { padding: 16px 0; font-size: 13px; color: var(--apl-muted); }
.apl-crumb ul { margin: 0; padding: 0; flex-wrap: wrap; }
.apl-crumb li + li::before { content: "/"; margin: 0 8px; color: #c7ccd4; }
.apl-crumb a { color: var(--apl-muted); }
.apl-crumb a:hover { color: var(--apl-primary); }

/* ---------- 文章详情 ---------- */
.apl-article-title { font-size: 1.75rem; font-weight: 700; line-height: 1.45; margin: 0 0 16px; }
.apl-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--apl-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--apl-line);
    margin-bottom: 22px;
}
.apl-content { font-size: 16px; line-height: 2; color: #2b3441; word-wrap: break-word; }
.apl-content p { margin-bottom: 1.1rem; }
.apl-content img { height: auto !important; border-radius: 10px; margin: 12px 0; display: block; }
.apl-content h2, .apl-content h3, .apl-content h4 {
    font-weight: 700;
    margin: 1.6rem 0 .9rem;
    line-height: 1.4;
}
.apl-content h2 { font-size: 1.32rem; }
.apl-content h3 { font-size: 1.16rem; }
.apl-content blockquote {
    border-left: 4px solid var(--apl-primary);
    background: #fef5f7;
    padding: 14px 18px;
    color: #57534e;
    margin: 1.2rem 0;
    border-radius: 0 8px 8px 0;
}
.apl-content table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
.apl-content table td, .apl-content table th { border: 1px solid var(--apl-line); padding: 8px 12px; }

.apl-nextprev { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.apl-nextprev div {
    background: #fafbfc;
    border: 1px solid var(--apl-line);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    transition: border-color .2s;
}
.apl-nextprev div:hover { border-color: var(--apl-primary); }
.apl-nextprev p { color: var(--apl-muted); font-size: 12px; margin: 0 0 4px; }
@media (max-width: 575.98px) { .apl-nextprev { grid-template-columns: 1fr; } }

/* ---------- 分页 ---------- */
.page-control { display: flex; justify-content: center; margin-top: 26px; }
.page-control .pagination { flex-wrap: wrap; gap: 6px; margin: 0; }
.page-control .page-item { list-style: none; }
.page-control .page-link,
.page-control .page-item.active .page-link {
    border: 1px solid var(--apl-line);
    border-radius: 8px;
    color: var(--apl-text);
    padding: 7px 14px;
    font-size: 14px;
    transition: all .2s;
}
.page-control .page-link:hover { background: var(--apl-primary); border-color: var(--apl-primary); color: #fff; }
.page-control .page-item.active .page-link { background: var(--apl-primary); border-color: var(--apl-primary); color: #fff; }

/* ---------- 空状态 ---------- */
.apl-empty { text-align: center; padding: 50px 16px; color: #9aa1ac; }
.apl-empty i { font-size: 42px; display: block; margin-bottom: 14px; color: #d5dae2; }

/* ---------- 页脚 ---------- */
.apl-footer {
    background: var(--apl-dark);
    color: rgba(255, 255, 255, .68);
    padding: 44px 0 24px;
    margin-top: 50px;
}
.apl-footer h5 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.apl-footer a { color: rgba(255, 255, 255, .68); font-size: 14px; }
.apl-footer a:hover { color: var(--apl-primary); }
.apl-footer ul { list-style: none; padding: 0; margin: 0; }
.apl-footer ul li { margin-bottom: 8px; }
.apl-footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.footer-desc { font-size: 14px; margin-bottom: 14px; }
.footer-latest li { margin-bottom: 10px; }
.apl-copy {
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: 28px;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, .45);
}

/* 返回顶部 */
.apl-totop {
    position: fixed;
    right: 20px;
    bottom: 26px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    background: var(--apl-primary);
    color: #fff;
    box-shadow: var(--apl-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    z-index: 99;
}
.apl-totop.show { opacity: 1; visibility: visible; }
.apl-totop:hover { color: #fff; background: var(--apl-primary-dark); }

/* ---------- 图库模式 ---------- */
.apl-gallery img { width: 100%; border-radius: 10px; margin-bottom: 14px; display: block; }
