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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    min-height: 100vh;
    padding: 0 20px 20px;
}

.container {
    max-width: 920px;
    margin: 0 auto;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 100px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab.active {
    color: #11998e;
    border-bottom-color: #11998e;
    background: white;
}

.tab:hover {
    color: #11998e;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tool-intro {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.tool-intro h2 {
    color: #333;
    margin-bottom: 28px;
    text-align: center;
    font-size: 1.5rem;
}

.intro-section {
    margin-bottom: 32px;
}

.intro-section:last-child {
    margin-bottom: 0;
}

.intro-section h3 {
    color: #11998e;
    margin-bottom: 20px;
    font-size: 1.25rem;
    padding-left: 12px;
    border-left: 4px solid #11998e;
}

.input-guide, .formula-guide, .case-guide {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-item, .formula-item, .case-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.guide-item h4, .formula-item h4, .case-item h4 {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.guide-item p, .formula-item p, .case-item p {
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 10px;
}

.guide-item p:last-child, .formula-item p:last-child, .case-item p:last-child {
    margin-bottom: 0;
}

.formula-item strong {
    color: #11998e;
    font-size: 1.1em;
}

.formula-item ul, .case-item ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.formula-item ul li, .case-item ul li {
    color: #6c757d;
    line-height: 1.8;
    margin-bottom: 6px;
}

.formula-example {
    background: #e8f5e9;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #2e7d32 !important;
}

.formula-note {
    font-size: 0.95rem;
    color: #856404 !important;
    background: #fff3cd;
    padding: 10px 14px;
    border-radius: 6px;
}

.compare-formula-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.compare-formula-table th, .compare-formula-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.compare-formula-table th {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    font-weight: 600;
}

.compare-formula-table tr:nth-child(even) {
    background: #f8f9fa;
}

.compare-formula-table tr:hover {
    background: #e8f5e9;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group label .required {
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #11998e;
    box-shadow: 0 0 0 3px rgba(17, 153, 142, 0.1);
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 10px 0 0 10px;
    flex: 1;
}

.input-group .unit {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: #6c757d;
    font-weight: 500;
}

.help-text {
    display: block;
    margin-top: 6px;
    color: #6c757d;
    font-size: 14px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

.btn-calculate {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.4);
}

.result-section {
    margin-top: 30px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.result-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.result-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.result-item .label {
    display: block;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

.result-item .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.result-item .value.profit {
    color: #28a745;
}

.result-item .value.important {
    color: #11998e;
}

.result-item.highlight {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.result-item.highlight .label,
.result-item.highlight .value {
    color: white;
}

.rate-reference {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.rate-reference h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.rate-table table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table th, .rate-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.rate-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.rate-table tr:hover {
    background: #f8f9fa;
}

.rate-table tr.highlight {
    background: #e8f5e9;
    font-weight: 500;
}

.rollover-table {
    background: white;
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
}

.rollover-table h4 {
    color: #333;
    margin-bottom: 12px;
}

.rollover-table table {
    width: 100%;
    border-collapse: collapse;
}

.rollover-table th, .rollover-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.rollover-table th {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    font-weight: 600;
}

.rollover-table tr:nth-child(even) {
    background: #f8f9fa;
}

.faq-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.faq-section h2 {
    color: #333;
    margin-bottom: 24px;
    text-align: center;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    color: #11998e;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.faq-item p {
    color: #6c757d;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 30px;
    color: white;
}

footer a {
    color: white;
    text-decoration: underline;
}

@media (max-width: 768px) {
.tab-content {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .rate-table {
        overflow-x: auto;
    }
    
    .rate-table table {
        min-width: 600px;
    }
}
