/* 查看消息页面特定样式 */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: #2563eb;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    width: 32px;
    height: 32px;
}

.header h1 {
    margin: 0;
    font-size: 20px;
    color: white;
    font-weight: 600;
}

.sub-nav {
    background: #f8fafc;
    padding: 12px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 16px;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
}

.sub-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    transition: all 0.3s;
    font-weight: 500;
}

.sub-nav a:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.sub-nav a.active {
    background: #2563eb;
    color: white;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 40px;
    width: 100%;
}

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

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.message-category {
    margin-bottom: 32px;
}

.category-header {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid #2563eb;
}

.category-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
}

.message-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    padding: 20px;
}

.message-item:last-child {
    border-radius: 0 0 12px 12px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.message-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.message-actions {
    display: flex;
    gap: 8px;
}

/* 按钮基础样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    height: 36px;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* 复制按钮 - 蓝色 */
.copy-btn {
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 36px;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 编辑按钮 - 橙色 */
.btn-edit {
    background: #f59e0b;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 36px;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* 删除按钮 - 红色 */
.btn-danger {
    background: #ef4444;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    height: 36px;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.message-content {
    color: #64748b;
    line-height: 1.8;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.footer {
    background: white;
    padding: 24px 32px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.version-tag {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.version-tag:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.highlight {
    background: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ==================== 消息弹窗样式 ==================== */

.message-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.message-modal.active {
    display: block;
}

.message-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.message-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.message-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #1e293b;
    font-weight: 600;
}

.message-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.message-modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quill-editor {
    height: 300px;
    background: white;
}

.form-actions {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 16px;
    }
    
    .header-logo {
        width: 28px;
        height: 28px;
    }
    
    .nav-trigger {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    .container {
        padding: 80px 16px 20px;
    }
    
    .message-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .message-modal-header {
        padding: 20px 24px;
    }
    
    .message-modal-body {
        padding: 24px;
    }
    
    .quill-editor {
        height: 250px;
    }
    
    .footer {
        font-size: 12px;
        padding: 16px;
    }
    
    .footer-line {
        display: block;
        margin: 4px 0;
    }
    
    .footer-separator {
        display: none;
    }
}

/* ==================== 导航按钮和抽屉样式 ==================== */

/* 导航按钮（所有设备统一在右上角） */
.nav-trigger {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-trigger:active {
    transform: scale(0.95);
}

/* 遮罩层 */
.nav-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-drawer-overlay.active {
    display: block;
    opacity: 1;
}

/* 右侧抽屉导航 */
.nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.nav-drawer.active {
    right: 0;
}

.nav-drawer-header {
    padding: 24px;
    background: #2563eb;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 抽屉用户信息 */
.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.drawer-user-info .user-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.drawer-user-info .user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.drawer-user-info .user-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-user-info .user-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-drawer-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-drawer-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-drawer-close:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

.nav-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 导航项统一样式 */
.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    color: #1e293b;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 24px;
    color: #2563eb;
    width: 28px;
    text-align: center;
}

.nav-item:hover {
    background: white;
    border-color: #2563eb;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.nav-item:active {
    transform: translateX(-2px);
}

.nav-item.active {
    background: #eff6ff;
    border-color: #2563eb;
}

/* 抽屉底部 - 退出登录按钮 */
.nav-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
}

.logout-btn {
    width: 100%;
    padding: 14px 20px;
    background: #ef4444;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn:active {
    transform: translateY(0);
}
