/* 学习卡片（yw97 / 语文网）静态演示页样式
   仅作用于 .xx-* 命名空间，避免影响站点其它页面 */

.xx-page .main-content .card {
    overflow: hidden;
}

/* ── 顶部主视觉 ─────────────────────────────────────────── */
.xx-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 36px;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(120deg, #3f2b78 0%, #4e368c 42%, #7a5cb4 100%);
    color: #fff;
}

.xx-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.xx-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.xx-eyebrow {
    display: inline-block;
    padding: 3px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 1px;
    color: #f3ecff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.xx-hero h1 {
    font-size: 30px;
    line-height: 1.32;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.xx-hero p {
    font-size: 14px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.86);
}

.xx-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.xx-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #4e368c;
    background: #fff;
    box-shadow: 0 6px 16px rgba(24, 12, 54, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.xx-btn:hover {
    color: #4e368c;
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(24, 12, 54, 0.3);
}

.xx-demo-badge {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px dashed rgba(255, 255, 255, 0.45);
}

/* 卡片叠放装饰 */
.xx-hero-deck {
    position: relative;
    z-index: 1;
    flex: 0 0 300px;
    height: 240px;
}

.xx-deck-card {
    position: absolute;
    top: 28px;
    left: 0;
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 30px rgba(16, 8, 40, 0.38);
    border: 3px solid #fff;
}

.xx-deck-1 {
    left: 4px;
    transform: rotate(-10deg);
    opacity: 0.96;
}

.xx-deck-2 {
    left: 84px;
    transform: translateY(-8px);
    z-index: 2;
}

.xx-deck-3 {
    left: 164px;
    transform: rotate(9deg);
    opacity: 0.96;
}

/* ── 数据条 ─────────────────────────────────────────────── */
.xx-stats {
    display: flex;
    flex-wrap: wrap;
    padding: 16px 10px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #fff;
}

.xx-stat {
    flex: 1 1 20%;
    min-width: 110px;
    padding: 4px 18px;
    border-right: 1px solid #f0edf6;
    text-align: center;
}

.xx-stat:last-child {
    border-right: 0;
}

.xx-stat strong {
    display: block;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--color-primary, #4e368c);
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.xx-stat span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #8a8496;
}

.xx-stat-wide strong {
    color: #b07c2e;
}

/* ── 分类筛选 ───────────────────────────────────────────── */
.xx-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px 4px;
}

.xx-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: #5b5470;
    background: #f7f5fb;
    border: 1px solid #ece7f6;
    cursor: pointer;
    outline: none;
    transition: all 0.18s ease;
    font-family: inherit;
}

.xx-tab:hover {
    color: var(--color-primary, #4e368c);
    border-color: #cfc2ea;
    background: #f1ebfb;
}

.xx-tab.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(120deg, #4e368c, #7a5cb4);
    box-shadow: 0 4px 12px rgba(78, 54, 140, 0.24);
}

.xx-header-hint {
    font-size: 12px;
    color: #9b95a8;
}

/* ── 卡片网格 ───────────────────────────────────────────── */
.xx-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 14px 20px 24px;
}

.xx-item {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid #eeeaf5;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    cursor: zoom-in;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.xx-item:hover,
.xx-item:focus-visible {
    transform: translateY(-4px);
    border-color: #d8cdef;
    box-shadow: 0 14px 28px rgba(78, 54, 140, 0.14);
    outline: none;
}

.xx-thumb {
    position: relative;
    background: #f6f3fa;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.xx-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.xx-item:hover .xx-thumb img {
    transform: scale(1.025);
}

.xx-chip {
    position: absolute;
    top: 9px;
    left: 9px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #4e368c;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 6px rgba(30, 18, 60, 0.16);
    backdrop-filter: blur(2px);
}

.xx-chip-ci {
    color: #b0455c;
}

.xx-chip-chengyu {
    color: #9a6a1c;
}

.xx-chip-author {
    color: #2f7e6e;
}

.xx-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 13px 11px;
}

.xx-name {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.xx-name h3 {
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
    color: #2c2438;
}

.xx-name span {
    font-size: 12px;
    color: #8d84a0;
    letter-spacing: 0.2px;
}

.xx-summary {
    margin: 7px 0 9px;
    font-size: 12.5px;
    line-height: 1.65;
    color: #6d6579;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xx-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.xx-tags span {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--color-primary, #4e368c);
    background: #f5f1fc;
    border: 1px solid #ece4f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.xx-item.is-hidden {
    display: none;
}

.xx-empty {
    padding: 30px 20px 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ── 侧栏 ───────────────────────────────────────────────── */
.xx-sidebar .xx-type-list {
    padding: 12px 0 6px;
}

.xx-type-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 2px;
    border-bottom: 1px dashed #f1eef7;
    font-size: 14px;
    color: #4a4358;
    transition: color 0.18s ease;
}

.xx-type-row:last-of-type {
    border-bottom: 0;
}

.xx-type-row:hover {
    color: var(--color-primary, #4e368c);
}

.xx-type-row-name {
    flex: 1;
}

.xx-type-row em {
    font-style: normal;
    font-size: 12px;
    color: #9b93ab;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.xx-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b4ea7;
}

.xx-dot-ci {
    background: #c2586b;
}

.xx-dot-chengyu {
    background: #b07c2e;
}

.xx-dot-author {
    background: #2f7e6e;
}

.xx-type-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f0f8;
    font-size: 12px;
    color: #8a8496;
    text-align: center;
}

.xx-type-total strong {
    color: var(--color-primary, #4e368c);
}

.xx-tips ul li {
    position: relative;
    padding: 0 0 10px 14px;
    font-size: 13px;
    line-height: 1.75;
    color: #635b70;
}

.xx-tips ul li:last-child {
    padding-bottom: 0;
}

.xx-tips ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d8cdeb;
}

.xx-tips strong {
    color: #3d3350;
}

/* ── 一张卡片包含什么 ───────────────────────────────────── */
.xx-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 16px 20px 22px;
}

