@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

:root {
    --bg: #0f1115;
    --bg2: #090a0d;
    --panel: rgba(28, 31, 38, .78);
    --line: rgba(255, 255, 255, .10);
    --line2: rgba(255, 255, 255, .14);
    --text: #e7e7ea;
    --muted: rgba(231, 231, 234, .70);

    --gold: #ffc107;
    --gold10: rgba(255, 193, 7, .10);
    --gold18: rgba(255, 193, 7, .18);
    --gold28: rgba(255, 193, 7, .28);

    --green: #61d97c;
    --green12: rgba(97, 217, 124, .12);

    --red: #ff5252;
    --red12: rgba(255, 82, 82, .12);

    --shadow: 0 16px 40px rgba(0, 0, 0, .50);
    --r: 16px;
}

.dl2 {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px;
}

/* ================= HERO ================= */
.dl2-hero {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    padding: 26px 26px;
    background:
        radial-gradient(1200px 520px at 20% 0%, rgba(255, 193, 7, .10), transparent 55%),
        radial-gradient(900px 420px at 80% 10%, rgba(97, 217, 124, .08), transparent 55%),
        linear-gradient(180deg, var(--bg2) 0%, var(--bg) 60%, var(--bg2) 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow);
    min-height: 330px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 12px;
}

.dl2-hero-left {
    position: relative;
    z-index: 2;
}

.dl2-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: .9rem;
    color: var(--muted);
}

.dl2-breadcrumb a {
    color: rgba(255, 193, 7, .92);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 193, 7, .35);
}

.dl2-breadcrumb a:hover {
    border-bottom-color: rgba(255, 193, 7, .75);
}

.dl2-breadcrumb span {
    opacity: .85;
}

.dl2-title {
    margin: 0;
    font-size: 2.35rem;
    letter-spacing: 2px;
    font-weight: 900;
}

.dl2-sub {
    margin-top: 6px;
    color: var(--muted);
    font-size: .98rem;
}

.dl2-bullets {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 560px;
}

.dl2-bullet {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    line-height: 1.75;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .30);
}

.dl2-bullet .dot {
    color: rgba(255, 255, 255, .8);
    margin-right: 6px;
}

.dl2-bullet a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 193, 7, .35);
}

.dl2-bullet a:hover {
    border-bottom-color: rgba(255, 193, 7, .80);
}

.dl2-bullet .hl {
    color: #fff;
    background: rgba(255, 193, 7, .18);
    border: 1px solid rgba(255, 193, 7, .22);
    padding: 0 .35em;
    border-radius: 8px;
}

.dl2-hero-right {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dl2-angel {
    width: min(520px, 42vw);
    max-width: 520px;
    height: auto;
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 24px 28px rgba(0, 0, 0, .55));
    transform-origin: center;
}

.dl2-angel-glow {
    position: absolute;
    right: 18%;
    top: 22%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 193, 7, .28), transparent 65%);
    filter: blur(10px);
    opacity: 0;
    pointer-events: none;
}

/* ================= 卡片（主/輔） ================= */
.dl2-card {
    margin-top: 14px;
    border-radius: var(--r);
    border: 1px solid rgba(255, 255, 255, .10);
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dl2-card-head {
    padding: 16px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.dl2-card-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: rgba(255, 255, 255, .95);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag {
    font-size: .85rem;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 193, 7, .22);
    background: rgba(255, 193, 7, .12);
    color: #fff;
}

.tag.sub {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .85);
}

.dl2-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    font-size: .85rem;
    font-weight: 900;
    color: rgba(255, 255, 255, .86);
}

.pill.gold {
    border-color: rgba(255, 193, 7, .22);
    background: rgba(255, 193, 7, .10);
    color: #fff;
}

.pill.red {
    border-color: rgba(255, 82, 82, .22);
    background: rgba(255, 82, 82, .10);
}

.dl2-card-main .dl2-btns {
    padding: 14px 16px 0;
}

.dl2-card-main .dl2-notes {
    padding: 12px 16px 16px;
}

.dl2-card-sub summary {
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.dl2-card-sub summary::-webkit-details-marker {
    display: none;
}

.dl2-card-sub {
    opacity: .96;
}

.dl2-card-sub .dl2-card-body {
    padding: 0 16px 16px;
}

.dl2-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dl2-btn {
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
    font-weight: 900;
    transition: transform .14s ease, background .18s ease, border-color .18s ease;
}

.dl2-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 193, 7, .22);
    background: rgba(255, 193, 7, .08);
}

.dl2-btn.primary {
    border-color: rgba(255, 193, 7, .26);
    background: rgba(255, 193, 7, .13);
    color: #fff;
}

.dl2-btn.primary:hover {
    border-color: rgba(255, 193, 7, .38);
    background: rgba(255, 193, 7, .20);
}

.dl2-btn.ghost {
    border-color: rgba(97, 217, 124, .18);
    background: rgba(97, 217, 124, .06);
}

.dl2-btn.ghost:hover {
    border-color: rgba(97, 217, 124, .28);
    background: rgba(97, 217, 124, .10);
}

.dl2-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.note {
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
    color: rgba(255, 255, 255, .88);
    line-height: 1.7;
}

.note.ok {
    border-color: rgba(97, 217, 124, .18);
    background: rgba(97, 217, 124, .08);
}

.note.warn {
    border-color: rgba(255, 82, 82, .22);
    background: rgba(255, 82, 82, .10);
}

.note.help a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 193, 7, .35);
}

.note.help a:hover {
    border-bottom-color: rgba(255, 193, 7, .80);
}

