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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.calculator-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.input-section h2,
.result-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.unit-selector {
    margin-bottom: 25px;
}

.unit-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
}

.radio-label input[type="radio"]:checked {
    accent-color: #3498db;
}

.radio-label:has(input:checked) {
    border-color: #3498db;
    background-color: #e3f2fd;
}

.dimensions-input h3,
.weight-input h3 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.dimension-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 8px;
}

.input-group label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #555;
    font-size: 0.9rem;
}

.input-group input {
    padding: 12px 50px 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.unit-label {
    position: absolute;
    right: 15px;
    top: 38px;
    color: #7f8c8d;
    font-weight: 500;
    pointer-events: none;
    z-index: 2;
}

.weight-input {
    margin-top: 25px;
}

.weight-input .input-group {
    max-width: 200px;
}

.conversion-display {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 5px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 5px;
    text-align: center;
    min-height: 24px;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    position: relative;
    font-family: 'Courier New', monospace;
}

.conversion-display:not(:empty) {
    background: linear-gradient(135deg, #e8f4fd 0%, #d1ecf1 100%);
    border-color: #64b5f6;
    color: #1565c0;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.15);
}

.calculate-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    width: 100%;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

.result-section {
    border-left: 3px solid #e1e8ed;
    padding-left: 30px;
}

.result-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e1e8ed;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e1e8ed;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item label {
    font-weight: 600;
    color: #555;
}

.result-item span {
    font-weight: 500;
    color: #2c3e50;
}

.result-item.highlight {
    background: #e8f5e8;
    margin: 10px -15px -15px -15px;
    padding: 20px;
    border-radius: 0 0 10px 10px;
}

.result-item.highlight label,
.result-item.highlight span {
    font-size: 1.2rem;
    font-weight: 700;
    color: #27ae60;
}

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

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.history-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 10px;
    margin-bottom: 0;
}

.clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background: #c0392b;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.empty-history {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px 0;
}

.history-item {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: box-shadow 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-date {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.history-cost-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.history-cost {
    font-weight: 700;
    color: #27ae60;
    font-size: 1.1rem;
}

.history-cost-cny {
    font-weight: 600;
    color: #e67e22;
    font-size: 0.9rem;
}

.history-details {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* 页脚样式 */
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 50px;
    border-radius: 15px 15px 0 0;
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 30px;
    max-width: 100%;
    box-sizing: border-box;
}

.footer-section h3 {
    color: #3498db;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    padding: 5px 0;
    opacity: 0.9;
    line-height: 1.5;
}

.footer-section strong {
    color: #3498db;
    font-weight: 600;
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 汇率显示样式 */
.exchange-rate-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #d5eddb 100%);
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    box-shadow: 0 3px 12px rgba(39, 174, 96, 0.2);
}

.rate-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.exchange-rate-info #exchange-rate-display {
    font-weight: 600;
    color: #2c3e50;
}

.exchange-rate-info #exchange-rate {
    font-weight: 700;
    color: #27ae60;
    font-size: 1.2rem;
    margin-left: 5px;
}

.rate-status {
    font-size: 0.85rem;
    color: #27ae60;
    font-weight: 600;
    background: rgba(39, 174, 96, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
}

.rate-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.update-time {
    font-style: italic;
}

.api-info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.calculation-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(39, 174, 96, 0.2);
}

.precision-note {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-style: italic;
    display: block;
    text-align: center;
    background: rgba(241, 196, 15, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    border-left: 3px solid #f1c40f;
}

.result-item.cny-cost {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: none;
    border-left: 4px solid #ff9800;
    margin: 10px -15px 0 -15px;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.result-item.cny-cost label {
    color: #e65100;
    font-weight: 600;
    font-size: 1rem;
}

.result-item.cny-cost span {
    color: #ff6f00;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 批量计算样式 */
.batch-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.batch-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 0;
}

.batch-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.template-btn, .upload-btn, .download-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.template-btn:hover, .upload-btn:hover, .download-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.download-btn {
    background: #27ae60;
}

.download-btn:hover {
    background: #229954;
}

.batch-results {
    margin-top: 25px;
}

.batch-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.batch-summary h3 {
    margin-top: 0;
    color: #2c3e50;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e1e8ed;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.batch-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    max-height: 500px;
    overflow-y: auto;
}

.batch-table-container table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.batch-table-container th,
.batch-table-container td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
    font-size: 0.85rem;
    white-space: nowrap;
}

.batch-table-container th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

.batch-table-container tbody tr {
    transition: background-color 0.2s ease;
}

.batch-table-container tbody tr:hover {
    background: #f8f9fa;
}

.batch-table-container tbody tr:nth-child(even) {
    background: #fdfdfd;
}

.batch-table-container tbody tr:nth-child(even):hover {
    background: #f8f9fa;
}

/* 针对表格中特定列的样式 */
.batch-table-container td:first-child {
    font-weight: 600;
    color: #495057;
}

.batch-table-container td:nth-child(8),
.batch-table-container td:nth-child(9) {
    font-weight: 600;
    text-align: right;
}

.batch-table-container td:nth-child(8) {
    color: #28a745;
}

.batch-table-container td:nth-child(9) {
    color: #fd7e14;
}

@media (max-width: 768px) {
    .calculator-card {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .result-section {
        border-left: none;
        border-top: 3px solid #e1e8ed;
        padding-left: 0;
        padding-top: 30px;
    }
    
    .dimension-row {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .batch-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-controls {
        justify-content: center;
    }
    
    .exchange-rate-info {
        padding: 12px 15px;
    }
    
    .rate-main {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .rate-details {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .result-item.cny-cost {
        margin: 10px -20px 0 -20px;
        padding: 15px 20px;
    }
}

/* --- 新增信息板块样式 --- */
.info-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 0; /* 调整与上方元素的间距 */
}

.info-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e1e8ed;
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.info-card p, .info-card ul {
    font-size: 1rem;
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 15px;
}

.info-card ul {
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 10px;
}

/* FAQ 列表样式 */
.info-card dl {
    margin-top: 15px;
}

.info-card dt {
    font-weight: 700;
    color: #34495e;
    margin-top: 20px;
    font-size: 1.1rem;
}

.info-card dd {
    margin-left: 0;
    margin-top: 8px;
    color: #555;
    padding-left: 15px;
    border-left: 3px solid #bdc3c7;
}

@media (min-width: 992px) {
    .info-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}