/* 恐龙小百科 /tool/dino-pedia */

.dp-mode {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--calc-soft, #f1f5f9);
    padding: 5px;
    border-radius: 12px;
}
.dp-mode button {
    flex: 1;
    padding: 10px 4px;
    border: none;
    border-radius: 9px;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--calc-muted, #64748b);
    cursor: pointer;
    transition: all .2s;
}
.dp-mode button.is-active {
    background: #fff;
    color: #16a34a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

/* 筛选 */
.dp-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dp-filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.dp-filter-row button {
    padding: 7px 14px;
    border-radius: 999px;
    border: 2px solid var(--calc-border, #e2e8f0);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--calc-text, #334155);
    cursor: pointer;
    transition: all .15s;
}
.dp-filter-row button.is-active {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

/* 图鉴网格 */
.dp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.dp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 6px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: var(--calc-soft, #f1f5f9);
    cursor: pointer;
    transition: all .15s;
}
.dp-card:hover, .dp-card:active {
    border-color: #16a34a;
    background: #f0fdf4;
    transform: translateY(-2px);
}
.dp-card-e { font-size: 38px; line-height: 1; }
.dp-card-n { font-size: 15px; font-weight: 800; color: var(--calc-text, #1e293b); }
.dp-card-t { font-size: 12px; color: var(--calc-muted, #64748b); }
.dp-empty { grid-column: 1 / -1; text-align: center; color: var(--calc-muted, #64748b); padding: 20px 0; }

/* 详情 */
.dp-detail-empty {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--calc-muted, #64748b);
    line-height: 2;
    padding: 40px 10px;
}
.dp-detail-empty small { font-size: 13px; font-weight: 400; }
.dp-dino { text-align: center; }
.dp-dino-e { font-size: 84px; line-height: 1; margin-bottom: 8px; }
.dp-dino-n { font-size: 26px; font-weight: 800; color: var(--calc-text, #1e293b); margin: 0 0 10px; }
.dp-dino-n small { font-size: 14px; color: var(--calc-muted, #94a3b8); font-weight: 500; }
.dp-dino-tags { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.dp-dino-tags span {
    padding: 5px 12px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 13px;
    font-weight: 700;
}
.dp-dino-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.dp-dino-stats > div {
    flex: 1;
    background: var(--calc-soft, #f1f5f9);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dp-dino-stats b { font-size: 13px; color: var(--calc-muted, #64748b); }
.dp-dino-stats span { font-size: 18px; font-weight: 800; color: var(--calc-text, #1e293b); }
.dp-dino-desc { font-size: 15px; line-height: 1.9; color: var(--calc-text, #334155); text-align: left; }
.dp-dino-fact {
    font-size: 14px;
    line-height: 1.8;
    color: var(--calc-text, #334155);
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    margin: 0 0 14px;
}

/* AI 故事 */
.dp-story { margin-top: 12px; }
.dp-story-loading, .dp-story-err { text-align: center; color: var(--calc-muted, #64748b); padding: 12px 0; font-weight: 600; }
.dp-story-card {
    background: var(--calc-soft, #f8fafc);
    border-radius: 14px;
    padding: 16px;
    text-align: left;
}
.dp-story-card h4 { margin: 0 0 8px; font-size: 18px; color: #15803d; }
.dp-story-card p { margin: 0 0 10px; font-size: 15px; line-height: 2; color: var(--calc-text, #334155); }
.dp-story-facts b { font-size: 14px; color: #15803d; }
.dp-story-facts ul { margin: 6px 0 0; padding-left: 18px; }
.dp-story-facts li { font-size: 14px; line-height: 1.8; color: var(--calc-text, #334155); }

/* 小测 */
.dp-quiz-intro { font-size: 15px; line-height: 1.8; color: var(--calc-text, #334155); }
.dp-quiz-btns { display: flex; flex-direction: column; gap: 10px; }
.dp-best { text-align: center; font-weight: 700; color: #16a34a; }
.dp-quiz-top {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: var(--calc-muted, #64748b);
    margin-bottom: 14px;
}
.dp-score b { color: #16a34a; font-size: 20px; }
.dp-question {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.6;
    color: var(--calc-text, #1e293b);
    text-align: center;
    padding: 18px 10px;
    background: var(--calc-soft, #f1f5f9);
    border-radius: 14px;
    margin-bottom: 12px;
}
.dp-answers { display: flex; flex-direction: column; gap: 10px; }
.dp-ans {
    padding: 14px 16px;
    border: 3px solid var(--calc-border, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    color: var(--calc-text, #334155);
    cursor: pointer;
    transition: all .15s;
    text-align: left;
}
.dp-ans:active { transform: scale(.98); }
.dp-ans.is-right { border-color: #22c55e; background: #f0fdf4; }
.dp-ans.is-wrong { border-color: #ef4444; background: #fef2f2; opacity: .65; }
.dp-why {
    font-size: 14px;
    line-height: 1.8;
    color: var(--calc-text, #334155);
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0;
}
.dp-end-stars { text-align: center; font-size: 46px; letter-spacing: 6px; margin: 10px 0; }
.dp-end-score { text-align: center; font-size: 22px; font-weight: 800; color: var(--calc-text, #334155); }
.dp-end-comment { text-align: center; color: var(--calc-muted, #64748b); line-height: 1.7; margin-bottom: 14px; }
#dpAgain { display: block; margin: 0 auto; }

@media (max-width: 640px) {
    .dp-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 黑夜模式 */
body.dark-mode .dp-mode { background: #1e293b; }
body.dark-mode .dp-mode button { color: #94a3b8; }
body.dark-mode .dp-mode button.is-active { background: #0f172a; color: #4ade80; }
body.dark-mode .dp-filter-row button { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-mode .dp-filter-row button.is-active { background: #15803d; border-color: #15803d; color: #fff; }
body.dark-mode .dp-card { background: #1e293b; }
body.dark-mode .dp-card:hover, body.dark-mode .dp-card:active { background: #052e16; border-color: #22c55e; }
body.dark-mode .dp-card-n { color: #e2e8f0; }
body.dark-mode .dp-dino-n { color: #e2e8f0; }
body.dark-mode .dp-dino-tags span { background: #052e16; color: #4ade80; }
body.dark-mode .dp-dino-stats > div { background: #1e293b; }
body.dark-mode .dp-dino-stats span { color: #e2e8f0; }
body.dark-mode .dp-dino-desc, body.dark-mode .dp-dino-fact { color: #cbd5e1; }
body.dark-mode .dp-dino-fact { background: #292217; border-color: #a16207; }
body.dark-mode .dp-story-card { background: #1e293b; }
body.dark-mode .dp-story-card p, body.dark-mode .dp-story-facts li { color: #cbd5e1; }
body.dark-mode .dp-quiz-intro { color: #cbd5e1; }
body.dark-mode .dp-question { background: #1e293b; color: #e2e8f0; }
body.dark-mode .dp-ans { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-mode .dp-ans.is-right { background: #052e16; border-color: #22c55e; }
body.dark-mode .dp-ans.is-wrong { background: #2a0a0a; border-color: #ef4444; }
body.dark-mode .dp-why { background: #052e16; border-color: #14532d; color: #cbd5e1; }
body.dark-mode .dp-end-score { color: #e2e8f0; }
