/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 禁止文本选择 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 防止截图的CSS保护 */
body {
    /* 禁止右键菜单 */
    -webkit-touch-callout: none;
    /* 防止某些设备上的双击缩放 */
    touch-action: manipulation;
    /* 防止屏幕捕获工具 */
    pointer-events: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ec 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(200, 220, 240, 0.4);
    border-radius: 15px;
    border: 2px solid rgba(180, 200, 220, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid rgba(14, 165, 233, 0.6);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.15);
}

/* 选择文本样式 */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #1e293b;
    border-radius: 5px;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: #1e293b;
}

/* 非登录页面的body样式 */
.live-body, .admin-body {
    display: block;
    background: #f8fafc;
    color: #1e293b;
}

/* 直播页面背景效果 */
.live-body {
    position: relative;
    overflow-x: hidden;
}

.live-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(34, 197, 94, 0.06) 0%, transparent 50%);
    z-index: -1;
}

@keyframes backgroundPulse {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* 登录页面的body样式 */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 背景装饰元素 */
body::before, body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    z-index: -1;
    will-change: transform;
}

body::before {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

body::after {
    bottom: -100px;
    right: -100px;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* 登录容器 */
.login-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 10;
}

/* 登录表单 */
.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 48px 40px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6, #ec4899, #f59e0b);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-form:hover {
    transform: translateY(-8px);
    
}

/* 增强的淡入动�?*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录标题 */
.login-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

/* 登录副标�?*/
.login-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

/* 表单�?*/
.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
    position: relative;
    z-index: 1;
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: #cbd5e1;
}

/* 密码输入�?*/
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 6px;
}

.password-toggle:hover {
    color: #475569;
    background-color: #f1f5f9;
}

.form-group input::placeholder {
    color: #94a3b8;
    transition: opacity 0.3s ease;
}

.form-group input:focus::placeholder {
    opacity: 0.6;
}

/* 密码输入�?*/
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    color: #64748b;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: transparent;
}

.password-toggle:hover {
    background-color: #f1f5f9;
    color: #4f46e5;
    transform: translateY(-50%) scale(1.1);
}

/* 记住密码 */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remember-me:hover {
    color: #334155;
    transform: translateX(2px);
}

.remember-me input {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #4f46e5;
    transition: transform 0.3s ease;
}

