/* 全局樣式 */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4e9f3d;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --text-color: #212529;
    --light-text: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 頁頭樣式 */
header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

header h1 {
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要內容區塊 */
main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    main {
        grid-template-columns: 1fr 1fr;
    }
}

/* 計算器表單樣式 */
.calculator {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.25);
}

.hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.button-group {
    display: flex;
    gap: 1rem;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

button[type="submit"] {
    background-color: var(--accent-color);
    color: white;
    flex: 2;
}

button[type="reset"] {
    background-color: #6c757d;
    color: white;
    flex: 1;
}

button:hover {
    opacity: 0.9;
}

button:active {
    transform: translateY(1px);
}

/* 結果區塊樣式 */
.results {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.results h2 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.5rem;
}

.result-content {
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    min-height: 150px;
}

.result-content p {
    margin-bottom: 0.5rem;
}

/* 添加列表樣式，確保項目符號不超出容器 */
.result-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-position: inside;
}

.result-content li {
    margin-bottom: 0.3rem;
    text-indent: -1.5rem;
    padding-left: 1.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 1rem 0;
}

.result-explanation {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* 頁尾樣式 */
footer {
    margin-top: 3rem;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
} 