/* =============================================
   导入数据面板样式
   ============================================= */

/* 导入选项面板 - 背景遮罩 */
.import-options-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

/* 导入选项面板内容 */
.import-panel-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.import-panel-content h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* 导入统计信息 */
.import-stats {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

.import-stats p {
    margin: 0 0 8px 0;
    font-weight: bold;
    color: #555;
}

.import-stats ul {
    margin: 0;
    padding-left: 20px;
}

.import-stats li {
    margin-bottom: 4px;
    color: #666;
    font-size: 14px;
}

/* 导入模式选择 */
.import-mode {
    margin-bottom: 20px;
}

.import-mode label {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.import-mode label:hover {
    background-color: #f5f5f5;
}

.import-mode input[type="radio"] {
    margin-right: 8px;
}

/* 导入操作按钮 */
.import-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.confirm-btn:hover {
    background: #45a049;
}

.cancel-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background: #da190b;
}

/* 导入进度提示 */
.import-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    min-width: 300px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.progress-content p {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 16px;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    animation: progressPulse 2s infinite;
}

/* 完成状态样式 */
.progress-content.complete {
    background: #f8fff8;
    border: 1px solid #4CAF50;
}

.progress-content.complete h3 {
    color: #4CAF50;
    margin-bottom: 12px;
}

.progress-content.complete p {
    margin-bottom: 8px;
    color: #666;
}

.progress-content.complete button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 12px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressPulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .import-panel-content {
        width: 95%;
        padding: 16px;
        margin: 20px;
    }
    
    .import-actions {
        flex-direction: column;
    }
    
    .import-progress {
        min-width: 250px;
        margin: 0 20px;
    }
}

@media (max-width: 480px) {
    .import-panel-content {
        padding: 12px;
    }
    
    .import-stats {
        padding: 12px;
    }
    
    .confirm-btn, .cancel-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
/* 清除进度提示框样式 */
#clear-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 25px 35px;
    border-radius: 10px;
    z-index: 10000;
    font-size: 16px;
    text-align: center;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 旋转加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式适配 */
@media (max-width: 768px) {
    #clear-progress {
        padding: 20px 25px;
        font-size: 14px;
        min-width: 250px;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    #clear-progress {
        padding: 15px 20px;
        font-size: 13px;
        min-width: 200px;
        max-width: 350px;
    }
}
/* ============================================= */
/* 基础样式重置 */
/* ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* ============================================= */
/* 布局容器 */
/* ============================================= */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.container h2 {
    text-align: center;
    color: #2c3e50;
    font-weight: 700;
    font-size: 32px;
    margin-bottom: 20px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* ============================================= */
/* 窗口置顶按钮 */
/* ============================================= */
#pin-window-btn {
    background-color: #3498db;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#pin-window-btn:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

#pin-window-btn.pinned {
    background-color: #e74c3c;
}


/* 欢迎信息样式 */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    animation: fadeIn 0.5s ease;
}

.welcome-message h3 {
    color: white;
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome-message p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

/* 留言列表头部样式 */
.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.messages-header h2 {
    margin: 0;
    color: #333;
}
/* 头部控制区域 */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
/* 自动刷新控制 -大边框 */
.auto-refresh-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    background: transparent; /* 移除渐变背景 */
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: none; /* 移除阴影 */
    height: 40px;
    box-sizing: border-box;
}

.auto-refresh-control:hover {
    background: #f8f9fa; /* 简单的悬停背景 */
    border-color: #adb5bd;
    box-shadow: none; /* 移除悬停阴影 */
    transform: translateY(-1px);
}

.auto-refresh-control:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 隐藏原生复选框，使用自定义样式 */
.auto-refresh-control input[type="checkbox"] {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
}
.auto-refresh-control label {
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    line-height: 1;
}

/* 自定义复选框外观 */
.auto-refresh-control label::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.auto-refresh-control label::after {
    content: "✓";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    color: white;
    font-size: 12px;
    font-weight: bold;
    transition: transform 0.3s ease;
    z-index: 3;
}

/* 复选框选中状态 */
.auto-refresh-control input[type="checkbox"]:checked + label::before {
    background: #4CAF50; /* 改为纯色背景 */
    border-color: #4CAF50;
    box-shadow: none; /* 移除选中阴影 */
}