.remember-me input:hover {
    transform: scale(1.1);
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-btn:hover {
    transform: translateY(-3px);
    
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
    position: relative;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* 错误消息 */
.error-message {
    background-color: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* 成功消息 */
.success-message {
    background-color: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* 管理员链�?*/
.admin-link {
    margin-top: 24px;
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

.admin-link a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 2px 6px;
    border-radius: 6px;
}

.admin-link a:hover {
    color: #3730a3;
    background-color: rgba(79, 70, 229, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 12px 36px rgba(99, 102, 241, 0.4);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 16px 48px rgba(99, 102, 241, 0.6);
    }
    100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 12px 36px rgba(99, 102, 241, 0.4);
    }
}

/* 响应式设�?*/
@media (max-width: 480px) {
    /* 登录页面 */
    .login-form {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .form-group input {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* 平板和小屏幕设备 */
@media (max-width: 768px) {
    /* 全局响应�?*/
    .container {
        padding: 10px;
    }
    
    /* 直播页面响应�?*/
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .live-container {
        padding: 16px;
        border-radius: 8px;
    }
    
    .message-list {
        max-height: 500px;
    }
    
    .message-item {
        padding: 16px;
    }
    
    .message-content {
        font-size: 15px;
    }
    
    /* 管理员页面响应式 */
    .admin-container {
        padding: 10px;
    }
    
    .admin-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .nav-buttons {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .nav-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 移动设备 */
@media (max-width: 480px) {
    /* 全局响应�?*/
    body {
        font-size: 14px;
    }
    
    /* 直播页面响应�?*/
    .message-item {
        padding: 12px;
    }
    
    .message-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        font-size: 12px;
    }
    
    .message-content {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .message-tags {
        gap: 6px;
    }
    
    .tag {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    /* 管理员页面响应式 */
    .admin-nav h1 {
        font-size: 24px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 13px;
    }
    
    .admin-table th, .admin-table td {
        padding: 8px 10px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 4px;
        margin-bottom: 4px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input, .form-group textarea, .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* 直播观看页面样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(20, 10, 10, 0.9);
    min-height: 100vh;
    border-radius: 20px;
    
    
    border: 2px solid rgba(184, 134, 11, 0.5);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #4a0000 0%, #8b0000 100%);
    border-radius: 15px;
    
    border: 2px solid rgba(184, 134, 11, 0.6);
    
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(184, 134, 11, 0.4);
    position: relative;
}

/* 到期提醒滚动�?*/
.expiry-reminder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 0;
    overflow: hidden;
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    margin-bottom: 1rem;
    
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    
}

.expiry-reminder-content {
    position: absolute;
    white-space: nowrap;
    animation: scroll-left 18s linear infinite;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(calc(-100% + 100px));
    }
}

/* 移除header底部的蓝色条 */
.header::after {
    display: none;
}

.header h1 {
    font-size: 22px;
    color: #1d4ed8;
    font-weight: 700;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.5px;
    text-shadow: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.logout-btn, .change-password-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4a0000 0%, #8b0000 100%);
    color: #d4af37;
    border: 2px solid rgba(184, 134, 11, 0.5);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    
    position: relative;
    overflow: hidden;
    
}

.logout-btn::before, .change-password-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.logout-btn:hover::before, .change-password-btn:hover::before {
    width: 300px;
    height: 300px;
}

.logout-btn:hover, .change-password-btn:hover {
    transform: translateY(-2px);
    
}

/* 用户信息区域 */
.user-info {
    background: rgba(30, 41, 59, 0.6);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    border: 1px solid rgba(79, 70, 229, 0.2);
    
}

.user-account, .account-expiry {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.user-account .label, .account-expiry .label {
    font-weight: 600;
    color: #94a3b8;
}

/* 内容标题�?*/
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(79, 70, 229, 0.3);
    position: relative;
}

.content-header::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    border-radius: 2px;
}

.content-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #e0e7ff;
    line-height: 1.4;
    background: linear-gradient(135deg, #e0e7ff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.header-actions {
    display: flex;
    gap: 8px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.username-display-container {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.username-display {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #3b82f6;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    color: #2563eb;
    transform: translateY(-1px);
}

.header-btn:active {
    transform: translateY(0);
}

.icon-download::before {
    content: '⬇️';
}

.icon-history::before {
    content: '📜';
}

.icon-refresh::before {
    content: '🔄';
}

/* 直播内容区域 */
.live-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    position: relative;
    overflow-x: hidden;
}

.live-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.8), rgba(14, 165, 233, 0.8), rgba(59, 130, 246, 0.8), transparent);
    animation: containerShine 3s infinite;
}

.live-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(123, 58, 237, 0.1) 0%, transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.live-container:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(59, 130, 246, 0.5);
}

@keyframes containerShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    z-index: 1;
}

.live-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d4ed8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    display: inline-block;
    text-shadow: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.live-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.live-container:hover .live-title::after {
    opacity: 1;
}

.live-status {
    padding: 6px 16px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    
    animation: pulse 2s infinite, statusGlow 1.5s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
}

.live-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: statusShine 3s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes statusGlow {
    0% {
        
    }
    100% {
        
    }
}

@keyframes statusShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 消息列表 */
.message-list {
      display: flex;
      flex-direction: column;
      gap: 22px;
      min-height: 500px; /* 确保有足够的初始高度 */
      max-height: 80vh; /* 固定最大高度为视口高度的80% */
      overflow-y: auto;
      padding-right: 16px;
      position: relative;
      z-index: 1;
      background: transparent;
      border: none;
      border-radius: 0;
      padding: 0;
      margin-bottom: 30px;
      
      transition: all 0.3s ease;
  }
  
  .message-item {
      position: relative;
      z-index: 1;
  }

/* 自定义内容区域 */
.custom-content {
    color: #fff;
    margin-top: 20px;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
}

.custom-content.show {
    opacity: 1;
    transform: translateY(0);
}

/* 消息列表滚动�?*/
.message-list::-webkit-scrollbar {
    width: 6px;
}

.message-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.message-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.message-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 消息�?*/
.message-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    border: 2px solid rgba(59, 130, 246, 0.15);
    transition: border-color 0.3s ease;
    position: relative;
    overflow: visible;
}

.message-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 50%, #22c55e 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.message-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.message-item:hover::before {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        
    }
}

