/* style.css 完整檔案 */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0; /* 增加上下邊距，防止內容貼邊 */
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 700px;
    text-align: center;
}

h1 {
    color: #1a1a1a;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px; /* 增加與上方元素的間距 */
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.status-box {
    margin-top: 20px;
    font-size: 18px;
    color: #555;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 8px;
}

.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
    height: 10px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #28a745;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.upload-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: left;
}

.upload-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

input[type="file"] {
    display: block;
    margin-top: 5px;
}

.results-grid {
    margin-top: 20px;
    /* 【核心修改】: 將 grid 改為 flex 佈局 */
    display: flex;
    flex-direction: column; /* 垂直堆疊 */
    align-items: center;   /* 水平置中 */
    gap: 20px;             /* 圖片之間的間距 */
}

.results-grid img {
    width: 100%;
    max-width: 600px; /* 限制圖片最大寬度，避免過大 */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}