.auto-refresh-control input[type="checkbox"]:checked + label::after {
    transform: translateY(-50%) scale(1);
}
.refresh-label{
    /* border: 1px solid #0c63b9; */
    margin-top: 10px;
}
/* 时间选择器样式 */
.auto-refresh-control select {
    /* padding: 4px 8px; */
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    width: 60px;
    height: 24px;
        

}

.auto-refresh-control select:hover {
    border-color: #adb5bd;
}

.auto-refresh-control select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 刷新按钮样式 - 无背景版 */
.refresh-btn {
    background: #f8f9fa; /* 改为简单的背景色 */
    color: #000000; /* 改为深色文字 */
    border: 2px solid #dee2e6; /* 添加边框 */
    padding: 4px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: none; /* 移除阴影 */
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 85px;
    justify-content: center;
    height: 40px;
    box-sizing: border-box;
}

.refresh-btn:hover {
    background: #017cf7; /* 简单的悬停背景 */
    border-color: #adb5bd;
    box-shadow: none; /* 移除悬停阴影 */
    color: #ffffff;
}

.refresh-btn:active {
    background: #007000;
    box-shadow: none;
    color: #ffffff;
}

.refresh-btn:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* 优雅的加载状态 */
    .refresh-btn.refreshing {
        background: linear-gradient(135deg, #45a049, #3d8b40);
        opacity: 0.9;
    }
    

.refresh-btn.refreshing::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #495057; /* 改为深色旋转图标 */
    border-radius: 50%;
    animation: gentleSpin 1s linear infinite;
}

@keyframes gentleSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 移除流光效果 */
.refresh-btn::before {
    display: none; /* 移除流光动画 */
}
/* 响应式调整 */
@media (max-width: 600px) {
    .header-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    /* 自动刷新控制大边框 */
    .auto-refresh-control {
        min-width: auto;
        width: 100%;
        justify-content: space-between;
        height: auto;
        flex-wrap: nowrap;
        padding:0 5px;
        /* border: 1px solid #ce480a; */
    }
     /* 自动刷新控制 下拉选择框 */
    .auto-refresh-control select {
        width: 60px;
        /* width: auto; */
        /* margin-top: 5px; */
        /* border: 1px solid #ce480a; */

    }
    
    .refresh-btn {
        min-width: auto;
        width: 100%;
        height: 38px;
        background: #f8f9fa; /* 默认背景色 */
        color: #495057;
        border: 1px solid #ced4da;
        outline: none; /* 移除默认焦点轮廓 */
        -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
        transition: background-color 0.2s ease, color 0.2s ease; /* 添加过渡效果 */
    }
    
    .refresh-btn:hover {
        background: #017cf7; /* 悬停背景色 */
        color: #ffffff;
        border-color: #adb5bd;
    }
    
    .refresh-btn:active {
        background: #007000; /* 点击背景色 */
        color: #ffffff;
    }
    
    /* 移动端特殊处理：点击后强制恢复默认状态 */
    .refresh-btn:not(:active):not(.refreshing) {
        background: #f8f9fa !important; /* 强制恢复默认背景 */
        color: #495057 !important;
        border-color: #ced4da !important;
    }
    
    .refresh-btn:disabled {
        background: #adb5bd;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
        opacity: 0.7;
    }
    
    /* 优雅的加载状态 */
    .refresh-btn.refreshing {
        background: linear-gradient(135deg, #45a049, #3d8b40);
        opacity: 0.9;
    }
    
    .refresh-btn.refreshing::after {
        content: "";
        width: 16px;
        height: 16px;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
        animation: gentleSpin 1s linear infinite;
    }
}
@keyframes gentleSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================= */
/* 登录区域 */
/* ============================================= */
.login-area {
    padding: 15px 20px;
    margin-bottom: 20px;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-status {
    font-size: 14px;
    color: #7f8c8d;
}

.login-form {
    display: block;
    position:absolute;
    flex-direction: row;
    gap: 12px;
    left:20px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 700px;
    /* border: 1px solid #0867c6; */
    /* justify-content: center; */
}



.login-form input[type="text"] {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 14px;
    max-width: 160px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
    text-align: center;
}

.login-form input[type="text"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
    width: 180px;
}

#loginPassword {
    -webkit-text-security: disc;
    -moz-text-security: disc;
}

.login-form button {
    padding: 12px 30px;
    font-size: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.login-form button:active {
    transform: translateY(0);
}
/* ============================================= */
/* 用户信息区域 - 优化布局 */
/* ============================================= */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #2c3e50;
    flex-wrap: wrap; /* 允许换行 */
    white-space: normal; /* 允许换行 */
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* margin-top:-50px; */
}

.user-info p {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}

.logout-btn, .management-btn, .panel-btn {
    padding: 8px 16px;
    font-size: 14px;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap; /* 按钮文字不换行 */
    transition: all 0.3s ease;
    margin-top:-50px;
}

.logout-btn {
    background-color: #e74c3c;
    position: absolute;
    top:146.5px;
    left:150px;
}

.logout-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.management-btn {
    position: absolute;
    top:146.5px;
    left:220px;
    background-color: #00a1a7;
}

.management-btn:hover {
    background-color: #008c96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 161, 167, 0.3);
}

.panel-btn {

    
    background-color: #00b87a;
}
/* 管理面板 */
#managementPanel {
    
    /* position:absolute; */
    margin-top:10px;
    /* border:1px solid red; */
}