/* 移除消息发光动画 */

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #4b5563;
}

.message-time {
    color: #02569b;
    font-weight: 500;
    transition: all 0.3s ease;
}

.message-item:hover .message-time {
    color: #0369a1;
}

/* 消息内容 - 确保内容可见 */
.message-content {
    font-size: 16px;
    color: #1e293b;
    line-height: 1.8;
    margin-bottom: 16px;
    font-weight: 400;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 20px;
    position: relative;
    padding-left: 8px;
    transition: all 0.3s ease;
}

.message-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-item:hover .message-content::before {
    opacity: 1;
}

/* 确保内联无权限提示样式优先级 */
.live-container .message-content .message-no-permission,
.message-content .message-no-permission {
    color: #3730a3 !important;
    font-style: italic !important;
    font-weight: 500 !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%) !important;
    padding: 10px 20px !important;
    border-radius: 24px !important;
    border: 2px dashed rgba(99, 102, 241, 0.6) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    margin: 6px 0 !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15) !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 10 !important;
}

/* 确保hover样式优先级 */
.live-container .message-content .message-no-permission:hover,
.message-content .message-no-permission:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%) !important;
    border-color: rgba(99, 102, 241, 0.8) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3) !important;
    color: #4338ca !important;
}

/* 消息图片容器 */
.message-image-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    margin-top: 8px;
}

/* 消息图片 */
.message-image {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
    position: relative;
    margin: 5px;
}

.message-image::after {
    content: "🔍";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #64748b;
    background-color: white;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-image img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.message-image:hover {
    transform: scale(1.02);
}

/* 图片旁边的竖排提示文字 */
.image-hint {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #999;
    font-size: 12px;
    margin-left: 5px;
    line-height: 18px;
    user-select: none;
}
    z-index: 10;
}

/* 消息标签 */
.message-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* 添加装饰性元�?*/
.live-body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
    opacity: 0;
}

@keyframes centerGlow {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.tag {
    padding: 6px 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tag:hover {
    transform: translateY(-2px) scale(1.05);
}

.tag:hover::before {
    left: 100%;
}

/* 图片上传预览 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.file-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #f9fafb;
}

/* 图片预览模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 10px 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.modal-footer {
    padding: 15px 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

/* 管理员登录页�?*/
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.admin-login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    
    text-align: center;
}

.admin-login-box h1 {
    color: #1e293b;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.admin-login-form {
    width: 100%;
}

.admin-login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.admin-login-form label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-weight: 500;
}

.admin-login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.admin-login-form input:focus {
    outline: none;
    border-color: #667eea;
    
}

#loginBtn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#loginBtn:hover {
    transform: translateY(-2px);
    
}

#errorMessage {
    color: #dc2626;
    margin-top: 15px;
    font-size: 14px;
}

/* 管理界面样式 */
.admin-body {
    background-color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.admin-header {
    background-color: #4b5563;
    color: white;
    padding: 15px 20px;
    
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 700;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
    min-height: calc(100vh - 80px);
}

/* 侧边栏样�?*/
.admin-sidebar {
    width: 240px;
    background-color: #374151;
    color: white;
    padding: 24px 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    border-right: 1px solid #4b5563;
    flex-shrink: 0;
}

/* 侧边栏滚动条 */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: #374151;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin-bottom: 4px;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #cbd5e1;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.3), transparent);
    transition: width 0.3s ease;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    padding-left: 24px;
}

.nav-item:hover::before {
    width: 100%;
}

.nav-item.active {
    background-color: rgba(79, 70, 229, 0.2);
    border-left: 4px solid #4f46e5;
    color: white;
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 18px;
}

