/* ===== 真题预测 · 2026 月历（胖橘雅思教研组）===== */

/* 月历网格 */
.pj-month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

@media (max-width: 720px) {
    .pj-month-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.pj-month-card {
    background: #ffffff;
    border: 1.5px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 16px 16px 12px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pj-month-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12); }

/* 月份头部 */
.pj-month-head { display: flex; align-items: center; justify-content: space-between; }
.pj-month-num { font-size: 1.35rem; font-weight: 700; color: #0f172a; }

/* 三科预览 */
.pj-month-subjects { display: flex; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: #64748b; }

/* 底部说明 */
.pj-month-foot { font-size: .74rem; color: #94a3b8; border-top: 1px dashed rgba(15,23,42,.1); padding-top: 8px; }

/* 状态徽标 */
.pj-badge { font-size: .68rem; padding: 2px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.pj-badge--past    { background: #e2e8f0; color: #94a3b8; }
.pj-badge--current { background: #ff6a00; color: #fff; animation: pjPulse 2s ease-in-out infinite; }
.pj-badge--future  { background: #e0f2fe; color: #0284c7; }
.pj-badge--updated { background: #ff6a00; color: #fff; }
.pj-badge--pending { background: #e2e8f0; color: #94a3b8; }

@keyframes pjPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 106, 0, .45); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 106, 0, 0); }
}

/* 已过期月份：整体变暗变灰 */
.pj-month--past {
    filter: grayscale(.85);
    opacity: .45;
}
.pj-month--past:hover { opacity: .8; }

/* 当月高亮 */
.pj-month--current {
    border-color: #ff6a00;
    background: linear-gradient(180deg, #fff7f0 0%, #ffffff 55%);
    box-shadow: 0 6px 20px rgba(255, 106, 0, .18);
}

/* ===== 月份详情 ===== */
.pj-detail-head { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.pj-detail-head h3 { margin: 0; font-size: 1.2rem; color: #0f172a; }

/* 返回按钮：右上角 + 橙色高亮 */
.pj-back {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: linear-gradient(135deg, #ff8a00, #ff6a00);
    color: #fff;
    border-radius: 10px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: .86rem;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(255, 106, 0, .3);
    transition: opacity .15s ease, transform .15s ease;
}
.pj-back:hover { opacity: .88; }

/* 窄屏：返回按钮回到文档流右侧，避免与标题重叠 */
@media (max-width: 560px) {
    .pj-back { position: static; transform: none; order: 3; margin-left: auto; }
}

.pj-subject-block {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
}
.pj-subject-block h4 { margin: 0 0 10px; font-size: 1rem; color: #0f172a; }

.pj-items { margin: 0; padding-left: 20px; }
.pj-items li { margin: 6px 0; line-height: 1.6; color: #334155; font-size: .9rem; }
.pj-items li small { display: block; color: #94a3b8; font-size: .78rem; margin-top: 2px; }

/* 资料链接（PDF / 音频） */
.pj-links { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 8px; vertical-align: middle; }
.pj-link {
    display: inline-block;
    border: 1px solid rgba(255, 106, 0, .35);
    background: #fff7f0;
    color: #d35400;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.pj-link:hover { background: #ff6a00; color: #fff; }
.pj-link--audio { border-color: rgba(2, 132, 199, .35); background: #f0f9ff; color: #0284c7; }
.pj-link--audio:hover { background: #0284c7; color: #fff; }

.pj-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: .85rem;
}

/* ===== 免责声明弹窗（复用 theme-modal 体系）===== */
#pj-disclaimer-modal .theme-modal-content { max-width: 460px; }

/* 标题居中（× 关闭钮固定右上角） */
#pj-disclaimer-modal .theme-modal-header { position: relative; justify-content: center; }
#pj-disclaimer-modal .theme-modal-header h3 { flex: 1; text-align: center; }
#pj-disclaimer-modal .theme-modal-close { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

/* 正文居中 */
.pj-disclaimer-body { font-size: .88rem; line-height: 1.9; color: #475569; text-align: center; }
.pj-disclaimer-body strong { color: #b45309; }

/* 按钮区：单按钮居中 */
.pj-disclaimer-actions { display: flex; justify-content: center; margin-top: 18px; }
.pj-disclaimer-actions .pj-btn-primary { padding: 10px 34px; font-size: .92rem; }

.pj-btn-primary, .pj-btn-ghost {
    border-radius: 10px;
    padding: 9px 18px;
    font-size: .88rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s ease;
}
.pj-btn-primary { border: none; background: linear-gradient(135deg, #ff8a00, #ff6a00); color: #fff; font-weight: 600; }
.pj-btn-ghost   { border: 1px solid rgba(15, 23, 42, .15); background: #fff; color: #64748b; }
.pj-btn-primary:hover, .pj-btn-ghost:hover { opacity: .85; }

/* ===== 资料在线查看弹窗 ===== */
#pj-file-modal { z-index: 2100; }
#pj-file-modal .pj-file-content {
    width: min(1000px, 94vw);
    height: min(90vh, 940px);
    max-height: 90vh;
    max-width: 94vw;
}
.pj-file-body { flex: 1; padding: 12px 16px 16px; overflow: hidden; display: flex; }
.pj-file-title {
    font-size: 1.15rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}
.pj-pdf-frame { flex: 1; width: 100%; height: 100%; border: none; border-radius: 12px; background: #f8fafc; }

/* PDF.js canvas 渲染区 */
.pj-pdf-wrap {
    flex: 1;
    overflow-y: auto;
    background: #e9edf2;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pj-pdf-wrap .pj-pdf-loading { margin: auto; color: #94a3b8; font-size: .9rem; }
.pj-pdf-wrap .pj-pdf-page {
    display: block;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
    margin-bottom: 12px;
    border-radius: 4px;
}
.pj-pdf-wrap .pj-pdf-error {
    margin: auto;
    color: #94a3b8;
    font-size: .85rem;
    padding: 24px;
    text-align: center;
}

/* ===== 加载态：等待卡片 + 进度条 ===== */
.pj-loader {
    margin: auto;
    width: min(360px, 92%);
    padding: 26px 24px 22px;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .09);
    border: 1px solid rgba(15, 23, 42, .05);
}
.pj-loader-icon {
    position: relative;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pj-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 106, 0, .14);
    border-top-color: #ff6a00;
    animation: pjSpin .9s linear infinite;
}
.pj-loader-emoji { font-size: 1.45rem; }
.pj-loader-title { font-size: .95rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; line-height: 1.5; }
.pj-loader-sub { font-size: .78rem; color: #64748b; min-height: 1.2em; line-height: 1.5; }
.pj-loader-bar {
    position: relative;
    height: 8px;
    margin: 16px 0 8px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}
.pj-loader-bar > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffb056, #ff6a00);
    transition: width .25s ease;
}
.pj-loader-bar.is-indeterminate > i {
    width: 40% !important;
    animation: pjSlide 1.15s ease-in-out infinite;
}
.pj-loader-pct {
    font-size: .74rem;
    font-weight: 700;
    color: #ff6a00;
    font-variant-numeric: tabular-nums;
    min-height: 1em;
}

/* 逐页渲染的细进度条（吸顶） */
.pj-render-progress {
    position: sticky;
    top: 0;
    z-index: 3;
    align-self: stretch;
    display: flex;
    align-items: center;
    height: 28px;
    padding: 0 14px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .93);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
    font-size: .74rem;
    color: #64748b;
    overflow: hidden;
    backdrop-filter: blur(6px);
}
.pj-render-progress > i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff8a00, #ff6a00);
    transition: width .2s ease;
}

@keyframes pjSpin { to { transform: rotate(360deg); } }
@keyframes pjSlide {
    0%   { transform: translateX(-110%); }
    100% { transform: translateX(260%); }
}

.pj-audio-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.pj-audio-icon { font-size: 3rem; }
.pj-audio-wrap audio { width: min(560px, 90%); }
.pj-audio-tip { margin: 0; font-size: .8rem; color: #94a3b8; }

/* 音频+试题 同屏：音频条固定在顶部，题目在下方向下滚动 */
.pj-audio-wrap.pj-audio--withpaper {
    justify-content: flex-start;
    align-items: stretch;   /* 覆盖父级 center，保证题目区占满宽度 */
    gap: 10px;
    width: 100%;
}
.pj-audio-wrap.pj-audio--withpaper .pj-audio-dock {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
    padding: 8px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
}
.pj-audio-wrap.pj-audio--withpaper audio {
    width: 100%;
    min-width: 200px;
    flex: 1 1 240px;
    height: 44px;
}
.pj-audio-wrap.pj-audio--withpaper .pj-audio-tip { white-space: nowrap; }
.pj-audio-state {
    font-size: .78rem;
    color: #ea580c;
    background: #ffedd5;
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
    animation: pjBlink 1.4s ease-in-out infinite;
}
.pj-audio-state.is-error { color: #b91c1c; background: #fee2e2; animation: none; }
@keyframes pjBlink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

@media (max-width: 720px) {
    #pj-file-modal .pj-file-content { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
    .pj-file-body { padding: 8px; }
}

/* ===== 答案核对确认弹窗 ===== */
#pj-answer-modal .theme-modal-content { max-width: 480px; }
#pj-answer-modal .theme-modal-header { justify-content: center; }
.pj-answer-body {
    font-size: .9rem;
    line-height: 1.9;
    color: #475569;
    text-align: center;
    padding: 18px 28px 6px;
}
.pj-answer-body strong { color: #b45309; }
.pj-answer-actions { display: flex; gap: 12px; justify-content: center; padding: 16px 28px 24px; }