/* ============================================= */
/* 留言表单 */
/* ============================================= */
.message-form {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    margin-top:10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

input[type="text"], textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

#submitBtn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#submitBtn:hover {
    background-color: #2980b9;
}

/* ============================================= */
/* 留言列表容器 */
/* ============================================= */
.messages-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    /* 添加右边框作为参考 */
    border-right: 1px solid transparent;
}

.no-messages {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px;
}

/* ============================================= */
/* 留言项样式 */
/* ============================================= */
.message {
    border-bottom: 1px solid #466843;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* 确保子元素不会超出边界 */
}

/* 交替留言背景色 */
.message:nth-child(odd) {
    background-color: #f8f9fa; /* 浅灰色 */
}

.message:nth-child(even) {
    background-color: #ffffff; /* 白色 */
}

/* 置顶留言特殊样式 */
.message.pinned {
    border-left: 4px solid #ff9800;
    background-color: #fff8e1;
}

.pinned-badge {
    background-color: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    font-weight: bold;
}

/* ============================================= */
/* 回复项样式 - 调整回复按钮位置 */
/* ============================================= */
.reply {
    border-left: 3px solid #3498db;
    padding: 5px;
    margin-bottom: 2px;
    margin-left:-5px;
    border-radius: 6px;
    background-color: #f0f8ff; /* 浅蓝色 */
    border-top:1px solid #019138;
}

/* 交替回复背景色 */
.reply:nth-child(odd) {
    background-color: #f0f8ff; /* 浅蓝色 */
}

.reply:nth-child(even) {
    background-color: #f5f0ff; /* 浅紫色 */
}

/* 嵌套回复背景色 */
.nested-reply {
    

    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 0 5px 5px 0; /* 右上角和右下角圆角 */
    padding: 10px;
    margin-bottom: 10px;
    /* 关键：完全移除右边框，让内容扩展到父级的右边框 */
    border-right: none;
    /* 关键：设置负右边距，使内容区域扩展到父级的右边框 */
    margin-right: -10px; /* 抵消父级的内边距 */
    padding-right: 10px; /* 调整内边距，保持内容对齐 */
    /* 扩大内容区域宽度 */
    width: calc(100% + 10px); /* 扩展宽度以利用额外空间 */
}

/* 嵌套回复交替背景色 */
.nested-reply:nth-child(odd) {
    background-color: #f9f9f9; /* 浅灰色 */
}

.nested-reply:nth-child(even) {
    background-color: #f0f0f0; /* 稍深灰色 */
}


/* ============================================= */
/* 留言头部布局 - 调整按钮位置 */
/* ============================================= */
.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.message-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-author {
    font-weight: bold;
    color: #2c3e50;
}

.message-time {
    color: #7f8c8d;
    font-size: 14px;
    margin-right: auto; /* 将后续按钮推到右边 */
}