.nav-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 内容区域样式 */
.admin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-section {
    display: none;
    background-color: white;
    border-radius: 12px;
    padding: 24px;
}

.content-section.active {
    display: block;
}

/* 区域头部样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.section-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1e293b;
}

.section-actions {
    display: flex;
    gap: 12px;
}

.admin-nav h1 {
    font-size: 28px;
    color: #333;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

/* 管理表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.admin-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

/* 可排序表头样式 */
.admin-table th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
    padding-right: 20px;
}

.admin-table th.sortable:hover {
    background-color: #f0f2f5;
}

/* 排序图标样式 */
.sort-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
}

.admin-table tr:hover {
    background-color: #f8fafc;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 8px;
    margin-bottom: 8px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #3b82f6;
    letter-spacing: 0;
}
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
    width: 200px;
    height: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    color: white;
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(59, 130, 246, 0.8);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(239, 68, 68, 0.8);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: rgba(34, 197, 94, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(34, 197, 94, 0.8);
}

.btn-secondary {
    background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%);
    color: #475569;
    border-color: rgba(148, 163, 184, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(148, 163, 184, 0.5);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    
}

.btn:disabled:hover {
    transform: none;
    
}

/* 表单样式 */
.form-container {
    background-color: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 文本�?*/
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    color: #1e293b;
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
    
}

/* 消息编辑器工具栏 */
.message-editor-toolbar {
    background-color: #ffffff;
    padding: 12px;
    border-radius: 8px 8px 0 0;
    border: 2px solid #cbd5e1;
    border-bottom: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: -2px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-group label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    margin: 0;
}

/* 颜色选择�?*/
.color-picker {
    width: 40px;
    height: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background-color: white;
}

/* 固定颜色选择样式 */
.fixed-colors {
    display: inline-flex;
    gap: 5px;
    margin-left: 10px;
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.2);
}

.color-option.selected {
    
}

/* 表情选择�?*/
.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 300px;
    max-height: 120px;
    overflow-y: auto;
    padding: 8px;
    background-color: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
}

.emoji-picker:hover {
    
}

.emoji-picker span {
    font-size: 20px;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: transform 0.2s ease;
    display: inline-block;
    width: 25px;
    height: 25px;
    text-align: center;
    line-height: 25px;
}

.emoji-picker span:hover {
    transform: scale(1.3);
    background-color: #f1f5f9;
}

/* 最新消息弹窗样�?*/
.message-popup {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    justify-content: center;
    align-items: flex-start;
    background-color: transparent;
}

.message-popup.show {
    display: flex;
}

.message-popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    max-height: 250px;
    overflow-y: auto;
    animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #e2e8f0;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px 16px 0 0;
}

.message-popup-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.message-popup-close {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
}

.message-popup-close:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: scale(1.1);
    
}

.message-popup-body {
    padding: 20px;
}

.popup-message-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.popup-message-item:last-child {
    border-bottom: none;
}

.popup-message-item:hover {
    background-color: rgba(79, 70, 229, 0.05);
    padding-left: 8px;
    border-radius: 8px;
}

.popup-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: #64748b;
    background: transparent;
    border: none;
    padding: 0;
}

.popup-message-author {
    font-weight: 600;
    color: #4f46e5;
    font-size: 13px;
}

.popup-message-time {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.popup-message-content {
    font-size: 15px;
    line-height: 1.5;
    color: #1e293b;
    font-weight: 400;
    word-break: break-word;
    padding-left: 0;
}

.popup-message-new {
    display: inline-block;
    background: linear-gradient(135deg, #dc3545 0%, #ef4444 100%);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: 600;
    
}

/* 弹窗滚动条样�?*/
.message-popup-content::-webkit-scrollbar {
    width: 6px;
}

.message-popup-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.message-popup-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 3px;
}

.message-popup-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* 无权限弹窗样式 */
.no-permission-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.no-permission-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 24px;
    border-radius: 16px;
    max-width: 400px;
    width: 85%;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.no-permission-content::before {
    content: "🔒";
    font-size: 56px;
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.4);
    border: 4px solid white;
    animation: pulse 1.5s ease-in-out infinite;
}

