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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    color: #667eea;
    font-size: 24px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 导航按钮样式 */
.nav-btn {
    background: none;
    border: none;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

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

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* 欢迎语样式 */
.welcome-text {
    margin-top: 8px;
}

/* 添加好友弹窗样式 */
.add-partner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.add-partner-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: modalSlideIn 0.3s ease-out forwards;
}

.add-partner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px 30px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.add-partner-header h2 {
    color: #667eea;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: scale(1.1);
}

/* 添加好友表单样式 */
.partner-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
}

.partner-form .form-group {
    margin-bottom: 25px;
}

.partner-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    text-align: left;
}

.partner-form .form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.partner-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.partner-form .btn {
    margin-top: 10px;
    width: 100%;
    max-width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 邀请码区域样式 */
.invite-code-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.invite-code-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.invite-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.invite-code-text {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    letter-spacing: 1px;
}

.invite-code-hint {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin: 0;
}

.divider {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(102, 126, 234, 0.2), transparent);
    margin: 30px 0;
}

/* 复制按钮样式 */
.btn-icon {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-icon:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* 按钮样式 */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 10px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* 文件上传区域 */
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    margin: 30px 0;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    cursor: pointer;
    color: #667eea;
    font-size: 18px;
    font-weight: 500;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #667eea;
}

/* 上传进度条样式 */
.upload-progress {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    animation: progressSlideIn 0.4s ease-out;
    transform-origin: top center;
}

@keyframes progressSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.upload-progress.removing {
    animation: progressSlideOut 0.3s ease-in forwards;
}

@keyframes progressSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.upload-progress.complete {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 50px; /* 为取消按钮留出空间 */
}

