/* 通用样式 - 强制移动端H5显示 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    background-color: #f0f0f0;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.6;
    width: 100% !important;
    max-width: 414px !important;
    margin: 0 auto !important;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* 所有元素使用box-sizing确保不溢出 */
* {
    box-sizing: border-box !important;
}

/* 确保所有容器元素都被限制 */
div, section, article, header, footer, main, aside, nav, form, table, ul, ol, li, p, span, a, img, input, textarea, select, button {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* 强制限制所有可能溢出的元素 */
img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 移动端显示 - 覆盖所有媒体查询 */
/* 小屏幕设备（手机）- 完全自适应 */
@media screen and (max-width: 414px) {
    html {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
    }
    
    body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
    }
}

/* 所有屏幕尺寸的基础样式 */
@media screen {
    html {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
    }
    
    body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
    }
    
    * {
        box-sizing: border-box !important;
    }
    
    div, section, article, header, footer, main, aside, nav, form, table, ul, ol, li {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .bottom-nav {
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* 针对大屏幕设备（电脑端）- 强制限制为手机端宽度并居中 */
@media (min-width: 415px) {
    html {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
        background-color: #f0f0f0 !important;
    }
    
    body {
        width: 100% !important;
        max-width: 414px !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important;
    }
    
    * {
        box-sizing: border-box !important;
    }
    
    div, section, article, header, footer, main, aside, nav, form, table, ul, ol, li {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .bottom-nav {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 414px !important;
        max-width: 414px !important;
        box-sizing: border-box !important;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
}
