/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 页面切换 */
.page {
    display: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
}

.page.active {
    display: flex !important;
    flex-direction: column;
    z-index: 10 !important;
}

/* 登录页面样式 */
#login-page {
    display: none !important;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
}

#login-page.active {
    display: flex !important;
    z-index: 10 !important;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 10;
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-input {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-primary:hover {
    background-color: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-small {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* 备份间隔输入组 */
.interval-input-group {
    display: flex;
    gap: 0.5rem;
}

.interval-input-group .interval-value {
    flex: 3;
    min-width: 0;
}

.interval-input-group .interval-unit {
    flex: 1;
    min-width: 60px;
    max-width: 80px;
}

/* 操作按钮组 */
.operation-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.operation-btns .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.operation-btns .switch {
    margin-right: 0.3rem;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.error-message {
    color: #dc3545;
    text-align: center;
    min-height: 1.5rem;
    font-size: 0.9rem;
}

/* 主页面布局 */
#main-page {
    display: none !important;
    min-height: 100vh;
    flex-direction: column;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
}

#main-page.active {
    display: flex !important;
    z-index: 10 !important;
}

/* 系统标题 */
.system-header {
    background: white;
    padding: 1rem 0;
    text-align: center;
}

.system-title {
    color: #667eea;
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    position: relative;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    white-space: nowrap;
}

.brand-icon {
    font-size: 1.8rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.brand-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 200;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.nav-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
    margin: 3px 0;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.nav-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn:hover::before {
    opacity: 1;
}

.nav-btn.active {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn.active::before {
    opacity: 1;
}

.nav-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.nav-text {
    white-space: nowrap;
}

/* 用户信息区域 - PC端显示 */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.06) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.12);
    transition: all 0.3s;
}

.user-info:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.12);
}

/* 用户信息区域 - 紧凑版（右上角），PC端隐藏，移动端显示 */
.user-info-compact {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.06) 100%);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.12);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    position: relative;
}

.user-avatar::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid white;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.user-nickname {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.2;
}

.user-role {
    font-size: 0.7rem;
    color: #667eea;
    margin-top: 2px;
    padding: 1px 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
    border-radius: 10px;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

/* PC端用户操作按钮区域 */
.user-actions-pc {
    display: flex;
    gap: 0.4rem;
    margin-left: 0.25rem;
}

.user-actions-pc .btn {
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
}

.user-actions-pc .btn-outline {
    border-width: 1.5px;
}

.user-actions-pc .btn-danger {
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    font-size: 0.9rem;
}

/* 修改密码弹窗样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #333;
    font-size: 1.8rem;
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* 固定表格布局 */
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

/* 路径单元格样式 - 允许换行 */
.path-cell {
    white-space: normal !important;
    word-break: break-all;
    max-width: 200px;
}

/* 内容换行单元格样式 */
.wrap-cell {
    white-space: normal !important;
    word-break: break-all;
}

/* 操作记录表格特定列宽设置 */
#operate-table-body td:nth-child(7), /* 开始执行时间 */
#operate-table-body td:nth-child(8), /* 更新时间 */
#operate-table-body th:nth-child(7),
#operate-table-body th:nth-child(8) {
    width: 100px; /* 设置固定宽度 */
    max-width: 100px;
}

/* 服务器状态表格特定列宽设置 */
#state-table-body td:nth-child(4), /* 运行时间 */
#state-table-body td:nth-child(5), /* 检查时间 */
#state-table-body th:nth-child(4),
#state-table-body th:nth-child(5) {
    width: 100px; /* 设置固定宽度 */
    max-width: 100px;
}



/* 操作控制栏样式 */
.operate-control-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.current-env-hint {
    margin-top: 0;
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-width: 200px;
    display: block; /* 默认显示 */
}

.server-selector-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.server-selector-inline label {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.operation-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 美化下拉选择器 */
.form-select {
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    border: 2px solid #e0e4f0;
    border-radius: 10px;
    font-size: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    cursor: pointer;
    min-width: 160px;
    color: #333;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667eea' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.form-select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.18);
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.18);
}

