@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@600;700;900&display=swap');

:root {
    /* Color Palette - Inspired by Professional AI/Academic Sites */
    --primary: #1b2f58;       /* Deep Navy Blue */
    --primary-light: #243d72;
    --accent: #d4b106;        /* Professional Gold */
    --bg-main: #ffffff;
    --bg-secondary: #f0f5ff;  /* Soft Tech Blue */
    --text-main: #141414;
    --text-muted: #595959;
    --border-color: #d9d9d9;
    --white: #ffffff;
    
    /* Design Tokens */
    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-soft: 0 8px 24px rgba(0, 58, 140, 0.08);
    --shadow-heavy: 0 12px 48px rgba(0, 0, 0, 0.12);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* 2.5D 幾何系統新增變數 */
    --geo-ink:       #1a1a2e;
    --geo-gold-fill: rgba(212, 177, 6, 0.12);
    --geo-ink-fill:  rgba(26, 26, 46, 0.06);
    --paper-white:   #fdf8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif-font {
    font-family: 'Noto Serif TC', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header & Navigation --- */
header {
    background: var(--primary);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 2000;
}

header > .container {
    max-width: none;
    padding: 0 2.5rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}


.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(0, 58, 140, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 58, 140, 0.4);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--white);
}

.btn-accent:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

/* --- Cards & Layout --- */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-heavy);
}

/* --- 首頁限定：2.5D 卡片風格 ---
   意圖：使用 0.3s ease-out（較基礎 .card 的 0.4s cubic-bezier 更俐落），
   刻意給首頁卡片更快的 snappy 觸感，以呼應 2.5D 互動風格。
   其他頁面的 .card 維持原有 transition。
   ------------------------------------------------------------------ */
body.page-home .card {
    border-left: 3px solid var(--accent);
    box-shadow: 6px 6px 0 rgba(0, 58, 140, 0.08), 0 2px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

#about .card {
    border: 2px solid var(--primary);
    border-radius: 50px;
    box-shadow: 0 0 0 6px rgba(27, 47, 88, 0.07), 0 4px 24px rgba(0, 0, 0, 0.07);
    padding: 3rem 3.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#about .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 0 6px rgba(27, 47, 88, 0.1), 0 16px 40px rgba(0, 0, 0, 0.12);
}

