/* 共用樣式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}
.navbar {
    background: rgba(255,255,255,0.95);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    flex-wrap: wrap;
}
.nav-links a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
}
.nav-links a:hover { color: #667eea; }
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}
.page-title {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-size: 2em;
}
.tool-box {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.tool-box h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}
.input-group { margin-bottom: 18px; }
.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}
.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: #667eea;
}
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-secondary {
    background: #e0e0e0;
    color: #555;
}
.result-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}
.result-box.show { display: block; }
.result-item {
    background: rgba(255,255,255,0.2);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.result-item .label { font-size: 0.9em; opacity: 0.9; }
.result-item .value { font-size: 1.5em; font-weight: bold; margin-top: 5px; }
.note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 0.9em;
    color: #856404;
}
.footer {
    background: rgba(0,0,0,0.3);
    color: #fff;
    padding: 25px 20px;
    text-align: center;
    margin-top: 40px;
}
.footer a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
}
.footer a:hover { text-decoration: underline; }
.back-link {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 15px;
    font-weight: bold;
}
.back-link:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .input-row { grid-template-columns: 1fr; }
    .page-title { font-size: 1.5em; }
}