.no-permission-text {
    margin: 20px 0;
    line-height: 1.8;
    color: #475569;
    font-size: 16px;
    text-align: center;
    font-weight: 400;
}

/* 添加标题样式 */
.no-permission-content h3 {
    text-align: center;
    color: #334155;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 700;
    margin-top: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 在线客服弹窗样式 */
.online-support-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    
    width: 300px;
    border: 1px solid #e2e8f0;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.online-support-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.online-support-popup .popup-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.online-support-popup .close-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
}

.online-support-popup .close-btn:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: scale(1.1);
}

.online-support-popup .popup-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 消息列表中的new标志 */
.message-new {
    display: inline-block;
    background-color: #dc3545;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    margin-left: 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .message-popup-content {
        width: 95%;
        margin: 10px;
    }
    
    .message-popup-header h3 {
        font-size: 18px;
    }
}

/* 选择�?*/
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #667eea;
    
}

/* 图片上传 */
.file-upload {
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    font-size: 100px;
    top: 0;
    right: 0;
}

.file-upload-label {
    display: inline-block;
    padding: 12px 20px;
    background-color: #667eea;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.file-upload-label:hover {
    background-color: #5568d3;
}

/* 筛选表单容�?*/
.filter-container {
    margin-bottom: 20px;
}

/* 水平筛选栏样式 */
.horizontal-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    flex-wrap: wrap;
    overflow-x: hidden;
}

.search-input {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
    width: 150px;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    min-width: 120px;
    width: 120px;
}

.filter-date {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
    width: 120px;
}

/* 分页控件样式 */
.pagination-controls {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-size-selector label {
    color: #475569;
    font-weight: 500;
    font-size: 14px;
}

.page-size-selector select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-size-selector select:hover {
    border-color: #94a3b8;
}

.pagination-info {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    margin: 20% auto;
    padding: 0;
    border-radius: 16px;
    width: 80%;
    max-width: 300px;
    
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #e2e8f0;
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.close {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
    
}

.close:hover, .close:focus {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: scale(1.1);
    
    color: white;
    text-decoration: none;
}

.modal-body {
    padding: 24px;
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-30px) scale(0.95);
        
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
        
    }
}

/* 统计卡片 */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
    padding: 0 12px;
}

.stat-item {
    flex: 1;
    min-width: 180px;
    padding: 28px;
    border-radius: 16px;
    text-align: center;
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 添加悬停效果 */
.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* 添加卡片内部的微妙动画效果 */
.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-item:hover::before {
    opacity: 1;
}

/* 数字增长动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片滑入动画 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为每个卡片设置不同的动画延迟 */
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.15s; }
.stat-item:nth-child(3) { animation-delay: 0.2s; }
.stat-item:nth-child(4) { animation-delay: 0.25s; }
.stat-item:nth-child(5) { animation-delay: 0.3s; }
.stat-item:nth-child(6) { animation-delay: 0.35s; }
.stat-item:nth-child(7) { animation-delay: 0.4s; }