body.page-home .card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 rgba(0, 58, 140, 0.10), 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* --- Hero Section --- */
.hero {
    min-height: 88vh;
    /* 天藍水彩：明亮天空藍，帶水彩暈染層次 */
    background:
        radial-gradient(ellipse 70% 55% at 8%  20%,  rgba(255,255,255,0.22) 0%, transparent 60%),
        radial-gradient(ellipse 55% 65% at 88% 15%,  rgba(130,210,255,0.25) 0%, transparent 55%),
        radial-gradient(ellipse 80% 45% at 50% 95%,  rgba(30,100,170,0.28)  0%, transparent 60%),
        radial-gradient(ellipse 60% 70% at 85% 80%,  rgba(50,130,200,0.22)  0%, transparent 55%),
        radial-gradient(ellipse 45% 50% at 20% 75%,  rgba(80,170,230,0.18)  0%, transparent 55%),
        linear-gradient(170deg, #7ec8e3 0%, #5ab4d8 22%, #3a9ec8 48%, #2d8bb8 70%, #4aaad5 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-bottom: none;
}

/* 水彩暈染裝飾層 */
.hero-ink {
    position: absolute;
    pointer-events: none;
    border-radius: 40% 60% 55% 45% / 50% 45% 60% 50%;
    filter: blur(40px);
    z-index: 1;
}
.hero-ink.ink-1 {
    /* 左上：淡白雲霧 */
    width: 500px; height: 340px;
    top: -80px; left: -100px;
    background: radial-gradient(ellipse at 45% 55%, rgba(255,255,255,0.35), rgba(200,235,255,0.12) 65%, transparent);
    transform: rotate(-12deg);
}
.hero-ink.ink-2 {
    /* 右側：深藍水墨 */
    width: 360px; height: 440px;
    top: 15%; right: -70px;
    background: radial-gradient(ellipse at 50% 45%, rgba(20,80,140,0.3), rgba(10,55,110,0.08) 65%, transparent);
    transform: rotate(8deg);
    border-radius: 55% 45% 40% 60% / 45% 60% 40% 55%;
}
.hero-ink.ink-3 {
    /* 中下：暖金光暈，點綴詩意 */
    width: 520px; height: 240px;
    bottom: 6%; left: 20%;
    background: radial-gradient(ellipse at 50% 50%, rgba(220,175,50,0.16), rgba(200,150,20,0.07) 55%, transparent);
    filter: blur(30px);
    border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
}
.hero-ink.ink-4 {
    /* 左中：淺青水彩暈 */
    width: 320px; height: 320px;
    top: 38%; left: 3%;
    background: radial-gradient(ellipse at 50% 50%, rgba(160,230,255,0.2), transparent 65%);
    filter: blur(48px);
}

/* 漂浮的古詩字符裝飾 */
.hero-poetry-bg {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.hero-poetry-bg span {
    position: absolute;
    font-family: 'Noto Serif TC', serif;
    color: rgba(10,50,90,0.09);
    line-height: 1;
    user-select: none;
    animation: inkDrift ease-in-out infinite;
}
/* 凌亂散布，覆蓋左側 1/4 畫面（left 0~22%），大小/位置不規律 */
.hero-poetry-bg .pc-1  { font-size: 10rem; top: 3%;  left: 1%;   transform: rotate(-6deg);  animation-duration: 28s; animation-delay: 0s; }
.hero-poetry-bg .pc-2  { font-size: 5rem;  top: 8%;  left: 16%;  transform: rotate(4deg);   animation-duration: 34s; animation-delay: -8s; }
.hero-poetry-bg .pc-3  { font-size: 7rem;  top: 19%; left: 8%;   transform: rotate(-3deg);  animation-duration: 40s; animation-delay: -14s; }
.hero-poetry-bg .pc-4  { font-size: 12rem; top: 26%; left: -1%;  transform: rotate(7deg);   animation-duration: 30s; animation-delay: -5s; }
.hero-poetry-bg .pc-5  { font-size: 4.5rem;top: 38%; left: 18%;  transform: rotate(-8deg);  animation-duration: 36s; animation-delay: -20s; }
.hero-poetry-bg .pc-6  { font-size: 9rem;  top: 46%; left: 5%;   transform: rotate(3deg);   animation-duration: 32s; animation-delay: -10s; color: rgba(160,110,0,0.12); }
.hero-poetry-bg .pc-7  { font-size: 6rem;  top: 57%; left: 14%;  transform: rotate(-5deg);  animation-duration: 44s; animation-delay: -3s; }
.hero-poetry-bg .pc-8  { font-size: 11rem; top: 63%; left: 0%;   transform: rotate(6deg);   animation-duration: 38s; animation-delay: -17s; }
.hero-poetry-bg .pc-9  { font-size: 5.5rem;top: 77%; left: 15%;  transform: rotate(-4deg);  animation-duration: 31s; animation-delay: -22s; color: rgba(160,110,0,0.10); }
.hero-poetry-bg .pc-10 { font-size: 8rem;  top: 84%; left: 3%;   transform: rotate(5deg);   animation-duration: 35s; animation-delay: -7s; }
@keyframes inkDrift {
    0%   { transform: translateY(0)   rotate(0deg);   opacity: 1; }
    50%  { transform: translateY(-22px) rotate(2deg); opacity: 0.7; }
    100% { transform: translateY(0)   rotate(0deg);   opacity: 1; }
}

/* 水墨粒子（細小散點） */
.hero-dots {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20% 15%, rgba(255,255,255,0.18) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 28%, rgba(255,255,255,0.12) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 55% 50%, rgba(212,177,6,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 88% 62%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 78%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 10% 55%, rgba(212,177,6,0.18) 0%, transparent 100%),
        radial-gradient(1px 1px at 65% 88%, rgba(255,255,255,0.13) 0%, transparent 100%);
}

@keyframes blobFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-18px) rotate(4deg); }
}

/* Hero inner layout */
.hero-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 4% 36px;
    flex: 1;
    position: relative;
    z-index: 5;
    width: 100%;
}

