:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin-bottom: 3rem;
}

.header-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    border: none;
}

.header-card h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
}

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

.warning-alert {
    background: #fff3cd;
    border: 2px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
}

.warning-alert .alert-icon {
    color: var(--danger-color);
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.calculator-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    border: none;
}

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

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--secondary-color);
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.form-text {
    font-size: 0.85rem;
    margin-top: 0.4rem;
    color: #6c757d;
    font-style: italic;
}

.input-group-icon {
    position: relative;
}

.input-group-icon .form-control {
    padding-left: 2.5rem;
}

.input-group-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
}

/* 下拉建议列表样式 */
.suggestions-list {
    position: absolute;
    z-index: 1050;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 2px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    border: 1px solid #e9ecef;
    background: white;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

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

.suggestion-code {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 10px;
}

.suggestion-name {
    color: #495057;
}

/* 复选框样式 */
.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.2rem;
    margin-right: 0.5rem;
    border: 2px solid #ced4da;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-label {
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

/* 按钮样式 */
.btn-calculate {
    background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-calculate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 结果卡片样式 */
.results-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.results-header {
    background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: -2.5rem -2.5rem 2rem -2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-header h3 {
    margin: 0;
    font-weight: 600;
}

.tax-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tax-card {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, var(--light-bg) 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
}

.tax-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.tax-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.tax-currency {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.tax-converted {
    font-size: 1rem;
    color: #6c757d;
    font-style: italic;
}

.warning-card {
    background: #fff3cd;
    border: 2px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.warning-card i {
    color: var(--warning-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* 信息框样式 */
.info-box {
    background: #e8f4fc;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-top: 2rem;
}

.info-box h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 加载动画 */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 验证样式 */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.is-invalid~.invalid-feedback {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header-card,
    .calculator-card,
    .results-card {
        padding: 1.5rem;
    }

    .header-card h1 {
        font-size: 1.8rem;
    }

    .btn-calculate {
        width: 100%;
        justify-content: center;
    }

    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .tax-amounts {
        flex-direction: column;
        gap: 1rem;
    }

    .tax-card {
        min-width: 100%;
    }

    .tax-amount {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .header-card {
        padding: 1.5rem;
    }

    .calculator-card,
    .results-card {
        padding: 1.25rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .form-check-label {
        font-size: 0.95rem;
    }
}