/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background: linear-gradient(180deg, #dfefff 0%, #e9f3ff 40%, #ffffff 100%);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 20px;
    padding-bottom: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.logo {
    position: fixed;
    top: 10px;
    left: 10px;
    height: 35px;
    width: auto;
    z-index: 2000;
    border-radius: 4px;
    object-fit: contain;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
    margin-top: 80px;
    margin-bottom: 100px;
}

.form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 20px 90px;
    border: 1px solid #e6e9ef;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    margin-top: 5px;
}

.title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.health-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.required {
    color: #ff4757;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d8dde6;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f9fafb;
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
    touch-action: manipulation;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #1e88e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #4A90E2;
}

.radio-label span {
    font-size: 16px;
    color: #333;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #1e88e5;
    text-align: center;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
    min-height: 44px;
    text-align: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.submit-btn:hover {
    background: #1669b8;
    box-shadow: 0 10px 20px rgba(30, 136, 229, 0.22);
}

.submit-btn:active {
    background: #125699;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 成功提示弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: slideUp 0.3s ease;
    border: 1px solid #e6e9ef;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #4caf50;
    color: #ffffff;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: bold;
}

.modal-content h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

.close-btn {
    padding: 10px 30px;
    background: #1e88e5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px;
    min-width: 80px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.close-btn:hover {
    background: #1669b8;
    box-shadow: 0 8px 18px rgba(30, 136, 229, 0.2);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
/* 超小屏手机 (320px - 360px) */
@media (max-width: 360px) {
    body {
        padding: 8px;
        padding-bottom: 60px;
    }

    .logo {
        height: 32px;
        top: 8px;
        left: 8px;
    }

    .container {
        max-width: 100%;
        margin-top: 50px;
    }

    .form-wrapper {
        padding: 18px 12px;
        border-radius: 10px;
    }

    .title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .health-form {
        gap: 14px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="number"] {
        padding: 10px 12px;
        font-size: 16px;
        min-height: 44px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 15px;
    }

    .modal-content {
        padding: 24px 16px;
        max-width: 90%;
    }

    .success-icon {
        width: 48px;
        height: 48px;
        font-size: 28px;
    }
}

/* 小屏手机 (361px - 375px) */
@media (min-width: 361px) and (max-width: 375px) {
    body {
        padding: 10px;
    }

    .logo {
        height: 33px;
        top: 10px;
        left: 10px;
    }

    .form-wrapper {
        padding: 20px 15px;
        border-radius: 10px;
    }

    .title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .health-form {
        gap: 16px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="number"] {
        padding: 10px 14px;
        font-size: 16px;
    }

    .modal-content {
        padding: 30px 20px;
        max-width: 280px;
    }

    .success-icon {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
}

/* 中等屏幕手机 (376px - 414px) */
@media (min-width: 376px) and (max-width: 414px) {
    body {
        padding: 12px;
    }

    .form-wrapper {
        padding: 24px 18px;
    }

    .title {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .health-form {
        gap: 18px;
    }
}

/* 大屏手机 (415px - 480px) */
@media (min-width: 415px) and (max-width: 480px) {
    body {
        padding: 15px;
    }

    .form-wrapper {
        padding: 28px 22px;
    }

    .title {
        font-size: 24px;
        margin-bottom: 26px;
    }
}

/* 横屏模式 */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .form-wrapper {
        padding: 15px 20px;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .health-form {
        gap: 12px;
    }

    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="number"] {
        padding: 8px 14px;
        min-height: 40px;
    }

    .submit-btn {
        padding: 10px;
        min-height: 40px;
        margin-top: 5px;
    }
}

/* 超大屏手机和平板 */
@media (min-width: 481px) {
    .container {
        max-width: 500px;
    }
}

/* 防止iOS Safari自动缩放 */
@supports (-webkit-touch-callout: none) {
    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group input[type="number"],
    .form-group select,
    .form-group textarea {
        font-size: 16px !important;
    }
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e6e9ef;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 45px;
    padding: 0 calc(env(safe-area-inset-bottom) + 0px);
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    flex: 1;
    padding: 0;
    height: 100%;
    transition: color 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
    color: #1e88e5;
}

.nav-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-text {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}