.hero-text-col {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.hero-eyebrow {
    display: block;
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.5rem;
    font-family: 'Noto Serif TC', serif;
}

.hero-main-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 9.24rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.hero-en-subtitle {
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.hero-zh-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2.8rem;
    letter-spacing: 0.12em;
    display: flex;
    justify-content: center;
    gap: 0.05em;
}

/* 波浪動畫：觸發一次後停約 5 秒再重複 */
.hero-wave span {
    display: inline-block;
    animation: charWave 6s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}
@keyframes charWave {
    0%   { transform: translateY(0); }
    7%   { transform: translateY(-8px); }
    13%  { transform: translateY(2px); }
    18%  { transform: translateY(0); }
    100% { transform: translateY(0); }
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
}

.hero-cta-btn {
    background: #d4003a;
    color: white !important;
    padding: 14px 38px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 22px rgba(212,0,58,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.hero-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212,0,58,0.55);
}

.hero-rules-link {
    color: rgba(255,255,255,0.5);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.2s;
}
.hero-rules-link:hover { color: white; }

/* Trophy visual — 絕對定位右側，下半漸層消失 */
.hero-visual-col {
    position: absolute;
    right: 3%;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 24px;
    z-index: 1;
    pointer-events: none;
}
.hero-trophy-img {
    width: 694px;
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, black 38%, transparent 72%);
    mask-image: linear-gradient(to bottom, black 38%, transparent 72%);
}

/* Bottom info bar */
.hero-infobar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,55,100,0.22);
    border-top: 1px solid rgba(255,255,255,0.18);
    padding: 18px 6%;
    position: relative;
    z-index: 5;
    backdrop-filter: blur(8px);
}
.hero-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 44px;
}
.info-label {
    font-size: 0.86rem;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.1em;
    white-space: nowrap;
}
.info-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,40,80,0.3);
}
.hero-info-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.28);
    flex-shrink: 0;
}

/* --- Wizard UI --- */
.progress-container {
    padding: 40px 0;
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.progress-bar::before {
    content: '';
    background: var(--border-color);
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    width: 100%;
    z-index: 1;
}

.progress-step {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 2;
    transition: var(--transition);
}

.progress-step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.progress-step.completed {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 58, 140, 0.1);
}

/* --- Jury Dashboard --- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.work-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-soft);
}

.card-thumbnail {
    height: 180px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    font-weight: 900;
}

/* --- Responsive & Utilities --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .workbench-layout { grid-template-columns: 1fr !map; }
}

/* --- Advanced Animation System --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered loading for cards */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-load {
    animation: fadeIn 1s ease-out forwards;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-4 { margin-top: 4rem; }
.hidden { display: none !important; }

/* Custom Scrollbar for PDF Viewers */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Hero 文字 stagger 動畫 --- */
.hero-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
                transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 時程：鐵路軌道 Z 字型 --- */
.timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 120px 0;
    margin: 0 auto;
    max-width: 1100px;
}

.timeline-track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: #e8e0d0;
    z-index: 1;
    transform: translateY(-50%);
    overflow: hidden;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.timeline-item.up {
    transform: translateY(-80px);
}

.timeline-item.down {
    transform: translateY(80px);
}

/* up 的標籤在上方 */
.timeline-item.up .timeline-label {
    order: -1;
}

.timeline-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(212, 177, 6, 0.15), var(--shadow-soft);
}

.timeline-badge.active {
    border-color: var(--accent);
    background: var(--accent);
}

