:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3a1;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --platform-color: #4a6fa5;
    --own-color: #4fc3a1;
}

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

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Heiti TC', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 使用說明區塊樣式 */
.instructions {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 5px solid var(--accent-color);
}

.instructions h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.instructions h2 i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.instructions p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.instructions ul {
    margin-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.instructions li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.instructions-note {
    background-color: #fff8e1;
    padding: 0.8rem;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.instructions-note p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.contact-link:hover {
    text-decoration: underline;
}

/* 重新設計輸入區塊 */
.input-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: 100%;
}

.section h2 {
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.3rem;
}

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

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: bold;
    font-size: 0.95rem;
}

input, select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(79, 195, 161, 0.2);
}

.checkbox {
    display: flex;
    align-items: center;
}

.checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

.checkbox label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

button {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#calculate-btn {
    background-color: var(--accent-color);
    color: white;
}

#calculate-btn:hover {
    background-color: #3da98a;
}

#reset-btn {
    background-color: #e9ecef;
    color: var(--dark-color);
}

#reset-btn:hover {
    background-color: #dde2e6;
}

.hidden {
    display: none;
}

#results {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

#results h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* 比較表格樣式 */
.comparison-table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    text-align: center;
}

.comparison-table th, 
.comparison-table td {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.comparison-table th:first-child {
    text-align: left;
    width: 30%;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table th:nth-child(2) {
    color: var(--platform-color);
}

.comparison-table th:nth-child(3) {
    color: var(--own-color);
}

.comparison-table .section-header {
    background-color: #f0f0f0;
    font-weight: bold;
}

.comparison-table .section-header td {
    text-align: center;
    font-size: 1.1rem;
    padding: 0.6rem;
}

.comparison-table .total-row {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: bold;
}

.comparison-table .revenue-row {
    background-color: rgba(79, 195, 161, 0.1);
    font-weight: bold;
}

.comparison-table .profit-row {
    background-color: rgba(74, 111, 165, 0.1);
    font-weight: bold;
}

#comparison {
    margin-top: 2rem;
    text-align: center;
}

#comparison h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

#comparison-text {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.chart-container {
    max-width: 800px;
    margin: 0 auto;
    height: 400px;
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.contact-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.contact-email, .contact-phone {
    font-weight: bold;
    color: var(--secondary-color);
}

/* 響應式設計 */
@media (max-width: 992px) {
    .input-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .input-container {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th, 
    .comparison-table td {
        padding: 0.6rem 0.4rem;
    }
} 