/* 通知页面样式 */

body {
    background-color: #f5f7fa;
}

/* 顶部导航栏 */
.notification-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.back-btn:active {
    background: rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    /* 字体清晰度优化 - 防止模糊 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    letter-spacing: 0.3px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.header-placeholder {
    width: 40px;
}

/* 主标签 */
.main-tabs {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    display: flex;
    background: white;
    border-bottom: 1px solid #eee;
    z-index: 99;
}

.main-tab-btn {
    flex: 1;
    height: 48px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.main-tab-btn.active {
    color: #4B7BFF;
    font-weight: 600;
}

.main-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #4B7BFF;
    border-radius: 3px 3px 0 0;
}

/* 子标签 */
.sub-tabs {
    position: fixed;
    top: 104px;
    left: 0;
    right: 0;
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #eee;
    z-index: 98;
}

.sub-tab-btn {
    padding: 6px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sub-tab-btn.active {
    background: #4B7BFF;
    color: white;
    border-color: #4B7BFF;
}

/* 通知内容区 */
.notification-content {
    padding-top: 160px;
    padding-bottom: 20px;
    min-height: 100vh;
}

.notification-list {
    background: white;
}

/* 通知列表项 */
.notification-item {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.notification-item:active {
    background: rgba(0, 0, 0, 0.02);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 16px;
    width: 8px;
    height: 8px;
    background: #FF4444;
    border-radius: 50%;
}

.notification-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 24px 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-desc {
    font-size: 14px;
    color: #999;
    margin: 0 0 8px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 12px;
    color: #ccc;
}

.notification-pinned {
    display: inline-block;
    padding: 2px 6px;
    background: #FFF4E5;
    color: #FF9500;
    font-size: 11px;
    border-radius: 3px;
    margin-right: 8px;
}

/* 加载中 */
.loading-container {
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4B7BFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-container p {
    color: #999;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    padding: 80px 20px;
    text-align: center;
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    color: #999;
    font-size: 14px;
}

/* 加载更多 */
.load-more {
    padding: 20px;
    text-align: center;
}

.load-more-btn {
    padding: 10px 24px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:active {
    background: #f5f5f5;
}

/* 通知详情弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    animation: fadeIn 0.2s;
}

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

.modal-content {
    width: 100%;
    max-height: 85vh;
    background: white;
    border-radius: 16px 16px 0 0;
    animation: slideUp 0.3s;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding-right: 20px;
    line-height: 1.4;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.modal-close:active {
    background: rgba(0, 0, 0, 0.05);
}

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

.modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
    font-size: 12px;
    color: #999;
}

.modal-views {
    color: #999;
}

.modal-text {
    font-size: 15px;
    color: #333;
    line-height: 1.8;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.modal-text p {
    margin: 0 0 12px 0;
}

.modal-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

/* 响应式适配 */
@media (min-width: 768px) {
    .modal {
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        max-width: 600px;
        max-height: 80vh;
        border-radius: 16px;
    }
}

/* 当没有子标签时调整内容区顶部距离 */
.notification-content.no-sub-tabs {
    padding-top: 104px;
}