.timeline-date {
    font-family: 'Noto Serif TC', serif;
    font-size: 36pt;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.timeline-badge.active .timeline-date {
    color: var(--white);
}

.timeline-month {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-badge.active .timeline-month {
    color: rgba(255, 255, 255, 0.8);
}

.timeline-label {
    font-size: 28pt;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

/* Override: restore Z-offset after reveal animation completes */
.timeline-item.up.reveal.active {
    transform: translateY(-80px);
    opacity: 1;
}

.timeline-item.down.reveal.active {
    transform: translateY(80px);
    opacity: 1;
}

/* 響應式：< 768px 改為垂直列表 */
@media (max-width: 768px) {
    .timeline {
        flex-direction: column;
        gap: 24px;
        padding: 40px 0;
    }
    .timeline-track {
        top: 0;
        left: 50%;
        width: 2px;
        height: 100%;
        transform: translateX(-50%);
    }
    .timeline-item.up,
    .timeline-item.down {
        transform: none;
    }
    .timeline-item.up.reveal.active,
    .timeline-item.down.reveal.active {
        transform: none;
    }
    .timeline-item.up .timeline-label {
        order: 1;
    }
}

/* ============================================
   參賽獎項
   ============================================ */
/* prizes-grid 保留但不再使用，改用 slider */
.prizes-slider-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
}
.prizes-slider-viewport {
    overflow: hidden;
    flex: 1;
}
.prizes-slider-track {
    display: flex;
    gap: 24px;
    transition: transform 0.42s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.prizes-slider-track .prize-card {
    flex: 0 0 calc((100% - 96px) / 5);
    min-width: 0;
}
.slider-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(0,58,140,0.10);
}
.slider-btn:hover  { background: var(--primary); color: white; }
.slider-btn:disabled { opacity: 0.25; cursor: default; pointer-events: none; }
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.8rem;
}
.slider-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    border: none;
    background: #d9d9d9;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.slider-dot.active { background: var(--primary); transform: scale(1.35); }
@media (max-width: 768px) {
    .prizes-slider-track .prize-card { flex: 0 0 100%; }
}

.prize-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-left: 4px solid var(--border-color);
    box-shadow: 6px 6px 0 rgba(0, 58, 140, 0.06), 0 2px 16px rgba(0,0,0,0.05);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.prize-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 rgba(0, 58, 140, 0.08), 0 4px 24px rgba(0,0,0,0.08);
}

.prize-gold       { border-left-color: #d4af37; background: linear-gradient(135deg, #fffdf0, #fff); }
.prize-silver     { border-left-color: #9e9e9e; background: linear-gradient(135deg, #f8f8f8, #fff); }
.prize-bronze     { border-left-color: #cd7f32; background: linear-gradient(135deg, #fff5ee, #fff); }
.prize-jinshi     { border-left-color: #389e0d; background: linear-gradient(135deg, #f6ffed, #fff); }
.prize-mv         { border-left-color: #531dab; background: linear-gradient(135deg, #f9f0ff, #fff); }
.prize-merit      { border-left-color: var(--primary); background: linear-gradient(135deg, #f0f5ff, #fff); }

.prize-icon   { font-size: 3rem; margin-bottom: 0.75rem; }
.prize-rank   { font-family: 'Noto Serif TC', serif; font-size: 1.4rem; font-weight: 900; color: var(--text-main); margin-bottom: 0.25rem; }
.prize-count  { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.prize-amount { font-family: 'Noto Serif TC', serif; font-size: 1.6rem; font-weight: 900; color: var(--primary); margin-bottom: 0.5rem; }
.prize-extra  { font-size: 0.8rem; color: var(--text-muted); }

/* ── Prize Showcase ── */
.prize-showcase-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}
.showcase-card {
    background: #fffbf2;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.showcase-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.11);
}
.showcase-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.showcase-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.8rem;
}
.showcase-money-area {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #fff8e1, #fde68a);
    display: flex;
    align-items: center;
    justify-content: center;
}
.showcase-body {
    padding: 1.4rem 1.8rem 1.8rem;
}
.showcase-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 0.55rem;
}
.showcase-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.75;
}
.showcase-prize-rows {
    display: flex;
    flex-direction: column;
    margin-top: 0.4rem;
}
.prize-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    padding: 7px 0;
    border-bottom: 1px solid #f0e8d0;
    color: var(--text-main);
}
.prize-row:last-child { border-bottom: none; }
.prize-row span:first-child { color: var(--text-muted); }
.prize-row span:last-child { font-weight: 700; color: var(--primary); }

@media (max-width: 768px) {
    .prize-showcase-wrap { grid-template-columns: 1fr; }
}

/* ============================================
   最新消息
   ============================================ */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 2rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 28px 24px;
    background: var(--white);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    box-shadow: 6px 6px 0 rgba(0, 58, 140, 0.08), 0 1px 12px rgba(0,0,0,0.04);
    text-decoration: none;
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, background 0.2s;
}
.news-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 rgba(0, 58, 140, 0.10), 0 4px 20px rgba(0,0,0,0.07);
    background: #fffdf5;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-date {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--white);
    background: var(--accent);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.06em;
}

/* cursor for clickable cards */
.news-card { cursor: pointer; }

/* --- News Modal --- */
.news-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 30, 0.55);
    backdrop-filter: blur(4px);
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.news-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.news-modal {
    background: var(--white);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    padding: 2.5rem 2.8rem;
    max-width: 560px;
    width: 90%;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.news-modal-overlay.active .news-modal {
    transform: translateY(0) scale(1);
}
.news-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.news-modal-close:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}
.news-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1.4rem;
}
.news-modal-body {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.85;
}