/* 服务器选择器特殊装饰 */
.server-selector-inline .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23667eea' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
}

/* 服务器选择器wrapper */
.server-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.server-select-wrapper::before {
    content: '🖥️';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    z-index: 1;
    pointer-events: none;
}

.server-select-wrapper .form-select {
    padding-left: 2.4rem;
}

.records-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    color: #333;
    font-size: 1.3rem;
}

/* 日志控制栏布局 */
.log-control-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.log-control-left {
    display: none;
}

.server-selector-inline {
    flex: 0 0 auto;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.server-selector-inline label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-selector-inline .form-select {
    font-size: 1rem;
    padding: 0.7rem 2.5rem 0.7rem 2.4rem;
    min-width: 200px;
}

.log-control-right {
    margin-left: auto;
    text-align: right;
}

#refresh-log {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    white-space: nowrap;
}

/* 日志样式 */
.log-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.log-content {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 70vh;
    min-height: 500px;
    height: 70vh;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.modal-content {
    text-align: center;
}

.modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.modal-title {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
    color: #333;
}

.modal-large {
    max-width: 550px;
}

.modal-large .form-group label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.modal-large .form-group .form-input,
.modal-large .form-group .form-select {
    width: 100%;
    padding: 0.7rem;
    font-size: 1rem;
}

.modal-large .form-group {
    text-align: left;
}

.modal-large .modal-buttons {
    margin-top: 1.5rem;
}

.modal-large .error-message {
    margin-top: 1rem;
}

/* 下载进度弹窗样式 */
.download-progress {
    text-align: center;
    padding: 1rem 0;
}

.download-progress p {
    margin: 0.5rem 0;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
}

#progress-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* 响应式设计 */
/* 平板及手机横屏 */
@media (max-width: 992px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0;
    }

    .nav-brand {
        font-size: 1.3rem;
        flex: 0 1 auto;
    }

    .brand-icon {
        font-size: 1.5rem;
    }

    /* 用户信息紧凑版在移动端显示 */
    .user-info-compact {
        display: flex !important;
        flex: 0 1 auto;
    }

    /* PC端用户信息区域在移动端隐藏 */
    .user-info {
        display: none !important;
    }

    /* 移动端操作区域显示 */
    .mobile-actions {
        display: flex !important;
    }

    .nav-toggle {
        display: flex;
        order: 0;
    }

    .nav-quick-icons {
        display: flex !important;
        flex: 1;
        justify-content: flex-start;
    }

    .nav-menu {
        display: none;
        order: 5;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
        background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
        border-radius: 12px;
        margin-top: 0.5rem;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    }

    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem 1.25rem;
        border-radius: 8px;
        font-size: 1rem;
    }

    .nav-btn:hover {
        transform: none;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }

    .user-actions .btn {
        flex: 1;
        max-width: 140px;
    }

    /* 重置PC端的表格最小宽度 */
    .data-table {
        min-width: 800px;
    }

    .data-table th,
    .data-table td {
        min-width: 100px;
    }
    #login-page {
        padding: 1rem;
    }

    .login-container {
        padding: 1.5rem;
        max-width: 90%;
        margin: 1rem;
    }

    .login-title {
        font-size: 1.4rem;
    }

    .system-header {
        padding: 1rem;
        background: white;
    }

    .system-title {
        font-size: 1.5rem;
        color: #667eea;
    }

    .main-content {
        padding: 1rem;
    }

    .operate-control-bar {
        padding: 1rem;
        gap: 1rem;
        align-items: center;
    }

    .control-group {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }

    .server-selector-inline,
    .operation-selector {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }

    .server-select-wrapper {
        flex: 1;
    }

    .server-select-wrapper .form-select {
        width: 100%;
    }

    .server-selector-inline label,
    .operation-selector label {
        white-space: nowrap;
        font-size: 1rem;
        margin-bottom: 0;
    }

    .form-select {
        flex: 1;
        min-width: auto;
        font-size: 1rem;
        padding: 0.7rem 2.5rem 0.7rem 1rem;
        border-radius: 10px;
    }

    .operation-selector {
        flex-direction: row;
        gap: 0.5rem;
    }

    .operation-selector .form-select {
        flex: 2;
    }

    .operation-selector .btn {
        flex: 1;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .log-control-bar {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .log-control-left {
        display: none;
    }

    .log-control-right {
        margin-left: auto;
        text-align: right;
    }

    .log-container {
        height: auto;
        min-height: 400px;
        padding: 1rem;
    }

    .log-content {
        max-height: 60vh;
        min-height: 300px;
        height: 60vh;
        font-size: 0.8rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .page-header h2 {
        text-align: center;
        font-size: 1.5rem;
    }

    .page-header .btn {
        align-self: center;
        width: 100%;
        max-width: 200px;
    }

    .data-table {
        font-size: 0.85rem;
        min-width: 100%;
        table-layout: auto;
    }

    .data-table th,
    .data-table td {
        padding: 0.6rem 0.4rem;
        white-space: nowrap;
        font-size: 0.8rem;
        min-width: 80px;
    }

    /* 移动端表格容器增强 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* 平滑滚动 */
        scrollbar-width: thin;
        scrollbar-color: #667eea #f1f1f1;
    }

    .table-container::-webkit-scrollbar {
        height: 8px;
    }

    .table-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 4px;
    }

    .table-container::-webkit-scrollbar-thumb:hover {
        background: #5a6fd8;
    }

    /* 移动端特定列优化 */
    #operate-table-body td:nth-child(1), /* 服务器 */
    #operate-table-body th:nth-child(1),
    #state-table-body td:nth-child(1), /* 服务器 */
    #state-table-body th:nth-child(1) {
        min-width: 100px;
    }

    #operate-table-body td:nth-child(4), /* 操作类型 */
    #operate-table-body th:nth-child(4),
    #state-table-body td:nth-child(3), /* 容器名称 */
    #state-table-body th:nth-child(3) {
        min-width: 120px;
    }

    /* 版本号列在移动端调整 */
    #operate-table-body td:nth-child(6), /* 服务器版本号 */
    #operate-table-body th:nth-child(6),
    #state-table-body td:nth-child(5), /* 游戏版本号 */
    #state-table-body th:nth-child(5) {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
    }

    /* 时间列在移动端保持合理宽度 */
    #operate-table-body td:nth-child(7),
    #operate-table-body td:nth-child(8),
    #operate-table-body th:nth-child(7),
    #operate-table-body th:nth-child(8),
    #state-table-body td:nth-child(6),
    #state-table-body td:nth-child(7),
    #state-table-body th:nth-child(6),
    #state-table-body th:nth-child(7) {
        width: 100px;
        min-width: 100px;
        max-width: 120px;
    }

    /* 错误信息列在移动端可以适当缩小 */
    #operate-table-body td:nth-child(7), /* 错误信息 */
    #operate-table-body th:nth-child(7) {
        min-width: 100px;
        max-width: 150px;
    }

    /* 分页控件移动端优化 */
    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .pagination button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
        min-width: 36px;
        height: 36px;
    }

    /* 弹窗移动端优化 */
    .modal {
        padding: 1.5rem;
        max-width: 95%;
        margin: 1rem;
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .form-input {
        padding: 0.7rem;
        font-size: 1rem;
    }

    .current-env-hint {
        font-size: 0.9rem;
        padding: 0.6rem;
        text-align: center;
    }
}

