/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 主要内容样式 */
main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* 纳税人类型样式 */
.taxpayer-type {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.taxpayer-type h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
}

.radio-group {
    display: flex;
    gap: 30px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
}

/* 输入区域样式 */
.input-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.input-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
}

.input-group {
    margin-bottom: 30px;
}

.input-group h3 {
    margin-bottom: 15px;
    color: #34495e;
    font-size: 1.2em;
}

.rate-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.input-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-item label {
    font-weight: 500;
    color: #555;
}

.input-item input[type="number"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.input-item input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 结果展示区域样式 */
.result-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
}

/* 汇总信息样式 */
.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-item .label {
    font-weight: 500;
    color: #555;
}

.summary-item .value {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
}

/* 税费明细样式 */
.tax-details {
    margin-bottom: 30px;
}

.tax-details h3 {
    margin-bottom: 15px;
    color: #34495e;
    font-size: 1.2em;
}

.tax-details table {
    width: 100%;
    border-collapse: collapse;
}

.tax-details th,
.tax-details td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.tax-details th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.tax-details tr:hover {
    background-color: #f8f9fa;
}

.tax-details .total-row {
    font-weight: 600;
    background-color: #f0f4f8;
}

/* 计算过程样式 */
.calculation-process {
    margin-bottom: 30px;
}

.calculation-process h3 {
    margin-bottom: 15px;
    color: #34495e;
    font-size: 1.2em;
}

#process-details {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.action-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#reset-btn {
    background-color: #95a5a6;
    color: white;
}

#reset-btn:hover {
    background-color: #7f8c8d;
}

#export-excel-btn {
    background-color: #27ae60;
    color: white;
}

#export-excel-btn:hover {
    background-color: #219a52;
}

#export-pdf-btn {
    background-color: #e74c3c;
    color: white;
}

#export-pdf-btn:hover {
    background-color: #c0392b;
}

/* 底部样式 */
footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2em;
    }

    .radio-group {
        flex-direction: column;
        gap: 15px;
    }

    .rate-inputs {
        grid-template-columns: 1fr;
    }

    .summary {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons button {
        width: 100%;
        max-width: 300px;
    }

    .tax-details table {
        font-size: 0.9em;
    }

    .tax-details th,
    .tax-details td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    .input-section,
    .result-section,
    .taxpayer-type {
        padding: 15px;
    }

    .summary {
        padding: 15px;
    }

    #process-details {
        padding: 15px;
        font-size: 0.9em;
    }
}