.xx-feature {
    padding: 16px 18px;
    border-radius: 10px;
    background: #faf8fe;
    border: 1px solid #f0ecf8;
}

.xx-feature-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.xx-feature-head .xx-dot {
    width: 9px;
    height: 9px;
}

.xx-feature-head h3 {
    font-size: 16px;
    font-weight: 800;
    color: #3d3350;
}

.xx-feature-intro {
    margin: 8px 0 10px;
    font-size: 12.5px;
    line-height: 1.75;
    color: #6d6579;
}

.xx-feature ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.xx-feature ul li {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    color: #5a4b7c;
    background: #fff;
    border: 1px solid #ece5f8;
}

/* ── 大图预览 ───────────────────────────────────────────── */
.xx-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    background: rgba(22, 14, 44, 0.86);
    backdrop-filter: blur(3px);
    animation: xxFade 0.2s ease;
}

.xx-lightbox[hidden] {
    display: none;
}

.xx-lb-figure {
    margin: 0;
    max-width: 92vw;
    text-align: center;
}

.xx-lb-figure img {
    display: block;
    max-width: 92vw;
    max-height: 80vh;
    margin: 0 auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.xx-lb-figure figcaption {
    margin-top: 14px;
    color: #fff;
}

.xx-lb-figure figcaption strong {
    display: block;
    font-size: 17px;
    letter-spacing: 1px;
}

.xx-lb-figure figcaption span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.xx-lb-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    transition: background 0.18s ease;
}

.xx-lb-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.xx-lock {
    overflow: hidden;
}

@keyframes xxFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── 响应式 ─────────────────────────────────────────────── */
@media screen and (max-width: 1200px) {
    .xx-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .xx-hero {
        padding: 28px 26px;
    }

    .xx-hero h1 {
        font-size: 26px;
    }

    .xx-hero-deck {
        flex: 0 0 252px;
        height: 210px;
    }

    .xx-deck-card {
        top: 24px;
        width: 100px;
        height: 150px;
    }

    .xx-deck-1 {
        left: 2px;
    }

    .xx-deck-2 {
        left: 70px;
    }

    .xx-deck-3 {
        left: 138px;
    }
}

@media screen and (max-width: 1024px) {
    .xx-page .main-box {
        display: block;
    }

    .xx-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .xx-hero-deck {
        display: none;
    }

    .xx-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 14px;
    }

    .xx-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
        width: 100%;
        margin-top: 15px;
    }

    .xx-sidebar .card {
        margin-bottom: 0;
    }

    .xx-stat {
        flex: 1 1 33.33%;
        border-right: 0;
        padding: 8px 6px;
    }
}

@media screen and (max-width: 767px) {
    .xx-hero {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .xx-hero h1 {
        font-size: 22px;
    }

    .xx-hero p {
        font-size: 13px;
    }

    .xx-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 12px;
    }

    .xx-name h3 {
        font-size: 17px;
    }

    .xx-stats {
        padding: 10px 4px;
    }

    .xx-stat {
        flex: 1 1 50%;
        min-width: 0;
    }

    .xx-stat strong {
        font-size: 20px;
    }

    .xx-sidebar {
        grid-template-columns: 1fr;
    }

    .xx-features {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .xx-toolbar {
        padding: 12px 14px 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xx-item,
    .xx-item:hover,
    .xx-thumb img,
    .xx-btn {
        transition: none;
        transform: none;
    }

    .xx-lightbox {
        animation: none;
    }
}

/* 卡片下方类型链接（汉字/词语/成语/诗词/翻译） */
.xx-item .xx-links{margin-top:8px;padding-top:8px;border-top:1px dashed #efeae1;display:flex;gap:12px;font-size:12.5px}
.xx-item .xx-links a{color:#b5573a;text-decoration:none;position:relative;z-index:2}
.xx-item .xx-links a:hover{text-decoration:underline}

/* 卡片标题即详情入口 */
.xx-name-link{color:inherit;text-decoration:none}
.xx-name-link h3{transition:color .15s}
.xx-name-link:hover h3{color:#b5573a}
