:root {
    --theme: #4153ff;
    --radius-1: 4px;
    --radius-2: 6px;
}

button {
    border-radius: var(--radius-1);
    border: none;
}

body {
    position: relative;
    background-color: #F6F6F6;
    margin: 0;
    padding: 0;
}

.mounted {
    background-color: #F6F6F6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 17px;
    min-height: 100vh;
}

.header {
    display: flex;
    flex-direction: row;
    background-color: #F6F6F6;
    padding: 14px 39px;
    width: 100%;
    box-sizing: border-box;
}

.mounted-box {
    display: flex;
    width: 940px;
    background-color: white;
    padding: 15px 30px 24px;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
    box-shadow: 3px 2px 20px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.mounted-title {
    font-size: 18px;
    color: #222222;
    font-weight: Bold;
}

.mounted-container {
    width: 940px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mounted-nav-container {
    display: flex;
    justify-content: center;
}

.mounted-nav {
    display: flex;
    margin-top: 15px;
    padding: 4px;
    background-color: #f6f6f6;
    border-radius: var(--radius-2);
}

.mounted-nav li {
    width: 140px;
    height: 36px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-family: PingFang SC;
}

.mounted-nav .active {
    color: white;
    background-color: var(--theme);
    border-radius: var(--radius-2);
}

.mounted-content-item {
    margin-top: 15px;
    display: none;
}

.content-header {
    background-color: #E9E9E9;
    padding: 8px 16px;
    font-family: PingFang SC;
    border-radius: 4px 4px 0 0;
}

.content {
    padding: 16px;
    height: 392px;
    border: 1px solid #E9E9E9;
    overflow-y: auto;
    border-radius: 0 0 4px 4px;
}

.content h2 {
    font-size: 20px;
}

.content p {
    font-size: 14px;
    line-height: 1.7;
}

.content h3 {
    font-size: 16px;
}

.mt6 {
    margin-top: 6px;
}

.mt16 {
    margin-top: 16px;
}

.content-form {
    padding: 23px 60px;
    border: 1px solid #E9E9E9;
    border-radius: 0 0 4px 4px;
}

.form-box-item {
    display: flex;
    align-items: center;
    height: 40px;
}

.form-box-item:not(:nth-of-type(1)) {
    display: flex;
    align-items: center;
    height: 40px;
    margin-top: 16px;
}

.form-desc {
    width: 60px;
    font-size: 12px;
    margin-right: 16px;
    text-align: right;
}

.form-box-item div input {
    width: 328px;
    height: 32px;
    padding-left: 20px;
    border: 1px solid #e2e2e2;
    border-radius: var(--radius-1);
    box-sizing: border-box;
}

.form-box-item div input:focus {
    border: 1px solid var(--theme);
    box-shadow: 0 0 0 2px rgba(65, 83, 255, 0.2);
    transition: all 0.1s ease-in-out;
    outline: none;
}

.cancel-btn {
    padding: 7px 28px;
    background-color: white;
    border: 1px solid #D7D7D7;
    cursor: pointer;
    border-radius: var(--radius-1);
}

.accept-btn {
    padding: 7px 28px;
    color: white;
    background-color: var(--theme);
    flex: none;
    cursor: pointer;
    border-radius: var(--radius-1);
}

.disabled-btn {
    padding: 7px 28px;
    color: #222222;
    background-color: #D7D7D7;
    flex: none;
    display: flex;
    align-items: center;
    border: 1px solid #D7D7D7;
    border-radius: var(--radius-1);
    cursor: not-allowed;
}

.item-btn-group {
    display: none;
    margin-top: 20px;
}

.show {
    display: block !important;
}

.hidden {
    display: none !important;
}

.form-box-check {
    display: flex;
    align-items: center;
    margin-top: 12px;
}

footer {
    font-size: 12px;
    margin-bottom: 20px;
    color: #707070;
    font-weight: 400;
    display: flex;
    justify-content: center;
    background-color: #F6F6F6;
    width: 100%;
}

.layui-table {
    margin: 0;
    width: 100%;
}

.layui-table tr {
    background-color: white !important;
}

.layui-table tr td {
    font-size: 12px;
    font-family: PingFang SC;
    line-height: 20px;
    background-color: white !important;
}

.layui-table tr th {
    font-size: 14px;
    font-family: PingFang SC;
    font-weight: bold;
    line-height: 20px;
}

.mounted-env-container {
    height: 440px;
    padding-bottom: 20px;
    overflow-y: auto;
}

.mounted-tips {
    padding: 12px 20px;
    color: var(--theme);
    background-color: #eef4ff;
    border-radius: var(--radius-1);
}

.mounting-container {
    padding: 16px;
    height: 479px;
    max-height: 479px;
    border: 1px solid #E9E9E9;
    overflow-y: auto;
}

.item-cell {
    padding: 4px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.green {
    color: #11d55c;
}

.wrong {
    color: #FC4D4D;
}

.layui-icon {
    font-size: 18px !important;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 392px;
    border: 1px solid #E9E9E9;
    border-radius: 0 0 4px 4px;
}

img {
    width: 100%;
    height: 100%;
}

.success-content .tips {
    width: 400px;
    padding: 18px;
    border-radius: 8px;
    background-color: #F8F8F8;
    font-size: 12px;
    margin-top: 20px;
    box-sizing: border-box;
}

.success-content .btn-group {
    display: flex;
    align-items: center;
    margin-top: 40px;
}

.success-content .result {
    font-size: 20px;
    font-family: PingFang SC;
    font-weight: bold;
    line-height: 28px;
}

.success-content .btn-group .store-btn {
    padding: 7px 35px;
    border: 1px solid var(--theme);
    background-color: white;
    color: var(--theme);
    cursor: pointer;
    border-radius: var(--radius-2);
}

.success-content .btn-group .btn {
    padding: 7px 35px;
    border: 1px solid var(--theme);
    background-color: var(--theme);
    color: white;
    cursor: pointer;
    border-radius: var(--radius-2);
}

.mounted-footer {
    width: 940px;
    background-color: white;
    padding: 16px 30px 23px;
    margin-top: 16px;
    box-shadow: 3px 2px 20px rgba(0, 0, 0, 0.08);
    display: none;
    box-sizing: border-box;
}

.mounted-footer-title {
    font-size: 18px;
    line-height: 25px;
    margin-bottom: 16px;
}

.mounted-recommend-box {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
}

.mounted-recommend-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 224px;
    height: 140px;
    border: 1px solid #D7D7D7;
    cursor: pointer;
}

.mounted-recommend-item .icon {
    width: 128px;
    height: 36px;
}

.mounted-recommend-item:hover {
    background-color: #F6F9FF;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 224px;
    height: 140px;
}

.mounted-recommend-item:hover .icon {
    display: none;
}

.recommend-content {
    display: none;
}

.mounted-recommend-item:hover .recommend-content {
    display: block;
    padding: 6px 10px 10px;
}

.mounted-recommend-item:hover .recommend-content .title {
    font-size: 16px;
    line-height: 22px;
    font-weight: bold;
}

.mounted-recommend-item:hover .recommend-content ul {
    list-style-type: disc;
    margin-left: 20px;
}

.mounted-recommend-item:hover .recommend-content li {
    list-style-type: disc;
}

/* ========== 移动端适配样式 ========== */

/* 基础移动端适配 */
@media screen and (max-width: 768px) {
    body {
        background-color: #F6F6F6;
    }
    
    /* 头部适配 */
    .header {
        padding: 10px 15px;
    }
    
    /* 容器适配 */
    .mounted-box {
        width: 95%;
        margin: 10px auto;
        padding: 15px;
    }
    
    /* 标题适配 */
    .mounted-title {
        font-size: 16px;
    }
    
    /* 导航栏适配 */
    .mounted-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        padding: 4px 2px;
    }
    
    .mounted-nav li {
        width: auto;
        min-width: 70px;
        margin: 2px;
        padding: 8px 10px;
        font-size: 13px;
        white-space: nowrap;
        height: 34px;
    }
    
    /* 内容区域适配 */
    .mounted-content-item {
        padding: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .content-header {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    /* 表格适配 - 通用 */
    .content-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        width: 100%;
        border-radius: 0 0 4px 4px;
    }
    
    .layui-table {
        min-width: 600px;
        width: 100%;
        border-collapse: collapse;
    }
    
    .layui-table th {
        font-size: 13px;
        padding: 8px 4px;
        white-space: nowrap;
        background-color: #f8f8f8;
    }
    
    .layui-table td {
        font-size: 12px;
        padding: 8px 4px;
        word-break: break-word;
    }
    
    /* 表单适配 */
    .content-form {
        padding: 15px;
        border-radius: 0 0 4px 4px;
    }
    
    .form-box-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 15px;
        height: auto;
    }
    
    .form-box-item:not(:nth-of-type(1)) {
        margin-top: 0;
    }
    
    .form-desc {
        width: 100%;
        margin-bottom: 5px;
        margin-right: 0;
        font-size: 14px;
        text-align: left;
    }
    
    .form-box-item div {
        width: 100%;
    }
    
    .form-box-item div input {
        width: 100%;
        padding: 10px 12px;
        font-size: 16px;
        border-radius: var(--radius-1);
        border: 1px solid #ddd;
    }
    
    /* 按钮组适配 */
    .item-btn-group {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
        width: 100%;
    }
    
    .item-btn-group button {
        width: 100%;
        margin: 0 !important;
        padding: 12px !important;
        font-size: 16px;
        box-sizing: border-box;
    }
    
    /* 安装成功页面适配 */
    .success-content {
        padding: 20px 15px;
        height: auto;
        min-height: 350px;
    }
    
    .success-content .tips {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 30px;
    }
    
    .btn-group .btn,
    .btn-group .store-btn {
        width: 100%;
        margin: 0 !important;
        text-align: center;
        padding: 12px !important;
    }
    
    /* 协议内容适配 */
    .content {
        font-size: 14px;
        line-height: 1.6;
        height: 300px;
        padding: 12px;
    }
    
    .content h2 {
        font-size: 18px;
    }
    
    .content h3 {
        font-size: 16px;
    }
    
    /* 安装信息区域适配 */
    #install_message {
        max-height: 300px;
        overflow-y: auto;
        font-size: 13px;
        padding: 12px;
    }
    
    /* footer适配 */
    footer {
        font-size: 12px;
        padding: 15px 10px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* 容器宽度适配 */
    .mounted-container,
    .mounted-footer {
        width: 100%;
        max-width: 940px;
    }
    
    /* 推荐区域适配 */
    .mounted-recommend-box {
        justify-content: center;
        gap: 10px;
    }
    
    .mounted-recommend-item {
        width: 100%;
        max-width: 224px;
    }
}

/* 专门优化环境监测页面 */
@media screen and (max-width: 768px) {
    /* 环境监测容器优化 */
    .mounted-env-container {
        height: auto;
        max-height: none;
        padding-bottom: 10px;
        overflow-y: visible;
    }
    
    /* 表格列优化 - PHP环境要求表格 */
    .mounted-item:nth-child(2) .layui-table {
        min-width: 550px;
    }
    
    .mounted-item:nth-child(2) .layui-table th:nth-child(1),
    .mounted-item:nth-child(2) .layui-table td:nth-child(1) {
        min-width: 100px;
    }
    
    .mounted-item:nth-child(2) .layui-table th:nth-child(2),
    .mounted-item:nth-child(2) .layui-table td:nth-child(2) {
        min-width: 80px;
    }
    
    .mounted-item:nth-child(2) .layui-table th:nth-child(3),
    .mounted-item:nth-child(2) .layui-table td:nth-child(3) {
        min-width: 60px;
        text-align: center;
    }
    
    .mounted-item:nth-child(2) .layui-table th:nth-child(4),
    .mounted-item:nth-child(2) .layui-table td:nth-child(4) {
        min-width: 150px;
    }
    
    /* 目录权限表格优化 */
    .mounted-item:last-child .layui-table {
        min-width: 550px;
    }
    
    .mounted-item:last-child .layui-table td:nth-child(4) {
        font-size: 11px;
        color: #666;
    }
    
    /* 服务器信息表格优化 */
    .mounted-item:first-child .layui-table {
        min-width: 350px;
    }
    
    .mounted-item:first-child .layui-table td:nth-child(1) {
        min-width: 80px;
    }
    
    .mounted-item:first-child .layui-table td:nth-child(2) {
        min-width: 200px;
        word-break: break-all;
    }
    
    /* 状态图标优化 */
    .green, .wrong {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
    }
    
    .green .layui-icon,
    .wrong .layui-icon {
        font-size: 18px !important;
    }
    
    /* 提示信息优化 */
    .mounted-tips {
        padding: 12px;
        font-size: 13px;
        line-height: 1.5;
        margin: 12px 0;
    }
}

/* 小屏幕手机适配 */
@media screen and (max-width: 480px) {
    .mounted-nav li {
        font-size: 12px;
        padding: 6px 8px;
        min-width: 60px;
    }
    
    .content-header {
        font-size: 15px;
    }
    
    .mounted-tips {
        font-size: 12px;
        padding: 10px;
    }
    
    /* 优化触摸区域 */
    button, 
    .btn,
    .accept-btn,
    .cancel-btn,
    .store-btn,
    .disabled-btn {
        min-height: 44px;
    }
    
    /* 调整间距 */
    .mt16 {
        margin-top: 12px;
    }
    
    /* 环境监测表格进一步优化 */
    .mounted-item:nth-child(2) .layui-table {
        min-width: 500px !important;
    }
    
    .mounted-item:nth-child(2) .layui-table th {
        font-size: 12px;
        padding: 6px 3px;
    }
    
    .mounted-item:nth-child(2) .layui-table td {
        font-size: 11px;
        padding: 6px 3px;
    }
    
    .mounted-item:nth-child(2) .layui-table th:nth-child(1),
    .mounted-item:nth-child(2) .layui-table td:nth-child(1) {
        min-width: 90px;
    }
    
    .mounted-item:nth-child(2) .layui-table th:nth-child(4),
    .mounted-item:nth-child(2) .layui-table td:nth-child(4) {
        min-width: 130px;
    }
    
    /* 目录权限表格 */
    .mounted-item:last-child .layui-table {
        min-width: 480px !important;
    }
    
    .green .layui-icon,
    .wrong .layui-icon {
        font-size: 16px !important;
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 360px) {
    .mounted-nav li {
        font-size: 11px;
        padding: 5px 6px;
        min-width: 55px;
    }
    
    .form-desc {
        font-size: 13px;
    }
    
    .content {
        font-size: 13px;
        padding: 10px;
        height: 280px;
    }
    
    /* 环境监测表格最简化 */
    .mounted-item:nth-child(2) .layui-table {
        min-width: 450px !important;
    }
    
    .mounted-item:nth-child(2) .layui-table th:nth-child(4),
    .mounted-item:nth-child(2) .layui-table td:nth-child(4) {
        min-width: 110px;
    }
    
    .mounted-item:last-child .layui-table {
        min-width: 430px !important;
    }
    
    .mounted-tips {
        font-size: 11px;
        padding: 8px;
    }
}

/* 横屏优化 */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .mounted-box {
        margin: 5px auto;
    }
    
    .mounted-content-item {
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .content {
        height: 200px;
    }
    
    .mounted-env-container {
        max-height: 50vh;
    }
    
    .success-content {
        height: auto;
        min-height: 280px;
    }
    
    .btn-group {
        margin-top: 20px;
    }
}

/* 平板设备优化 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .mounted-box {
        width: 90%;
    }
    
    .mounted-container {
        width: 100%;
    }
    
    .mounted-nav li {
        width: 120px;
    }
    
    .content-form {
        padding: 23px 30px;
    }
    
    .form-box-item div input {
        width: 280px;
    }
}

/* 打印样式优化 */
@media print {
    .mounted-nav,
    .item-btn-group,
    footer {
        display: none;
    }
    
    .mounted-box {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}