body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}
.container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}
.language-switcher {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
}
.language-switcher a {
    padding: 5px 10px;
    text-decoration: none;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s;
}
.language-switcher a:hover {
    background-color: #f0f0f0;
    color: #333;
}
.language-switcher a.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    margin-top: 10px;
}
.dropdown-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}
.dropdown-suggest {
    position: absolute;
    z-index: 10;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.dropdown-suggest div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}
.dropdown-suggest div:hover {
    background: #f0f0f0;
}
.dropdown-suggest div:last-child {
    border-bottom: none;
}
/* 優化搜尋建議中的節點名稱和ID樣式 */
.dropdown-suggest div .node-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}
.dropdown-suggest div .node-id {
    font-size: 11px;
    color: #888;
    margin-top: 0;
    line-height: 1.2;
}
input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}
input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
}
input[type="text"].valid {
    border-color: #4CAF50;
    background-color: #f8fff8;
}
.calculate-btn {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}
.calculate-btn:hover {
    background-color: #45a049;
}
#result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    font-size: 18px;
    min-height: 20px;
}
.result-success {
    background-color: #e8f5e8;
    border: 2px solid #4CAF50;
    color: #2e7d32;
}
.result-error {
    background-color: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
}
.result-waiting {
    background-color: #fff3e0;
    border: 2px solid #ff9800;
    color: #e65100;
    padding: 20px; /* 加上這行與 #result 一致 */
    border-radius: 6px; /* 同樣也要一致，否則會感覺不「圓潤」 */
    text-align: center;
    font-size: 18px;
}
.distance-value {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}
.loading {
    color: #666;
    font-style: italic;
}
/* 響應式設計 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .language-switcher {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
	}

    
    h2 {
        margin-top: 0;
    }
}
.analysis-table {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.analysis-table table {
    border-collapse: collapse;
    text-align: center;
    min-width: 300px;
	margin: 0 auto;
}
.analysis-table th,
.analysis-table td {
    border: 1px solid #ccc;
    padding: 10px 15px;
}
#analyze-result {
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    font-size: 18px;
}
.life-form {
  display: flex;
  justify-content: center;  /* 水平置中 */
  align-items: center;      /* 垂直置中 */
  gap: 10px;                /* 標籤和選單之間留間距 */
  margin: 10px 0;
}