/* 留言内容也扩大显示区域 */
.message-content {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
    border-bottom: none;
    /* 扩大文字显示区域 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%; /* 允许文字使用全部可用宽度 */
}

/* ============================================= */
/* 留言按钮组 - 调整按钮位置 */
/* ============================================= */
.message-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 回复按钮放在留言人左边 */
.message-actions .reply-btn {
    order: -1; /* 放在最左边 */
    margin-right: 10px;
}

/* 展开回复按钮放在留言人右边 */
.message-actions .toggle-btn {
    order: 0;
    margin-right: 10px;
}

/* 管理员操作按钮组 */
.admin-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto; /* 推到最右边 */
}

/* 删除按钮放在时间右边 */
.admin-actions .delete-btn {
    order: 1;
}

/* 置顶按钮放在留言区右上角 */
.admin-actions .pin-btn, .admin-actions .unpin-btn {
    order: 2;
}

/* ============================================= */
/* 按钮样式 */
/* ============================================= */
.reply-btn, .toggle-btn, .delete-btn, .pin-btn, .unpin-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reply-btn {
    background-color: #27ae60;
    color: white;
}

.reply-btn:hover {
    background-color: #229954;
}

.toggle-btn {
    background-color: #95a5a6;
    color: white;
}

.toggle-btn:hover {
    background-color: #7f8c8d;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.pin-btn, .unpin-btn {
    background-color: #ff9800;
    color: white;
}

.pin-btn:hover, .unpin-btn:hover {
    background-color: #f57c00;
}

/* ============================================= */
/* 回复表单 */
/* ============================================= */
.reply-form {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.reply-form.active {
    display: block;
}

.reply-target-info {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-style: italic;
}

.form-buttons {
    display: flex;
    gap: 10px;
}

/* ============================================= */
/* 回复列表 */
/* ============================================= */
.replies {
    margin-left: 0; /* 移除左边距 */
    margin-top: 15px;
    padding: 10px;
    padding-bottom: 0; /* 移除下内边距，使最后一个回复项的下边缘与留言模块的下边缘对齐 */
    background-color: #fafafa;
    border-radius: 0 6px 6px 0; /* 右上角和右下角圆角 */
    /* border-left: 2px solid #e0e0e0; */
    /* 关键：完全移除右边框，让内容扩展到留言模块的右边框 */
    border-right: none;
    margin-right: 0; /* 确保右边距为0 */
    /* 关键：设置负右边距，使内容区域扩展到留言模块的右边框 */
    margin-right: -25px; /* 抵消留言容器的padding */
    padding-right: 25px; /* 调整内边距，保持内容对齐 */
    /* 扩大内容区域宽度 */
    width: calc(100% + 25px); /* 扩展宽度以利用额外空间 */
    /* 确保最后一个回复项的下边框与留言模块的下边框对齐 */
    margin-bottom: -20px; /* 抵消留言模块的padding-bottom */
}

.replies.collapsed {
    display: none;
}


/* ============================================= */
/* 嵌套回复 */
/* ============================================= */
.nested-replies {
    display: block !important;
    margin-left: 2px;
    /* border-left: 2px solid #e0e0e0; */
    padding-left: 2px;
    margin-top: 10px;
    background-color: #f5f5f5;
    border-radius: 0 4px 4px 0; /* 右上角和右下角圆角 */
    padding: 8px 8px 0 8px; /* 调整内边距，移除底部内边距 */
    /* 关键：完全移除右边框，让内容扩展到父级的右边框 */
    border-right: none;
    margin-right: 0; /* 确保右边距为0 */
    /* 关键：设置负右边距，使内容区域扩展到父级的右边框 */
    margin-right: -2px; /* 抵消父级的左边距 */
    margin-bottom: 0; /* 移除底部外边距 */
    padding-right: 2px; /* 调整内边距，保持内容对齐 */
    /* 扩大内容区域宽度 */
    width: calc(100% + 2px); /* 扩展宽度以利用额外空间 */
}

.nested-replies.collapsed {
    display: none !important;
}

.nested-reply {
   background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 0 5px 5px 0; /* 右上角和右下角圆角 */
    padding: 3px;
    margin-bottom: 3px;
    /* 添加右边框与父级对齐 */
    border-right: 1px solid #e0e0e0;
    /* 关键：设置负右边距，使右边框与父级内容区域对齐 */
    margin-right: -3px; /* 抵消父级的内边距 */
    padding-right: 3px; /* 调整内边距，保持内容对齐 */
}

/* 最后一个嵌套回复项不显示下边距 */
.nested-reply:last-child {
    margin-bottom: 0;
}

/* ============================================= */
/* 回复项样式 - 调整回复按钮位置 */
/* ============================================= */

/* 最后一个回复项不显示下边距 */
.reply:last-child {
    margin-bottom: 0;
}

.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 8px;
}