/* 响应式设计优化 */
@media (max-width: 768px) {
    .stats-container {
        gap: 16px;
    }
    
    .stat-item {
        min-width: 140px;
        padding: 20px 16px;
    }
    
    .stat-item .stat-value {
        font-size: 24px;
    }
    
    .stat-item .stat-label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stat-item {
        min-width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}

.online-users-section {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin: 0 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.online-users-section:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.online-users-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-users-section h3::before {
    content: '👥';
    font-size: 22px;
}

.online-users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
}

.online-users-table th,
.online-users-table td {
    padding: 16px 20px;
    text-align: left;
    transition: all 0.2s ease;
}

.online-users-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.online-users-table td {
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    font-size: 14px;
}

.online-users-table tr {
    transition: all 0.3s ease;
    cursor: pointer;
}

.online-users-table tbody tr:hover {
    background-color: #f8fafc;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.online-users-table tbody tr:last-child td {
    border-bottom: none;
}

/* 优化表格响应式设计 */
@media (max-width: 768px) {
    .online-users-section {
        padding: 20px 16px;
    }
    
    .online-users-table th,
    .online-users-table td {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* 在线用户监控容器样式 */
.online-users-container {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 在线用户总数样式 */
.online-users-count {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #1f2937;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 在线用户列表样式 */
.online-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 单个在线用户项样式 */
.online-user-item {
    display: flex;
    align-items: center;
    padding: 18px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.online-user-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 用户索引样式 */
.user-index {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

/* 用户信息样式 */
.user-info {
    flex: 1;
}

/* 用户名样式 */
.username {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
    font-size: 16px;
}

/* 用户ID样式 */
.user-id {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* 最后活动时间样式 */
.last-seen {
    font-size: 14px;
    color: #718096;
    text-align: right;
    flex-shrink: 0;
    font-weight: 500;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}

.stat-item.purple {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.2);
}

.stat-item.green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

.stat-item.orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.2);
}

.stat-item.white {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    color: #6b7280;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-item.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.stat-item .stat-icon {
    font-size: 24px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1);
}

.stat-item .stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    display: block;
    letter-spacing: -0.5px;
}

.stat-item .stat-label {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* 设置功能框样�?*/
.settings-container {
    background-color: #fff;
    border-radius: 8px;
    
    padding: 20px;
    margin-top: 20px;
}

.settings-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section {
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
}

.settings-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
    font-size: 16px;
}

.settings-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 0;
}

.settings-key {
    width: 100px;
    color: #666;
    font-weight: 500;
}

.settings-value {
    color: #333;
    font-weight: bold;
}

/* 在线状态样�?*/
#settingsOnlineStatus {
    display: flex;
    align-items: center;
    gap: 8px;
}

#settingsOnlineStatus::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        
    }
    70% {
        
    }
    100% {
        
    }
}

/* 到期时间样式 */
#settingsAccountTerm {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* 根据到期时间显示不同颜色 */
#settingsAccountTerm.expiring-soon {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

#settingsAccountTerm.expiring {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#settingsAccountTerm.permanent {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#settingsAccountTerm.normal {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* 开关样�?*/
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

input:focus + .toggle-slider {
    
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* ICP备案号样式 */
.icp-info {
    text-align: center;
    margin-top: 36px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.icp-info:hover {
    color: white;
    transform: translateY(-2px);
}

.icp-info a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 2px 6px;
    border-radius: 6px;
}

.icp-info a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* 历史消息弹窗样式 */
.history-popup {
    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: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.history-popup.show {
    opacity: 1;
    visibility: visible;
}

.history-popup-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    height: 85%;
    max-height: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-popup-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-popup-header h3 {
    margin: 0;
    color: #343a40;
    font-size: 18px;
}

.history-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.history-popup-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

.history-popup-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 日历样式 */
.calendar-container {
    flex: 0 0 350px;
    border-right: 1px solid #e9ecef;
    padding: 20px;
    overflow-y: auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    background-color: #007bff;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.calendar-nav-btn:hover {
    background-color: #0056b3;
}

.calendar-header h4 {
    margin: 0;
    color: #343a40;
    font-size: 16px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: #6c757d;
    padding: 8px 0;
    font-size: 12px;
}

.calendar-day {
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.calendar-day:hover {
    background-color: #e9ecef;
}

.calendar-day.today {
    background-color: #007bff;
    color: white;
}

.calendar-day.has-messages {
    background-color: #d4edda;
    color: #155724;
}

.calendar-day.selected {
    background-color: #28a745;
    color: white;
}

.calendar-day.month-other {
    color: #dee2e6;
}

.message-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 历史消息列表样式 */
.history-messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

#selectedDateTitle {
    margin-bottom: 10px;
    color: #343a40;
    font-size: 14px;
}

.history-messages-list {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: calc(100% - 40px);
    overflow-y: auto;
}

.history-message-item {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.history-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-message-author {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
}

.history-message-time {
    color: #6c757d;
    font-size: 12px;
}

.history-message-content {
    color: #343a40;
    line-height: 1.6;
    font-size: 14px;
    padding: 10px 0;
    max-width: 100%;
    overflow-x: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .history-popup-body {
        flex-direction: column;
    }
    
    .calendar-container {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .history-messages-container {
        flex: 1;
    }
}
