/* calculator.css - 合规计算器专属样式 */

.calc-hero {
    padding: 60px 0 80px;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.calc-header {
    text-align: center;
    margin-bottom: 40px;
}

.calc-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.calc-header .highlight {
    color: #ff6600;
    position: relative;
    display: inline-block;
}

.calc-header p {
    font-size: 1.1rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.calc-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #ff6600;
    width: 25%;
    transition: width 0.4s ease;
}

.step-indicator {
    text-align: right;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 30px;
}

/* 步骤容器 */
.calc-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.calc-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-step h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

/* Step 1: 卡片单选 */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.option-card {
    cursor: pointer;
    position: relative;
}

.option-card input {
    position: absolute;
    opacity: 0;
}

.card-content {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
}

.card-content i {
    font-size: 2.5rem;
    color: #adb5bd;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.card-content h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #333;
}

.card-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.option-card input:checked + .card-content {
    border-color: #ff6600;
    background-color: #fff9f5;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.1);
}

.option-card input:checked + .card-content i {
    color: #ff6600;
}

.option-card:hover .card-content {
    border-color: #ffb380;
}

/* 表单组 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #444;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* 按钮组 */
.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-group::after {
    content: "";
    clear: both;
    display: table;
}

.btn-group .next-btn {
    margin-left: auto;
}

/* Step 2: 筹码单选 */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    cursor: pointer;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    color: #555;
    transition: all 0.2s;
}

.chip input {
    display: none;
}

.chip:has(input:checked) {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

/* 复选框组 */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.checkbox-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Step 3: 开关样式 */
.warning-text {
    color: #dc3545;
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
    margin-bottom: 25px;
}

.switch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.switch-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.switch-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Toggle Switch CSS */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
    margin-left: 15px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #059669;
}

input:focus + .slider {
    box-shadow: 0 0 1px #059669;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Step 4: 结果与加载状态 */
.analyzing-state {
    text-align: center;
    padding: 50px 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff6600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.success-icon {
    font-size: 4rem;
    color: #059669;
    text-align: center;
    margin-bottom: 20px;
}

.result-state h3 {
    text-align: center;
    color: #333;
}

.result-state > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.lead-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border: 1px dashed #ddd;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
}

.privacy-note {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 15px;
}

/* 响应式 */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .calc-container {
        padding: 25px 20px;
    }
    
    .switch-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .toggle-switch {
        margin-left: 0;
    }
}