/* 手机竖屏 */
@media (max-width: 480px) {
    .navbar {
        padding: 0.6rem;
        gap: 0;
    }

    .nav-brand {
        font-size: 1.1rem;
        gap: 0.5rem;
    }

    .brand-icon {
        font-size: 1.3rem;
    }

    .brand-text {
        display: inline;
    }

    /* 用户信息紧凑版 */
    .user-info-compact {
        gap: 0.4rem;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
    }

    .hamburger-line {
        width: 20px;
        height: 2px;
        margin: 2px 0;
    }

    .nav-menu {
        padding: 0.75rem 0;
        margin-top: 0.4rem;
    }

    .nav-btn {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }

    .nav-icon {
        font-size: 1.1rem;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .user-nickname {
        font-size: 0.9rem;
    }

    .user-role {
        font-size: 0.7rem;
        padding: 1px 6px;
    }

    .user-actions {
        gap: 0.4rem;
    }

    .user-actions .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        max-width: none;
    }

    .btn-icon {
        font-size: 0.9rem;
    }

    .btn-text {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .operate-control-bar {
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .control-group {
        gap: 0.8rem;
    }

    .server-selector-inline label,
    .operation-selector label {
        font-size: 0.9rem;
    }

    .form-select {
        padding: 0.6rem 2.2rem 0.6rem 2.2rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .data-table {
        font-size: 0.75rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.7rem;
        min-width: 60px;
    }

    /* 超小屏幕表格列宽进一步优化 */
    #operate-table-body td:nth-child(1),
    #operate-table-body th:nth-child(1),
    #state-table-body td:nth-child(1),
    #state-table-body th:nth-child(1) {
        min-width: 80px;
    }

    #operate-table-body td:nth-child(4),
    #operate-table-body th:nth-child(4),
    #state-table-body td:nth-child(3),
    #state-table-body th:nth-child(3) {
        min-width: 100px;
    }

    /* 时间列最小化 */
    #operate-table-body td:nth-child(7),
    #operate-table-body td:nth-child(8),
    #operate-table-body th:nth-child(7),
    #operate-table-body th:nth-child(8),
    #state-table-body td:nth-child(4),
    #state-table-body td:nth-child(5),
    #state-table-body th:nth-child(4),
    #state-table-body th:nth-child(5) {
        width: 80px;
        min-width: 80px;
        max-width: 100px;
    }

    .log-content {
        font-size: 0.7rem;
        padding: 0.6rem;
    }

    .pagination button {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        min-width: 32px;
        height: 32px;
    }

    .modal {
        padding: 1rem;
        max-width: 98%;
        margin: 0.5rem;
    }

    .modal-content h3 {
        font-size: 1.1rem;
    }

    .form-input {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 状态颜色 */
/* 服务器状态颜色 */
.status-running {
    color: #28a745;
    font-weight: bold;
}

.status-stopped {
    color: #dc3545;
    font-weight: bold;
}

.status-created {
    color: #17a2b8;
    font-weight: bold;
}

.status-paused {
    color: #6c757d;
    font-weight: bold;
}

.status-exited {
    color: #6f42c1;
    font-weight: bold;
}

.status-dead {
    color: #343a40;
    font-weight: bold;
}

.status-restarting {
    color: #fd7e14;
    font-weight: bold;
}

.status-removing {
    color: #e83e8c;
    font-weight: bold;
}

.status-other {
    color: #ffc107;
    font-weight: bold;
}

/* 操作记录状态颜色 */
.status-success {
    color: #28a745;
    font-weight: bold;
}

.status-failed {
    color: #dc3545;
    font-weight: bold;
}

.status-wait_to_execute {
    color: #17a2b8;
    font-weight: bold;
}

.status-executing {
    color: #fd7e14;
    font-weight: bold;
}

.status-starting {
    color: #007bff;
    font-weight: bold;
}

.status-canceled {
    color: #6c757d;
    font-weight: bold;
}

/* 备份配置表单样式 */
.backup-config-form {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-row .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-row .form-group .form-input,
.form-row .form-group .form-select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-row .form-group .form-input:focus,
.form-row .form-group .form-select:focus {
    outline: none;
    border-color: #667eea;
}

.switch-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.button-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

/* 移动端操作区域 */
.mobile-actions {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    order: 4;
}

.mobile-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 折叠按钮固定在左边 */
.mobile-nav-row .nav-toggle {
    position: absolute;
    left: 0;
}

/* 快捷图标居中 */
.nav-quick-icons {
    display: none;
    gap: 0.2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-quick-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(102, 126, 234, 0.06);
    font-size: 1.15rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-quick-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateY(-1px);
}

.nav-quick-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* 管理员快捷图标默认隐藏 */
.nav-quick-btn.super-admin-quick {
    display: none;
}

/* 平板及手机横屏 */
@media (max-width: 992px) {