/* Footer */
.dl2-footer-warn {
    margin-top: 14px;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 82, 82, .22);
    background: rgba(255, 82, 82, .10);
    color: rgba(255, 255, 255, .92);
    text-align: center;
    font-weight: 900;
}

/* ================= 進場動畫（不模糊：淡入+位移） ================= */
.js-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .9s ease, transform .9s ease;
}

.is-show {
    opacity: 1;
    transform: translateY(0);
}

/* 天使：右側滑入+淡入+微放大（不模糊） */
.dl2-angel.js-reveal {
    opacity: 0;
    transform: translateX(48px) scale(.98);
    transition: opacity 1.2s ease, transform 1.2s ease;
    transition-delay: .12s;
}

.dl2-angel.is-show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* 光暈：允許 blur（效果用），但不做內容模糊 */
.dl2-angel-glow.js-reveal {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
    transition-delay: .20s;
}

.dl2-angel-glow.is-show {
    opacity: 1;
    transform: translateX(0);
}

/* 尊重減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
    .js-reveal {
        transition: none;
    }
}

/* RWD */
@media (max-width: 980px) {
    .dl2-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 18px;
    }

    .dl2-hero-right {
        order: -1;
        justify-content: flex-end;
        padding-top: 6px;
    }

    .dl2-angel {
        width: min(520px, 78vw);
    }

    .dl2-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 520px) {
    .dl2 {
        padding: 12px;
    }

    .dl2-btns {
        grid-template-columns: 1fr;
    }
}

/* ================= Modal（下載頁彈跳視窗） ================= */
.dl2-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.dl2-modal[aria-hidden="false"] {
    display: block;
}

.dl2-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .60);
    backdrop-filter: blur(6px);
}

.dl2-modal-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(860px, calc(100vw - 24px));
    max-height: calc(75vh - 24px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(28, 31, 38, .92);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dl2-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    flex: 0 0 auto;
}

.dl2-modal-title {
    font-weight: 900;
    color: rgba(255, 255, 255, .92);
}

.dl2-modal-x {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .90);
    cursor: pointer;
}

.dl2-modal-x:hover {
    border-color: rgba(255, 193, 7, .22);
    background: rgba(255, 193, 7, .08);
}

/* ✅ 內文可捲動：避免超出範圍 */
.dl2-modal-body {
    padding: 14px 16px;
    color: rgba(231, 231, 234, .90);
    line-height: 1.75;
    overflow: auto;
    flex: 1 1 auto;
    max-height: calc(100vh - 180px);
}

.dl2-modal-body h1,
.dl2-modal-body h2 {
    margin: 10px 0 10px;
    font-weight: 900;
    color: rgba(255, 255, 255, .95);
}

.dl2-modal-body h1 {
    font-size: 1.35rem;
}

.dl2-modal-body h2 {
    font-size: 1.05rem;
}

/* 教學圖片：自動縮放，避免撐爆 */
.dl2-modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    margin: 10px 0 14px;
}

.dl2-modal-foot {
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, .10);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex: 0 0 auto;
    background: rgba(0, 0, 0, .10);
}

/* 桌機：讓主要 CTA 更寬 */
.dl2-modal-foot {
    gap: 12px;
}

.dl2-modal-btn.big {
    min-width: 280px;
}

.dl2-modal-btn {
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .88);
    font-weight: 900;
    cursor: pointer;
}

.dl2-modal-btn:hover {
    border-color: rgba(255, 193, 7, .22);
    background: rgba(255, 193, 7, .08);
}

.dl2-modal-btn.primary {
    border-color: rgba(255, 193, 7, .26);
    background: rgba(255, 193, 7, .13);
    color: #fff;
}

.dl2-modal-btn.primary:hover {
    border-color: rgba(255, 193, 7, .38);
    background: rgba(255, 193, 7, .20);
}

/* 教學框（安裝教學用） */
.dl2-teach-box {
    line-height: 1.8;
    margin: 14px 0 6px;
    padding: 12px;
    border: 1px solid rgba(255, 193, 7, .55);
    border-radius: 12px;
    color: rgba(255, 255, 255, .92);
    font-size: 1rem;
    background: rgba(0, 0, 0, .35);
}

.dl2-teach-box hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, .10);
    margin: 10px 0;
}

@media (max-width: 520px) {
    .dl2-modal-body {
        padding: 12px 12px;
    }

    .dl2-modal-foot {
        justify-content: stretch;
    }

    .dl2-modal-btn {
        flex: 1 1 auto;
    }
}

/* Modal 主要 CTA：繼續下載（更大更顯眼） */
.dl2-modal-btn.big {
    height: 54px;
    min-width: 220px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: .5px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
}

/* 主要 CTA 滿版（在手機/窄視窗特別顯眼） */
@media (max-width: 520px) {
    .dl2-modal-btn.big {
        width: 100%;
        justify-content: center;
    }
}

/* Modal 底部：兩顆按鈕同高同寬 */
.dl2-modal-foot{
  display: flex;
  gap: 12px;
  justify-content: stretch;
}

.dl2-modal-foot .dl2-modal-btn{
  flex: 1;              /* ✅ 等寬 */
  height: 54px;         /* ✅ 同高 */
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .4px;
}

/* 關閉做成次要按鈕：更低調但尺寸一樣 */
.dl2-modal-foot .dl2-modal-btn.close{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: rgba(255,255,255,.88);
}
.dl2-modal-foot .dl2-modal-btn.close:hover{
  border-color: rgba(255,193,7,.22);
  background: rgba(255,193,7,.08);
}

/* 繼續下載：保持最顯眼 */
.dl2-modal-foot .dl2-modal-btn.primary{
  box-shadow: 0 14px 30px rgba(0,0,0,.45);
}
