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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fafafa;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

/* 手机容器 */
.phone-container {
    width: 100%;
    max-width: 420px;
    height: calc(100vh - 20px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 10px;
}

.calculator {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 0 16px;
    gap: 16px;
    background: white;
    overflow: hidden;
    --label-width: 50px;
    --gap-size: 12px;
}

/* 页面标题 */
.page-title {
    font-size: 20px;
    font-weight: bold;
    color: #1976d2;
    text-align: left;
    margin-bottom: 16px;
}

/* 第一行和第二行：输入框行 */
.input-row {
    display: flex;
    align-items: center;
    gap: var(--gap-size);
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: #333;
    flex-wrap: wrap;
}

.input-row label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    width: var(--label-width);
    flex-shrink: 0;
    letter-spacing: 0.25px;
    line-height: 1;
}

.input-row input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    color: #212121;
    background: transparent;
    font-weight: 500;
    border-radius: 4px;
    height: 48px;
    box-sizing: border-box;
}

.input-row input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

/* 第三行：拖动横条 */
.slider-row {
    display: flex;
    align-items: center;
    gap: var(--gap-size);
    margin-top: 48px;
}

.slider-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slider-row-label {
    font-size: 12px;
    color: #999;
    text-align: center;
    min-height: 20px;
}

.slider {
    width: 80%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: 1px solid #ccc;
    margin: 0 auto;
    display: block;
}

.slider-invisible {
    background: transparent;
    border: none;
    cursor: default;
}

.slider-invisible::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: default;
    box-shadow: none;
}

.slider-invisible::-moz-range-thumb {
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: default;
    box-shadow: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #1976d2;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    padding: 8px;
}

.slider::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 22px;
    height: 22px;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #1976d2;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    padding: 8px;
}

.slider::-moz-range-thumb:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 22px;
    height: 22px;
}

/* 第四行：左右两个模块 */
.result-row {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
    height: 160px;
    margin-top: 8px;
    margin-bottom: 10px;
    margin-left: 0;
    margin-right: 0;
    padding-top: 10px;
    padding-bottom: 10px;
}

.result-module {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 4px;
    padding: 16px;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    background: white;
    border: 1px solid #eeeeee;
}

.discount-module {
    background: white;
}

.price-module {
    background: white;
}

.module-label {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.module-value {
    font-size: 28px;
    font-weight: 500;
    color: #212121;
    line-height: 1;
}

.module-subtotal {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* 链接和按钮 */
.info-link {
    text-align: center;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: none;
    transition: all 0.3s ease;
}

.info-link:active {
    opacity: 0.7;
}

.service-button {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 2px solid #d0d0d0;
    color: #666;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-button:hover {
    background: rgba(0, 0, 0, 0.04);
}

.service-button:active {
    background: rgba(0, 0, 0, 0.08);
}

/* 二维码弹窗 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.32);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.qr-modal.active {
    display: flex;
}

.qr-image {
    max-width: 80%;
    max-height: 80vh;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* 底部信息组 */
.bottom-group {
    flex-shrink: 0;
    background: white;
    padding: 24px 16px 16px 16px;
    border-top: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}


@media (max-width: 480px) {
    .phone-container {
        border-radius: 8px;
    }
    
    .calculator {
        padding: 20px 12px 130px 12px;
        gap: 12px;
    }
    
    .price-row {
        padding: 12px;
    }
    
    .module-value {
        font-size: 24px;
    }
    
    .result-row {
        height: 140px;
    }
    
    .bottom-group {
        padding: 10px 12px 12px 12px;
        gap: 6px;
    }
}