.reply-author {
    font-weight: bold;
    color: #2c3e50;
}

.reply-time {
    color: #7f8c8d;
    font-size: 12px;
    margin-right: auto; /* 将后续按钮推到右边 */
}

.parent-author {
    color: #7f8c8d;
    font-style: italic;
    font-size: 12px;
}

.reply-content {
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
    /* border-bottom: 1px solid #1f4fd4; */
    /* 扩大文字显示区域 */
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%; /* 允许文字使用全部可用宽度 */
}
.nested-reply .reply-content {
    max-width: 100%; /* 嵌套回复也使用全部可用宽度 */
}

/* ============================================= */
/* 回复按钮组 - 调整回复按钮位置 */
/* ============================================= */
.reply-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid #807700;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

/* 回复按钮放在回复人右边 */
.reply-actions .reply-to-reply-btn {
    order: 0; /* 放在最右边 */
}

/* 回复按钮放在回复人左边 */
.reply-actions .reply-to-reply-btn {
    order: -1; /* 放在最左边 */
    margin-right: 8px;
}

/* 展开回复按钮放在回复人右边 */
.reply-actions .toggle-btn {
    order: 0;
    margin-right: 8px;
}

/* 管理员操作按钮组 */
.reply-actions .admin-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto; /* 推到最右边 */
}

/* 删除按钮放在时间右边 */
.reply-actions .admin-actions .delete-btn {
    order: 1;
}

/* ============================================= */
/* 置顶相关样式 */
/* ============================================= */
.message.pinned {
    border-left: 4px solid #ff9800;
    background-color: #fff8e1;
}