.progress-text {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.progress-percentage {
    font-weight: 700;
    color: #667eea;
    font-size: 18px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

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

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.uploaded-size {
    color: #667eea;
    font-weight: 500;
}

.total-size {
    color: #999;
}

/* 进度条完成状态 */
.upload-progress.complete .progress-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.upload-progress.complete .progress-percentage {
    color: #28a745;
}

/* 进度条错误状态 */
.upload-progress.error {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.upload-progress.error .progress-fill {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.upload-progress.error .progress-percentage {
    color: #dc3545;
}

/* 进度条取消状态 */
.upload-progress.cancelled {
    border-color: #6c757d;
    background: rgba(108, 117, 125, 0.05);
}

.upload-progress.cancelled .progress-fill {
    background: linear-gradient(90deg, #6c757d 0%, #495057 100%);
}

.upload-progress.cancelled .progress-percentage {
    color: #6c757d;
}

/* 取消按钮 */
.progress-cancel {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 10;
}

/* 批量上传进度条样式 */
.batch-upload-progress .progress-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.batch-upload-progress .uploaded-files {
    color: #667eea;
    font-weight: 500;
}

.batch-upload-progress .current-file {
    color: #666;
    font-size: 13px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-upload-progress.file-success .current-file {
    color: #28a745;
}

.batch-upload-progress.file-error .current-file {
    color: #dc3545;
}

.progress-cancel:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
    transform: scale(1.1);
}

.progress-cancel:active {
    transform: scale(0.95);
}

/* 关闭按钮样式 */
.progress-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(108, 117, 125, 0.1);
    border: 2px solid rgba(108, 117, 125, 0.2);
    color: #6c757d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 10;
}

.progress-close:hover {
    background: rgba(108, 117, 125, 0.2);
    border-color: rgba(108, 117, 125, 0.4);
    transform: scale(1.1);
}

.progress-close:active {
    transform: scale(0.95);
}

/* 中等屏幕适配 */
@media (max-width: 1024px) and (min-width: 769px) {
    .progress-info {
        padding-right: 45px; /* 中等屏幕稍微减少padding */
    }
}

/* 移动端进度条适配 */
@media (max-width: 768px) {
    .upload-progress {
        padding: 20px;
        margin: 15px 0;
    }
    
    .progress-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding-right: 0; /* 移动端不需要右侧padding */
    }
    
    .progress-details {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .progress-cancel {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .progress-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* 文件工具栏 */
.file-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    gap: 20px;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 16px;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 25px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(102, 126, 234, 0.1);
    border: none;
    color: #667eea;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.clear-search:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-50%) scale(1.1);
}

/* 工具栏操作区域 */
.toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toolbar-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.toolbar-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* 文件列表 */
.file-list {
    margin-top: 20px;
}

/* 加载状态样式 */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    font-size: 16px;
    color: #999;
}

.file-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 18px;
    color: #667eea;
    flex-shrink: 0;
}

.file-actions {
    display: flex;
    gap: 10px;
}

/* 移动端图标按钮样式 */
.file-actions.mobile {
    gap: 8px;
}

.btn-icon {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.2);
    padding: 12px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-icon.btn-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
}

.btn-icon.btn-danger:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* 桌面端按钮组显示控制 */
.file-actions.desktop {
    display: flex;
}

.file-actions.mobile {
    display: none;
}

/* 触摸设备适配 */
@media (hover: none) and (pointer: coarse) {
    .btn-icon:active {
        transform: scale(0.95);
        background: rgba(102, 126, 234, 0.3);
        border-color: rgba(102, 126, 234, 0.5);
    }
    
    .btn-icon.btn-danger:active {
        background: rgba(220, 53, 69, 0.3);
        border-color: rgba(220, 53, 69, 0.5);
    }
    
    .btn-icon:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn-icon.btn-danger:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* 触摸反馈动画 */
    .btn-icon {
        transition: all 0.15s ease;
    }
    
    .btn-icon:active {
        transition: all 0.05s ease;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 小屏幕手机优化 */
    .btn-icon {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .card h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .navbar {
        padding: 12px 20px;
        margin-bottom: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .navbar h1 {
        font-size: 20px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-links a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .upload-area {
        padding: 40px 15px;
        margin: 20px 0;
    }
    
    .upload-icon {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .file-item {
        padding: 15px;
        margin-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .file-info {
        width: 100%;
    }
    
    .file-name {
        font-size: 16px;
        word-break: break-all;
        line-height: 1.4;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .file-icon {
        font-size: 16px;
        flex-shrink: 0;
    }
    
    .file-actions.mobile {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }
    
    .btn-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 18px;
        /* 确保触摸目标足够大 */
        touch-action: manipulation;
    }
    
    /* 移动端文件工具栏优化 */
    .file-toolbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .search-box {
        max-width: 100%;
    }
    

    
    /* 移动端文件列表优化 */
    .file-list {
        margin-top: 20px;
    }
    
    /* 移动端按钮组优化 */
    .file-actions.desktop {
        display: none;
    }
    
    .file-actions.mobile {
        display: flex;
    }
}

/* 悬浮提示弹窗 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    transform: translateX(100%);
    opacity: 0;
    animation: slideIn 0.3s ease-out forwards;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: default;
}

.toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: progress 5s linear forwards;
}

.toast.error::after {
    animation-duration: 8s;
}

.toast.success::after {
    animation-duration: 4s;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast.success {
    border-left-color: #28a745;
    color: #155724;
}

.toast.error {
    border-left-color: #dc3545;
    color: #721c24;
}

.toast.info {
    border-left-color: #17a2b8;
    color: #0c5460;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #28a745;
}

.toast.error .toast-icon {
    color: #dc3545;
}

.toast.info .toast-icon {
    color: #17a2b8;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.toast-clear-all {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.2s ease;
    margin-top: 10px;
    width: 100%;
    text-align: center;
}

.toast-clear-all:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
}

/* 确认弹窗样式 */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.confirm-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: modalSlideIn 0.3s ease-out forwards;
}

.confirm-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 20px;
}

.confirm-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.confirm-message {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.confirm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

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

.confirm-btn.cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.confirm-btn.confirm:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* 确认弹窗动画 */
@keyframes modalSlideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes modalSlideOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

.confirm-overlay.hiding {
    animation: fadeOut 0.3s ease-in forwards;
}

.confirm-overlay.hiding .confirm-modal {
    animation: modalSlideOut 0.3s ease-in forwards;
}

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

/* 分享弹窗样式 */
.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

/* 分享码弹窗样式 */
.share-code-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.share-code-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: modalSlideIn 0.3s ease-out forwards;
}

.share-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px 30px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.share-code-header h3 {
    color: #667eea;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.share-code-content {
    padding: 30px;
}

.share-code-message {
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
    text-align: center;
}

.share-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.share-code-text {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 15px 20px;
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    letter-spacing: 1px;
    user-select: all;
}

.share-code-hint {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.share-code-footer {
    display: flex;
    justify-content: center;
    padding: 20px 30px 30px 30px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.share-code-footer .btn {
    min-width: 120px;
}

/* 分享码弹窗隐藏动画 */
.share-code-overlay.hiding {
    animation: fadeOut 0.3s ease-in forwards;
}

.share-code-overlay.hiding .share-code-modal {
    animation: modalSlideOut 0.3s ease-in forwards;
}

.share-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: modalSlideIn 0.3s ease-out forwards;
}

.share-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 20px;
}

.share-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.share-message {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.share-form {
    margin-bottom: 25px;
}

.share-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.share-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.share-buttons {
    display: flex !important;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    visibility: visible !important;
    opacity: 1 !important;
}

.share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

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

.share-btn.cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.share-btn.share {
    background: #667eea;
    color: white;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.share-btn.share:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* 分享弹窗分隔线 */
.share-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.share-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(102, 126, 234, 0.3), transparent);
}

.share-divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* 分享码按钮区域 */
.share-code-section {
    text-align: center;
    margin-bottom: 20px;
}

.share-btn.share-code {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.share-btn.share-code:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.share-overlay.hiding {
    animation: fadeOut 0.3s ease-in forwards;
}

.share-overlay.hiding .share-modal {
    animation: modalSlideOut 0.3s ease-in forwards;
}

/* 添加好友弹窗隐藏动画 */
.add-partner-overlay.hiding {
    animation: fadeOut 0.3s ease-in forwards;
}

.add-partner-overlay.hiding .add-partner-modal {
    animation: modalSlideOut 0.3s ease-in forwards;
}

/* 文件预览弹窗样式 */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.preview-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom: 1px solid #e1e5e9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.preview-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.preview-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.preview-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.preview-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 60vh;
}

.preview-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 25px 30px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
}

/* 预览内容样式 */
.preview-text-content pre {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.preview-image-content {
    text-align: center;
}

.preview-image-content img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-pdf-content iframe {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-video-content video,
.preview-audio-content audio {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.preview-unsupported {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.preview-unsupported .file-info {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    line-height: 1.8;
}

/* 预览弹窗隐藏动画 */
.preview-overlay.hiding {
    animation: fadeOut 0.3s ease-in forwards;
}

.preview-overlay.hiding .preview-modal {
    animation: modalSlideOut 0.3s ease-in forwards;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .confirm-modal,
    .share-modal,
    .add-partner-modal {
        margin: 20px;
        padding: 0;
    }
    
    .confirm-title,
    .share-title {
        font-size: 20px;
    }
    
    .confirm-message,
    .share-message {
        font-size: 14px;
    }
    
    .confirm-buttons,
    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .confirm-btn,
    .share-btn {
        width: 100%;
        padding: 15px 24px;
    }
    
    .add-partner-header {
        padding: 20px 20px 15px 20px;
    }
    
    .add-partner-header h2 {
        font-size: 20px;
    }
    
    .partner-form {
        padding: 20px;
    }
    
    /* 移动端预览弹窗优化 */
    .preview-modal {
        width: 95vw;
        max-height: 95vh;
    }
    
    .preview-header {
        padding: 20px;
    }
    
    .preview-header h2 {
        font-size: 18px;
    }
    
    .preview-body {
        padding: 20px;
        max-height: 50vh;
    }
    
    .preview-footer {
        padding: 20px;
        flex-direction: column;
    }
    
    .preview-footer .btn {
        width: 100%;
    }
    
    /* 移动端分享码弹窗优化 */
    .share-code-modal {
        width: 95vw;
        max-height: 95vh;
    }
    
    .share-code-header {
        padding: 20px 20px 15px 20px;
    }
    
    .share-code-header h3 {
        font-size: 18px;
    }
    
    .share-code-content {
        padding: 20px;
    }
    
    .share-code-footer {
        padding: 15px 20px 20px 20px;
    }
    
    .share-code-footer .btn {
        width: 100%;
    }
    
    .share-btn.share-code {
        min-width: 100%;
        padding: 15px 24px;
    }
}

/* 弹窗动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
        padding: 14px 16px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .card {
        padding: 30px 20px;
    }
    
    .file-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .file-actions {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 分享码接收入口样式 - 默认样式（未登录用户） */
.share-code-entry {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 30px;
}

.share-code-entry h2 {
    color: white;
    margin-bottom: 15px;
}

.share-code-entry p {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* 已登录用户的分享码接收入口样式 */
.share-code-entry.logged-in {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
}

.share-code-entry.logged-in h2 {
    color: #667eea;
}

.share-code-entry.logged-in p {
    color: #666 !important;
}

.share-code-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.share-code-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: all 0.3s ease;
}

.share-code-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.share-code-input::placeholder {
    color: #999;
}

.btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .share-code-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-code-input {
        min-width: auto;
        width: 100%;
    }
    
    .btn-primary {
        width: 100%;
    }
}

/* 发送消息对话框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: modalSlideIn 0.3s ease-out forwards;
    position: relative;
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal .close:hover {
    color: #333;
    transform: scale(1.1);
}

.modal h2 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.modal .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.modal button[type="submit"]:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}



/* 消息中心样式 */
.message-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.message-toolbar .btn {
    flex: 1;
    min-width: 120px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

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

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

.message-toolbar .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.message-list {
    max-height: 500px;
    overflow-y: auto;
}

.message-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.message-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.message-item.unread {
    border-left: 4px solid #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.message-content {
    flex: 1;
    margin-right: 15px;
}

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

.message-sender {
    font-weight: 600;
    color: #667eea;
    flex: 1;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.unread-indicator {
    background: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: bold;
}

.message-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.message-text {
    color: #666;
    line-height: 1.5;
}

.message-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.message-action-btn.read {
    background: #28a745;
    color: white;
}

.message-action-btn.read:hover {
    background: #218838;
}

.message-action-btn.delete {
    background: #dc3545;
    color: white;
}

.message-action-btn.delete:hover {
    background: #c82333;
}

/* 未读消息徽章 */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.nav-btn {
    position: relative;
}

/* 消息为空状态 */
.message-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.message-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-toolbar {
        flex-direction: column;
    }
    
    .message-item {
        flex-direction: column;
    }
    
    .message-actions {
        flex-direction: row;
        margin-top: 10px;
    }
}

/* 消息中心侧边栏样式 */
.message-center-sidebar {
    position: fixed;
    top: 0;
    right: -33.33%;
    width: 33.33%;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.message-center-sidebar.show {
    right: 0;
}

.message-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
    flex-shrink: 0;
}

.message-center-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-sidebar:hover {
    background: #e9ecef;
    color: #333;
}

.message-toolbar {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    background: #fff;
    flex-shrink: 0;
}

.message-toolbar .btn {
    flex: 1;
    min-width: 120px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

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

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

.message-toolbar .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* 消息列表容器 - 可滚动区域 */
.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
}

/* 消息类型切换样式 - 固定在消息中心底部 */
.message-type-toggle {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
    flex-shrink: 0;
    /* 移除 position: sticky 和 bottom: 0 */
}

.toggle-btn {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    background: #fff;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toggle-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.toggle-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.toggle-btn.active:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
    transform: translateY(-1px);
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .message-center-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .message-toolbar {
        flex-direction: column;
        gap: 8px;
    }
    
    .message-toolbar .btn {
        min-width: auto;
    }
    
    .message-type-toggle {
        flex-direction: column;
        gap: 8px;
    }
}

/* 可搜索输入框样式 */
.searchable-input-container {
    position: relative;
    width: 100%;
}

.searchable-input-container input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.searchable-input-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:active {
    background-color: #e9ecef;
}

/* 确保搜索结果显示在其他元素之上 */
.share-modal .search-results,
.modal .search-results {
    z-index: 10001;
}

/* 发送的消息样式 */
.sent-message-item {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sent-message-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

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

.sent-message-receiver {
    font-weight: 600;
    color: #28a745;
    font-size: 14px;
}

.sent-message-time {
    font-size: 12px;
    color: #999;
}

.sent-message-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.sent-message-content {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* 发送消息操作按钮样式 */
.sent-message-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.sent-message-actions .message-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sent-message-actions .message-action-btn.delete {
    background: #dc3545;
    color: white;
}

.sent-message-actions .message-action-btn.delete:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* 发送消息状态样式 */
.sent-message-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.message-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.message-status.unread {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message-status.read {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-status.unknown {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* 消息项状态样式 */
.sent-message-item.unread {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.sent-message-item.read {
    border-left-color: #28a745;
    background: #f8f9fa;
}

.sent-message-item.unknown {
    border-left-color: #6c757d;
    background: #f8f9fa;
}