.news-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}
.news-tag-workshop {
    color: #0a5c8a;
    background: #e6f4ff;
    border: 1px solid #91caff;
}

.news-tag-ended {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}
.news-title {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.7;
}

@media (max-width: 600px) {
    .news-list { grid-template-columns: 1fr; }
    .prizes-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   時程：進度條 + 動態狀態系統
   ============================================ */

/* 進度條填充 */
.timeline-track-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    transition: width 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) 0.6s;
    border-radius: 2px;
}

/* 節點 icon */
.timeline-icon {
    font-size: 1.2rem;
    line-height: 1;
    margin-bottom: 0;
    display: block;
}

/* 徽章尺寸升級（150px，配合 36pt 日期字） */
.timeline-badge {
    width: 150px;
    height: 150px;
}

/* 狀態：已完成（深藍底） */
.timeline-badge.status-past {
    background: var(--primary);
    border-color: var(--primary);
}
.timeline-badge.status-past .timeline-icon,
.timeline-badge.status-past .timeline-date,
.timeline-badge.status-past .timeline-month {
    color: #fff;
}

/* 狀態：進行中（金色底 + 脈衝） */
.timeline-badge.status-current {
    background: var(--accent);
    border-color: var(--accent);
    animation: pulseCurrent 2s ease-in-out infinite;
}
.timeline-badge.status-current .timeline-icon,
.timeline-badge.status-current .timeline-date,
.timeline-badge.status-current .timeline-month {
    color: #fff;
}

@keyframes pulseCurrent {
    0%   { box-shadow: 0 0 0 0   rgba(212, 177, 6, 0.55); }
    60%  { box-shadow: 0 0 0 14px rgba(212, 177, 6, 0); }
    100% { box-shadow: 0 0 0 0   rgba(212, 177, 6, 0); }
}

/* 狀態：即將開始（灰色淡化） */
.timeline-badge.status-future {
    border-color: #d0ccc4;
    opacity: 0.65;
}
.timeline-badge.status-future .timeline-date,
.timeline-badge.status-future .timeline-month {
    color: var(--text-muted);
}

/* 狀態標籤（小膠囊） */
.timeline-status {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.03em;
    min-height: 22px;
}
.chip-past    { background: rgba(0, 58, 140, 0.10); color: var(--primary); }
.chip-current { background: rgba(212, 177, 6, 0.18); color: #896e00; }
.chip-future  { background: rgba(0, 0, 0, 0.05); color: var(--text-muted); }

/* 倒數計時區塊 */
.timeline-countdown {
    display: inline-block;
    padding: 10px 28px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid rgba(0, 58, 140, 0.08);
}
/* 可點擊徽章（報名開始節點） */
a.timeline-badge-link {
    text-decoration: none;
    cursor: pointer;
}
a.timeline-badge-link:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 10px rgba(212, 177, 6, 0.2), var(--shadow-soft);
}

.timeline-countdown strong {
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 900;
}

/* ── Font Size Toggle Widget ────────────────────────── */
html.fs-large  { font-size: 24px; }
html.fs-medium { font-size: 20px; }
html.fs-small  { font-size: 18px; }

.fst-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: white;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.13);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.fst-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.fst-btns { display: flex; gap: 4px; }
.fst-btn {
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 7px;
    cursor: pointer;
    padding: 5px 11px;
    font-weight: 700;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
    line-height: 1.2;
}
.fst-btn:hover { border-color: var(--primary); color: var(--primary); }
.fst-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