.pinned-badge {
    background-color: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    font-weight: bold;
}
/* ============================================= */
/* 管理员标识样式 */
/* ============================================= */
.admin-badge {
    background-color: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-right: 6px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 管理员留言和回复的特殊样式 */
.message .admin-badge,
.reply .admin-badge {
    vertical-align: middle;
    display: inline-block;
    line-height: 1;
}
/* ============================================= */
/* 响应式设计 */
/* ============================================= */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }
    /* 登录表单 */
    .login-form input[type="text"] {
        padding: 8px 8px;
        border: 2px solid #e0e0e0;
        border-radius: 25px;
        gap:25px;
        font-size: 14px;
        width: 100px;
        background: #f8f9fa;
        transition: all 0.3s ease;
        outline: none;
        
    }
    .login-form input[type="text"]:focus {
        border-color: #667eea;
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
        width: 100px;
    }
    .login-form .login-in {
        margin-left: 10px; /* 调整登录按钮的位置 */
        padding: 6px 12px;
    }

    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 15px;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    #pin-window-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        margin-left: 0;
    }
    
    .login-area {
        display:flex;
        /* flex-direction: row;
        align-items: stretch; */
    }
    
    .login-form {
    width: 320px;
    }
   
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        /* margin-top:-50px; */
    }
    
    .message-form {
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    input[type="text"], textarea {
        font-size: 16px;
        padding: 12px;
    }
    
    button[type="submit"] {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
    
    .message {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .message-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
        /* 修改：保持按钮在一行显示 */
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .reply-form {
        padding: 15px;
    }
    
    /* 修改：减少移动端回复模块的左边距缩进 */
    .replies {
        margin-left: 2px; /* 保持与网页端一致的左缩进 */
        margin-right: 0; /* 确保右边距为0 */
        padding-left: 2px; /* 保持与网页端一致的内边距 */
        padding-right: 0; /* 移除内边距 */
        width: 100%; /* 使用100%宽度 */
        border-left: 2px solid #e0e0e0; /* 添加左边框 */
        border-radius: 0 4px 4px 0; /* 添加圆角 */
        background-color: #f5f5f5; /* 添加背景色 */
    }
    
    /* 修改：减少嵌套回复模块的缩进 */
    .nested-replies {
        margin-left: 5px; /* 保持与网页端一致的左缩进 */
        margin-right: 0; /* 确保右边距为0 */
        padding-left: 5px; /* 保持与网页端一致的内边距 */
        padding-right: 0; /* 移除内边距 */
        width: 100%; /* 使用100%宽度 */
        border-left: none; /* 添加左边框 */
        border-radius: 0 4px 4px 0; /* 添加圆角 */
        background-color: #f5f5f5; /* 添加背景色 */
    }
    
    /* 修改：减少嵌套回复项的缩进 */
    .nested-reply {
        margin-left: 0; /* 改为0，移除缩进 */
        margin-right: 0; /* 确保右边距为0 */
        padding: 5px; /* 保持适当内边距 */
        border: 1px solid #e0e0e0; /* 保持边框 */
        border-radius: 0 5px 5px 0; /* 添加圆角 */
        width: 100%; /* 使用100%宽度 */
    }
    
    .logout-btn {
        position: absolute;
        top:131.5px;
        left:130px;
    }
    
    .management-btn {
        position: absolute;
        top:131.5px;
        left:200px;
    }
    
    /* 管理面板 */
    #managementPanel {
        display:flex;
        flex-direction:column;
        margin-top:10px;
    }
    
    /* 移动端按钮位置调整 - 修改为一行显示 */
    .message-actions, .reply-actions {
        flex-direction: row; /* 改为水平排列 */
        flex-wrap: wrap; /* 允许换行 */
        gap: 8px; /* 按钮间距 */
        justify-content: flex-start; /* 左对齐 */
        align-items: center;
    }
    
    /* 留言按钮样式调整 */
    .message-actions .reply-btn,
    .message-actions .toggle-btn {
        order: initial;
        margin: 0;
        width: auto; /* 取消100%宽度 */
        text-align: center; /* 居中显示 */
        flex-shrink: 0; /* 防止按钮被压缩 */
        min-width: 60px; /* 最小宽度 */
        padding: 6px 10px; /* 调整内边距 */
        font-size: 12px; /* 调整字体大小 */
    }
    
    /* 回复按钮样式调整 */
    .reply-actions .reply-to-reply-btn,
    .reply-actions .toggle-btn {
        order: initial;
        margin: 0;
        width: auto; /* 取消100%宽度 */
        text-align: center; /* 居中显示 */
        flex-shrink: 0; /* 防止按钮被压缩 */
        min-width: 60px; /* 最小宽度 */
        padding: 6px 10px; /* 调整内边距 */
        font-size: 12px; /* 调整字体大小 */
    }
    
    /* 管理员操作按钮组调整 */
    .admin-actions {
        margin-left: 0;
        width: auto; /* 取消100%宽度 */
        justify-content: flex-start; /* 左对齐 */
        gap: 8px; /* 按钮间距 */
        flex-wrap: wrap; /* 允许换行 */
    }
    
    /* 管理员按钮样式调整 */
    .admin-actions .delete-btn,
    .admin-actions .pin-btn,
    .admin-actions .unpin-btn {
        width: auto; /* 取消100%宽度 */
        min-width: 50px; /* 最小宽度 */
        padding: 6px 10px; /* 调整内边距 */
        font-size: 12px; /* 调整字体大小 */
        flex-shrink: 0; /* 防止按钮被压缩 */
    }
}
/* ============================================= */
/* 小屏幕手机适配 - 进一步优化按钮布局 */
/* ============================================= */
@media screen and (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    h1 {
        font-size: 20px;
        text-align: center;
    }
    
    .message-content {
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* 进一步减少小屏幕的回复模块缩进 */
    .replies, .nested-replies {
        margin-left: 5px;
        margin-right: 0;
        padding-left: 5px;
        padding-right: 0;
        width: 100%;
        /* border-left: 2px solid #e0e0e0; */
        border-radius: 0 4px 4px 0;
        background-color: #f5f5f5;
    }
    
    .nested-reply {
        margin-left: 0;
        margin-right: 0;
        padding: 5px;
        width: 100%;
        border-radius: 0 5px 5px 0;
    }
    
    /* 按钮样式优化 */
    .reply-btn, .delete-btn, .pin-btn, .toggle-btn, .reply-to-reply-btn {
        padding: 6px 8px; /* 更小的内边距 */
        font-size: 11px; /* 更小的字体 */
        min-width: 50px; /* 更小的最小宽度 */
    }
    
    /* 按钮组布局优化 */
    .message-actions, .reply-actions {
        gap: 6px; /* 更小的间距 */
    }
    
    .admin-actions {
        gap: 6px; /* 更小的间距 */
    }
    
    /* 确保按钮文字不换行 */
    .reply-btn, .delete-btn, .pin-btn, .toggle-btn, .reply-to-reply-btn {
        white-space: nowrap; /* 防止按钮文字换行 */
        overflow: hidden; /* 隐藏溢出内容 */
        text-overflow: ellipsis; /* 显示省略号 */
    }
}


/* ============================================= */
/* 超小屏幕适配 - 确保按钮始终在一行 */
/* ============================================= */
@media screen and (max-width: 360px) {
    /* 进一步减少超小屏幕的回复模块缩进 */
    .replies, .nested-replies {
        margin-left: 5px;
        margin-right: 0;
        padding-left: 5px;
        padding-right: 0;
        width: 100%;
        /* border-left: 2px solid #e0e0e0; */
        border-radius: 0 4px 4px 0;
        background-color: #f5f5f5;
    }
    
    .nested-reply {
        margin-left: 0;
        margin-right: 0;
        padding: 5px;
        width: 100%;
        border-radius: 0 5px 5px 0;
    }
    
    /* 进一步缩小按钮尺寸 */
    .reply-btn, .delete-btn, .pin-btn, .toggle-btn, .reply-to-reply-btn {
        padding: 4px 6px; /* 最小的内边距 */
        font-size: 10px; /* 最小的字体 */
        min-width: 45px; /* 最小的宽度 */
    }
    
    /* 最小间距 */
    .message-actions, .reply-actions {
        gap: 4px;
    }
    
    .admin-actions {
        gap: 4px;
    }
    
    /* 如果空间实在不够，允许按钮换行 */
    .message-actions, .reply-actions {
        flex-wrap: wrap; /* 允许换行 */
    }
}
/* ============================================= */
/* 触摸体验优化 */
/* ============================================= */
* {
    -webkit-tap-highlight-color: transparent;
}

button, input, textarea {
    touch-action: manipulation;
}

input, textarea {
    -webkit-appearance: none;
    border-radius: 0;
}
/* ============================================= */
/* 分页控件样式 */
/* ============================================= */

.pagination-container {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.page-size-selector label {
    font-weight: 600;
    white-space: nowrap;
}

.page-size-selector select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 80px;
}

.page-size-selector select:hover {
    border-color: #adb5bd;
}

.page-size-selector select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
/* 分页省略号样式 */
.page-ellipsis {
    padding: 8px 5px;
    color: #6c757d;
    font-weight: 500;
}
.page-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background-color: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.page-btn.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.page-btn:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.page-info {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

/* 分页容器响应式优化 */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .page-size-selector {
        justify-content: center;
    }
    
    .page-numbers {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-btn {
        padding: 6px 8px;
        min-width: 35px;
        font-size: 12px;
        margin: 2px;
    }
    
    .page-size-selector {
        font-size: 12px;
    }
    
    .page-info {
        font-size: 12px;
    }
}
/* 回复人姓名颜色样式 */
.reply-header .author .at-symbol {
    color: #ff0000; /* @符号设为红色 */
    font-weight: bold;
    margin: 0 2px;
}

.reply-header .author .parent-name {
    color: #008000; /* @后的姓名设为绿色 */
    font-weight: bold;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .reply-header .author .at-symbol,
    .reply-header .author .parent-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .reply-header .author .at-symbol,
    .reply-header .author .parent-name {
        font-size: 12px;
    }
}
/* 回复模块按钮样式 */
.reply-btn, .reply-to-reply-btn {
    background-color: #27ae60 !important; /* 绿色背景 */
    color: white !important; /* 白色文字 */
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reply-btn:hover, .reply-to-reply-btn:hover {
    background-color: #229954 !important; /* 悬停时稍深的绿色 */
}

/* 回复表单提交按钮样式 */
.reply-form button[onclick*="submit"] {
    background-color: #27ae60 !important; /* 绿色背景 */
    color: white !important; /* 白色文字 */
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reply-form button[onclick*="submit"]:hover {
    background-color: #229954 !important; /* 悬停时稍深的绿色 */
}

/* 取消按钮样式 - 修复选择器 */
.reply-form button:not([onclick*="submit"]):not([onclick*="Submit"]) {
    background-color: #e74c3c !important; /* 红色背景 */
    color: white !important; /* 白色文字 */
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reply-form button:not([onclick*="submit"]):not([onclick*="Submit"]):hover {
    background-color: #c0392b !important; /* 悬停时稍深的红色 */
}

/* 更精确的取消按钮选择器 */
.reply-form button[onclick*="toggleReplyForm"] {
    background-color: #e74c3c !important; /* 红色背景 */
    color: white !important; /* 白色文字 */
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reply-form button[onclick*="toggleReplyForm"]:hover {
    background-color: #c0392b !important; /* 悬停时稍深的红色 */
}

/* 响应式适配 */
@media (max-width: 768px) {
    .reply-btn, .reply-to-reply-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .reply-form button[onclick*="submit"],
    .reply-form button:not([onclick*="submit"]):not([onclick*="Submit"]),
    .reply-form button[onclick*="toggleReplyForm"] {
        padding: 7px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .reply-btn, .reply-to-reply-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .reply-form button[onclick*="submit"],
    .reply-form button:not([onclick*="submit"]):not([onclick*="Submit"]),
    .reply-form button[onclick*="toggleReplyForm"] {
        padding: 6px 12px;
        font-size: 12px;
    }
}
.messages-header h2{
   margin-top:-8vh;
}
/* 新消息通知大边框控制样式 */
.notification-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
    padding: 2px 6px;
    background-color: #f5f5f5;
    border-radius: 14px;
    border: 1px solid #ddd;
    min-width:100px;
    height: 50px;
    /* border:1px solid red; */
    /* margin-left:-27rem; */
}
.messages-title{
    position:relative;
    display:block;
    top:10px;
    font-size:18px;
}
@media (max-width: 768px) {
    .container h2 {
    text-align: center;
    color: #2c3e50;
    font-weight: 700;
    font-size: 26px;
    margin-bottom: 20px;
    }
    .messages-header h2{
    margin-top:-11vh;
    
    }
    .switch{
        display: inline-block;
        margin-top:6vh;
    }
    /* 新消息通知滑块控制样式 */
    .notification-control {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* margin-bottom: -24px; */
        padding: 2px 6px;
        background-color: #f5f5f5;
        border-radius: 14px;
        border: 1px solid #ddd;
        min-width:100px;
        /* border:1px solid red; */
        /* margin-left:-6rem; */
        margin-bottom:23px;

    }
    
    #notificationStatus{
        position:relative;
        font-size: 12px;
        margin-left: 37px;
        color: #666;
        top:-4.3vh;
        /* border:1px solid red; */
        /* margin-bottom:3px; */
    }
}
.notification-label {
    
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
    color: #333;
}
/* 开启 */
.notification-status {
    position:relative;
    font-size: 12px;
    margin-left: 36px;
    top:-3.6vh;
    color: #666;
    /* margin-bottom:-1.2vh; */

    /* border:1px solid red; */
}

/* 开关滑块边框样式 */
.switch {
    position: relative;
    display: inline-block;
    min-width: 41px;
    height: 24px;
    margin-left: -40px;
    margin-top:-1.2vh;
    margin-bottom:1.2vh;
    /* border:1px solid red; */
}

.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: .4s;
    border-radius: 24px;
}
/* 开关滑块移动动画宽度 */
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}
/* 开关滑块移动动画宽度 */
input:checked + .slider:before {
    transform: translateX(19px);
}

/* 圆角滑块 */
.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 开关状态变化动画 */
input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}
