/* ==========================================================================
   popcandy theme -- 波普高饱和撞色新闻门户模板
   class 前缀: pcdy- (popcandy)
   ========================================================================== */

:root {
    --pcdy-yellow: #ffde59;
    --pcdy-pink: #ff3d81;
    --pcdy-blue: #00b4d8;
    --pcdy-ink: #000000;
    --pcdy-paper: #ffffff;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
    background-color: var(--pcdy-paper);
    background-image: radial-gradient(rgba(0, 180, 216, 0.18) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    line-height: 1.6;
}

a {
    color: var(--pcdy-pink);
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

a:hover {
    color: var(--pcdy-blue);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 800;
}

/* --------------------------------------------------------------------------
   渐变文字 (先兜底色再镂空,避免不支持时纯透明看不到)
   -------------------------------------------------------------------------- */
.pcdy-brand-gradient {
    color: var(--pcdy-pink);
    background: linear-gradient(90deg, var(--pcdy-pink) 0%, var(--pcdy-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   header: logo 独占一行, nav 另起一行
   -------------------------------------------------------------------------- */
.pcdy-header {
    border-bottom: 3px solid var(--pcdy-ink);
    background: var(--pcdy-paper);
}

.pcdy-logo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 28px;
    max-width: 1240px;
    margin: 0 auto;
}

.pcdy-logo-wrap {
    display: inline-flex;
    flex-shrink: 0;
}

.pcdy-logo-wrap img {
    display: block;
    border: 3px solid var(--pcdy-ink);
    border-radius: 14px 4px 14px 4px;
    background: var(--pcdy-paper);
    padding: 2px;
}

.pcdy-tagline {
    font-size: 14px;
    font-weight: 700;
    min-width: 0;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcdy-nav {
    background: var(--pcdy-yellow);
    border-top: 3px solid var(--pcdy-ink);
    border-bottom: 3px solid var(--pcdy-ink);
}

.pcdy-nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    max-width: 1240px;
    margin: 0 auto;
}

.pcdy-nav-list .pcdy-nav-item a {
    display: block;
    padding: 13px 20px;
    font-weight: 800;
    font-size: 15px;
    color: var(--pcdy-ink);
    border-right: 2px solid var(--pcdy-ink);
}

.pcdy-nav-list .pcdy-nav-item:last-child a {
    border-right: none;
}

.pcdy-nav-list .pcdy-nav-item a:hover {
    background: var(--pcdy-pink);
    color: var(--pcdy-paper);
}

.pcdy-nav-home a {
    background: var(--pcdy-blue);
    color: var(--pcdy-paper) !important;
}

/* --------------------------------------------------------------------------
   主体容器 + 装饰几何图形
   -------------------------------------------------------------------------- */
.pcdy-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 20px 50px;
    position: relative;
}

.pcdy-shape {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.pcdy-shape-circle {
    top: 10px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--pcdy-blue);
    border: 3px solid var(--pcdy-ink);
    opacity: .85;
}

.pcdy-shape-triangle {
    bottom: 40px;
    left: 6px;
    width: 0;
    height: 0;
    border-left: 34px solid transparent;
    border-right: 34px solid transparent;
    border-bottom: 58px solid var(--pcdy-yellow);
    filter: drop-shadow(3px 3px 0 var(--pcdy-ink));
}

.pcdy-index-layout {
    display: flex;
    align-items: flex-start;
    gap: 26px;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   首页瀑布流 (columns 实现, 不用 grid)
   -------------------------------------------------------------------------- */
.pcdy-waterfall {
    flex: 3;
    min-width: 0;
    columns: 2;
    column-gap: 22px;
}

.pcdy-col-block {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 24px;
    background: var(--pcdy-paper);
    border: 3px solid var(--pcdy-ink);
    border-radius: 20px 4px 20px 4px;
    padding: 16px;
    box-shadow: 6px 6px 0 var(--pcdy-pink);
}

.pcdy-col-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 2px solid var(--pcdy-ink);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.pcdy-col-title {
    font-size: 20px;
    letter-spacing: .5px;
}

.pcdy-col-more {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--pcdy-blue);
}

.pcdy-col-more:hover {
    color: var(--pcdy-pink);
}

.pcdy-col-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pcdy-card {
    border: 2px solid var(--pcdy-ink);
    border-radius: 4px 14px 4px 14px;
    padding: 10px 12px;
    background: var(--pcdy-paper);
    transition: transform .18s ease, box-shadow .18s ease;
}

.pcdy-card:hover {
    transform: rotate(-1deg) translateY(-2px);
    box-shadow: 4px 4px 0 var(--pcdy-blue);
}

.pcdy-card:nth-child(even):hover {
    transform: rotate(1deg) translateY(-2px);
    box-shadow: 4px 4px 0 var(--pcdy-yellow);
}

.pcdy-card-link {
    color: inherit;
    display: block;
}

.pcdy-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pcdy-card-excerpt {
    font-size: 13px;
    color: #444;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pcdy-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #777;
}

.pcdy-card-meta span {
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   侧栏: 热搜精选 (气泡编号徽标)
   -------------------------------------------------------------------------- */
.pcdy-side {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    position: relative;
    z-index: 1;
}

.pcdy-hotbox,
.pcdy-catbox {
    background: var(--pcdy-paper);
    border: 3px solid var(--pcdy-ink);
    border-radius: 4px 18px 4px 18px;
    padding: 16px;
    margin-bottom: 22px;
    box-shadow: 6px 6px 0 var(--pcdy-blue);
}

.pcdy-hotbox-title,
.pcdy-catbox-title {
    font-size: 17px;
    border-bottom: 2px solid var(--pcdy-ink);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.pcdy-hot-list {
    list-style: none;
    counter-reset: pcdyhot;
}

.pcdy-hot-item {
    counter-increment: pcdyhot;
    position: relative;
    padding: 6px 0 6px 42px;
    border-bottom: 1px dashed #ccc;
    font-size: 13px;
}

.pcdy-hot-item:last-child {
    border-bottom: none;
}

.pcdy-hot-item::before {
    content: counter(pcdyhot);
    position: absolute;
    left: 0;
    top: 4px;
    width: 26px;
    height: 24px;
    background: var(--pcdy-pink);
    color: var(--pcdy-paper);
    border: 2px solid var(--pcdy-ink);
    /* 非对称圆角模拟对话气泡尖角 */
    border-radius: 13px 13px 13px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

.pcdy-hot-item:nth-child(3n+2)::before {
    background: var(--pcdy-blue);
    border-radius: 13px 13px 2px 13px;
}

.pcdy-hot-item:nth-child(3n)::before {
    background: var(--pcdy-yellow);
    color: var(--pcdy-ink);
    border-radius: 2px 13px 13px 13px;
}

.pcdy-catbox-list li {
    list-style: none;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dashed #ccc;
}

.pcdy-catbox-list li:last-child {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   面包屑 (list / show 共用)
   -------------------------------------------------------------------------- */
.pcdy-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 10px 16px;
    background: var(--pcdy-yellow);
    border: 2px solid var(--pcdy-ink);
    border-radius: 4px 14px 4px 14px;
}

.pcdy-crumb-sep {
    color: #555;
}

.pcdy-crumb-cur {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   列表页
   -------------------------------------------------------------------------- */
.pcdy-list-layout {
    display: flex;
    align-items: flex-start;
    gap: 26px;
}

.pcdy-list-main {
    flex: 3;
    min-width: 0;
}

.pcdy-list-title {
    font-size: 26px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 3px solid var(--pcdy-ink);
}

.pcdy-list-articles li.pcdy-list-item {
    list-style: none;
    border: 2px solid var(--pcdy-ink);
    border-radius: 4px 16px 4px 16px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--pcdy-paper);
    transition: transform .18s ease, box-shadow .18s ease;
}

.pcdy-list-articles li.pcdy-list-item:hover {
    transform: rotate(-.6deg);
    box-shadow: 5px 5px 0 var(--pcdy-pink);
}

.pcdy-list-item-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--pcdy-ink);
    display: block;
    margin-bottom: 6px;
}

.pcdy-list-item-title:hover {
    color: var(--pcdy-pink);
}

.pcdy-list-item-info {
    font-size: 13px;
    color: #444;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pcdy-list-item-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #777;
}

.pcdy-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.pcdy-page-btn {
    display: inline-block;
    padding: 8px 14px;
    border: 2px solid var(--pcdy-ink);
    border-radius: 10px 3px 10px 3px;
    font-weight: 700;
    font-size: 13px;
    background: var(--pcdy-paper);
    color: var(--pcdy-ink);
}

.pcdy-page-btn:hover {
    background: var(--pcdy-blue);
    color: var(--pcdy-paper);
}

/* --------------------------------------------------------------------------
   详情页
   -------------------------------------------------------------------------- */
.pcdy-show-layout {
    display: flex;
    align-items: flex-start;
    gap: 26px;
}

.pcdy-show-main {
    flex: 3;
    min-width: 0;
    background: var(--pcdy-paper);
    border: 3px solid var(--pcdy-ink);
    border-radius: 4px 22px 4px 22px;
    padding: 24px 28px;
    box-shadow: 8px 8px 0 var(--pcdy-yellow);
}

.pcdy-show-title {
    font-size: 27px;
    line-height: 1.4;
    margin-bottom: 14px;
}

.pcdy-show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #666;
    border-bottom: 2px dashed var(--pcdy-ink);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.pcdy-show-summary {
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 222, 89, 0.35);
    border-left: 4px solid var(--pcdy-pink);
    padding: 10px 14px;
    margin-bottom: 20px;
}

.pcdy-show-body {
    font-size: 16px;
    line-height: 1.9;
    color: #222;
}

.pcdy-show-body img {
    border: 2px solid var(--pcdy-ink);
    border-radius: 6px;
    margin: 10px 0;
}

.pcdy-show-flip {
    display: flex;
    gap: 16px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 3px solid var(--pcdy-ink);
}

.pcdy-flip-prev,
.pcdy-flip-next {
    flex: 1;
    min-width: 0;
    border: 2px solid var(--pcdy-ink);
    border-radius: 4px 14px 4px 14px;
    padding: 10px 14px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcdy-flip-tag {
    display: inline-block;
    font-weight: 800;
    color: var(--pcdy-paper);
    background: var(--pcdy-blue);
    border-radius: 8px 8px 8px 2px;
    padding: 1px 8px;
    margin-right: 8px;
    font-size: 11px;
}

.pcdy-flip-next .pcdy-flip-tag {
    background: var(--pcdy-pink);
    border-radius: 8px 8px 2px 8px;
}

/* --------------------------------------------------------------------------
   footer
   -------------------------------------------------------------------------- */
.pcdy-footer {
    background: var(--pcdy-ink);
    color: #eee;
    border-top: 4px solid var(--pcdy-pink);
    padding: 28px 20px 20px;
}

.pcdy-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
}

.pcdy-linkboard {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    border-bottom: 1px solid #444;
    padding-bottom: 18px;
    margin-bottom: 16px;
}

.pcdy-linkgroup {
    flex: 1;
    min-width: 200px;
}

.pcdy-linkgroup-title {
    display: block;
    font-weight: 800;
    color: var(--pcdy-yellow);
    margin-bottom: 8px;
    font-size: 13px;
}

.pcdy-linkgroup-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pcdy-linkgroup-body a {
    font-size: 12px;
    color: #ccc;
}

.pcdy-linkgroup-body a:hover {
    color: var(--pcdy-blue);
}

.pcdy-copyright {
    text-align: center;
    font-size: 12px;
    color: #999;
}

.pcdy-copyright-line {
    margin: 0 0 4px;
}

.pcdy-beian-line {
    margin: 0 0 4px;
}

.pcdy-beian-line a {
    color: #999;
}

.pcdy-stat-slot {
    font-size: 0;
}

/* --------------------------------------------------------------------------
   响应式断点: ~1024 / ~768 / ~480
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .pcdy-waterfall {
        columns: 3;
    }
}

@media (max-width: 1024px) {
    .pcdy-index-layout,
    .pcdy-list-layout,
    .pcdy-show-layout {
        flex-wrap: wrap;
    }

    .pcdy-side {
        max-width: 100%;
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .pcdy-logo-row {
        justify-content: center;
        text-align: center;
    }

    .pcdy-tagline {
        max-width: 100%;
        white-space: normal;
    }

    .pcdy-nav-list {
        justify-content: center;
    }

    .pcdy-show-main {
        padding: 18px;
    }

    .pcdy-shape {
        display: none;
    }
}

@media (max-width: 480px) {
    .pcdy-waterfall {
        columns: 1;
    }

    .pcdy-main {
        padding: 18px 12px 36px;
    }

    .pcdy-nav-list .pcdy-nav-item a {
        padding: 10px 14px;
        font-size: 13px;
    }

    .pcdy-show-flip {
        flex-direction: column;
    }

    .pcdy-list-title,
    .pcdy-show-title {
        font-size: 21px;
    }
}
