body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button:hover {
    background-color: #2980b9;
}

#selectedFolderInfo {
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 响应式网格 */
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.file-item {
    background-color: #ecf0f1;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 200px; /* 确保项目高度一致 */
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.file-icon {
    font-size: 48px; /* 大图标 */
    color: #3498db;
    margin-bottom: 10px;
}

.file-name {
    font-weight: bold;
    margin-bottom: 5px;
    word-break: break-all; /* 防止长文件名溢出 */
    font-size: 0.9em;
    flex-grow: 1; /* 使文件名区域占据多余空间 */
}

.file-path {
    font-size: 0.75em;
    color: #7f8c8d;
    margin-bottom: 10px;
    word-break: break-all;
}

.file-actions button {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 12px;
    margin-top: 5px;
    margin-right: 5px; /* 添加右边距 */
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.2s;
}
.file-actions button:last-child {
    margin-right: 0; /* 最后一个按钮无右边距 */
}

.file-actions button.update-btn {
    background-color: #e67e22; /* 橙色 */
}

.file-actions button:hover {
    opacity: 0.85;
}
.file-actions button.update-btn:hover {
    background-color: #d35400;
}
.file-actions button:not(.update-btn):hover {
    background-color: #27ae60;
}

.placeholder {
    grid-column: 1 / -1; /* 让占位符占据整行 */
    text-align: center;
    color: #777;
    font-size: 1.2em;
    padding: 40px 0;
}
.download-btn-link {
    background-color: #2ecc71;
    color: white !important; /* 重要以覆盖默认链接颜色 */
    padding: 8px 12px;
    margin-top: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    text-decoration: none; /* 去除链接下划线 */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
    border: none; /* 确保看起来像按钮 */
}

.download-btn-link:hover {
    background-color: #27ae60;
    text-decoration: none;
}

/* 如果 .button 样式已经很好，可以直接给 <a> 标签 class="button download-btn" */
.file-actions .button.download-btn { /* 沿用之前的 .button 样式 */
    text-decoration: none; /* 确保链接没有下划线 */
}