/* ================== 全局與導覽卡片樣式 ================== */
body {
    font-family: "Microsoft JhengHei", sans-serif;
    background: #f8fafc;
    margin: 0;
    padding: 0 20px 40px 20px;
}

.container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    width: 260px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border-top: 5px solid #3b82f6; /* 預設藍色頂邊 */
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.nav-card .icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.nav-card h3 {
    margin: 10px 0;
    color: #1e293b;
}

.nav-card .desc {
    font-size: 0.9em;
    color: #64748b;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 15px;
}

.nav-card .tag {
    align-self: flex-start;
    background: #eff6ff;
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
}

/* ================== 論文導覽燈箱樣式 ================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    width: 90%; max-width: 750px; max-height: 85vh;
    border-radius: 16px; padding: 35px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative; overflow-y: auto; text-align: left;
    transform: translateY(20px); transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute; top: 15px; right: 20px;
    font-size: 28px; font-weight: bold; color: #94a3b8;
    cursor: pointer; transition: color 0.2s;
}
.close-btn:hover { color: #334155; }

.modal-title {
    font-size: 1.4em; color: #1e293b; line-height: 1.4; margin: 5px 0 15px 0; font-weight: 800;
}
.modal-tags-container { margin-bottom: 25px; }
.modal-tag {
    background: #f1f5f9; color: #475569; padding: 4px 10px; border-radius: 20px; font-size: 0.8em; font-weight: 600; margin-right: 8px; display: inline-block; margin-bottom: 5px;
}
.modal-section { margin-bottom: 20px; }
.modal-section h4 { color: #0f172a; font-size: 1.05em; margin-bottom: 8px; border-left: 4px solid #6366f1; padding-left: 8px; }
.modal-abstract { color: #475569; font-size: 0.95em; line-height: 1.6; background: #f8fafc; padding: 15px; border-radius: 8px; font-style: italic; }
.modal-innovation { padding-left: 20px; margin: 0; color: #334155; font-size: 0.95em; }
.modal-innovation li { margin-bottom: 10px; line-height: 1.6; }

.modal-download-btn {
    display: inline-block; background: linear-gradient(135deg, #4f46e5, #6366f1); color: white; text-decoration: none; padding: 12px 30px; border-radius: 8px; font-weight: bold; box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4); transition: all 0.2s;
}
.modal-download-btn:hover {
    transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

/* 💡 燈箱內論文展示圖樣式 */
.modal-paper-img {
    width: 100%;
    max-width: 600px; /* 控制圖片不要大得太誇張 */
    height: auto;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

/* 滑鼠滑過去時有微微放大的互動感 */
.modal-paper-img:hover {
    transform: scale(1.02);
}