/* 全局重置 & 基础配置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    transition: all 0.3s ease; /* 全局过渡动画 */
}

/* 背景图配置 */
body {
    background: url('') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    min-height: 100vh;
    padding: 20px;
}

/* 背景蒙版 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 247, 250, 0.92);
    z-index: -1;
}

/* 密码验证弹窗样式 */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h2 {
    margin-bottom: 24px;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
}

.modal-content input {
    width: 100%;
    padding: 14px 18px;
    margin: 12px 0 24px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f8f9fa;
}

.modal-content input:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
    background-color: white;
}

.modal-content button {
    padding: 12px 36px;
    background-color: #409eff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
	min-width: 104px;
}

.modal-content button:hover {
    background-color: #337ecc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
}

.error-tip {
    color: #f56c6c;
    margin-top: 12px;
    /* display: none; */
    font-size: 14px;
}

/* 分组配置弹窗样式 */
.group-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /*display: none;*/
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.group-modal .modal-content {
    max-width: 540px;
}

.group-list {
    width: 100%;
    border: 1px solid #e8f4f8;
    border-radius: 8px;
    margin: 24px 0;
    max-height: 320px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e1e8ed;
}

.group-item:last-child {
    border-bottom: none;
}

.group-item:hover {
    background-color: #e8f4f8;
}

.group-item input {
    width: 70%;
    padding: 8px 12px;
    margin: 0;
    font-size: 14px;
    border-radius: 6px;
}

.group-operate {
    display: flex;
    /*gap: 10px;*/
}

.group-save, .group-cancel {
    padding: 8px 18px;
    font-size: 14px;
    margin: 0 6px;
    border-radius: 6px;
    font-weight: 500;
}

.group-add {
    background-color: #67c23a;
    margin-bottom: 12px;
    border-radius: 8px;
}

.group-add:hover {
    background-color: #5eba2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 194, 58, 0.2);
}

.group-edit {
    background-color: #e6a23c;
    border-radius: 6px;
}

.group-edit:hover {
    background-color: #d49432;
    box-shadow: 0 2px 8px rgba(230, 162, 60, 0.2);
}

.group-del {
    background-color: #f56c6c;
    border-radius: 6px;
}

.group-del:hover {
    background-color: #f35454;
    box-shadow: 0 2px 8px rgba(245, 108, 108, 0.2);
}

/* 主页面样式 */
.main-page {
    /* display: none; */
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 20px; */
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 30px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #e8f4f8;
}

.page-title {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* 展示模式切换样式 */
.show-mode {
    display: flex;
    gap: 12px;
}

.mode-btn {
    padding: 10px 20px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.mode-btn.active {
    background-color: #409eff;
    color: white;
    border-color: #409eff;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
}

.mode-btn:hover:not(.active) {
    border-color: #409eff;
    color: #409eff;
    background-color: #f0f7ff;
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: 18px;
    margin: 0 0 24px 0;
}

/* 分组表格容器 */
.group-table-container {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
}

/* 单个分组表格样式 */
.single-group-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e8f4f8;
}

.single-group-title {
    padding: 18px 24px;
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8f4f8;
}

.single-group-title h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

/* 表格样式 */
.service-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.single-group-card .service-table {
    box-shadow: none;
    border-radius: 0;
}

.service-table th, .service-table td {
    padding: 18px;
    text-align: center;
    border-bottom: 1px solid #e8f4f8;
}

.service-table th {
    background-color: #f0f7ff;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    position: relative;
    font-size: 14px;
}

.service-table th:hover {
    color: #409eff;
    background-color: #e8f4f8;
}

.service-table tr {
    transition: background-color 0.2s ease;
}

.service-table tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.005);
}

/* 排序箭头样式 */
.sort-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #2c3e50;
    font-weight: bold;
}

/* 通用输入框/下拉框样式 */
.form-input, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    text-align: center;
    outline: none;
    color: #2c3e50;
    font-size: 14px;
    background-color: #f8f9fa;
}

.form-input:focus, .form-select:focus {
    border-color: #409eff;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

/* 服务地址列展示态样式 */
.link-cell {
    position: relative;
    cursor: pointer;
}

.link-jump {
    color: #409eff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.link-jump:hover {
    text-decoration: underline;
    color: #337ecc;
}

.link-tooltip {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c3e50;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    display: none;
    z-index: 999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* tooltip小三角 */
.link-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #2c3e50 transparent transparent;
}

.link-cell:hover .link-tooltip {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 按钮通用样式 */
.base-btn {
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 6px;
    font-weight: 500;
}

.big-btn {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
}

.add-btn {
    background-color: #67c23a;
}

.add-btn:hover {
    background-color: #5eba2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 194, 58, 0.2);
}

.config-btn {
    background-color: #409eff;
}

.config-btn:hover {
    background-color: #337ecc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
}

.edit-btn {
    background-color: #e6a23c;
}

.edit-btn:hover {
    background-color: #d49432;
    box-shadow: 0 2px 8px rgba(230, 162, 60, 0.2);
}

.del-btn {
    background-color: #f56c6c;
}

.del-btn:hover {
    background-color: #f35454;
    box-shadow: 0 2px 8px rgba(245, 108, 108, 0.2);
}

.save-btn {
    background-color: #67c23a;
}

.save-btn:hover {
    background-color: #5eba2f;
    box-shadow: 0 2px 8px rgba(103, 194, 58, 0.2);
}

.cancel-btn {
    background-color: #909399;
}

.cancel-btn:hover {
    background-color: #73767a;
    box-shadow: 0 2px 8px rgba(144, 147, 153, 0.2);
}

/* 空数据提示样式 */
.empty-tip {
    padding: 40px;
    text-align: center;
    color: #909399;
    font-size: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* 加载动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 响应式适配 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .page-title {
        font-size: 28px;
    }

    .service-table th, .service-table td {
        padding: 14px 8px;
        font-size: 14px;
    }

    .btn-group {
        flex-direction: column;
        gap: 12px;
    }

    .big-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .base-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .group-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .group-item input {
        width: 100%;
    }

    .sort-arrow {
        right: 6px;
        font-size: 12px;
    }

    .single-group-title {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .mode-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .modal-content {
        padding: 30px 20px;
    }
}

/* 编辑服务弹窗样式 */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.edit-modal .modal-content {
    max-width: 500px;
    width: 90%;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.edit-modal h2 {
    margin-bottom: 24px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.service-table td:nth-child(1) {
    min-width: 100px;
}