/* ============ 通知中心 - 与控制中心完全一致 ============ */

.notification-center {
    position: fixed;
    /* 不设置默认bottom，由JS动态计算 */
    width: 380px;
    height: 400px;
    top: auto !important; /* 覆盖 main.css 的 top:0，启用 bottom 定位 */
    right: auto; /* 由 JS 计算 left 居中，无需 right 固定 */
    background: var(--bg-secondary);
    backdrop-filter: blur(var(--blur-lg)) saturate(150%);
    border-radius: var(--radius-xl);
    padding: 0px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: 10200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

/* ============ 通知容器 ============ */
.notification-tile {
    background: rgba(255, 255, 255, 0.20);
    border-radius: var(--radius-xl);
    padding: 16px;
    cursor: default;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
}

.dark-mode .notification-tile {
    background: rgba(32, 32, 32, 0.10);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 0 12px;
    padding: 8px 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-clear {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.notification-clear:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.dark-mode .notification-clear:hover {
    background: rgba(255, 255, 255, 0.12);
}

.notification-list {
    height: auto;
    min-height: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px 12px;
    box-sizing: border-box;
}

.notification-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.notification-list-scroll .fluent-scroll-viewport {
    height: 100%;
    min-height: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.notification-list-scroll .fluent-scroll-rail {
    top: 2px;
    right: 0;
    bottom: 10px;
    width: 8px;
}

.notification-list-scroll .fluent-scroll-thumb {
    left: 2px;
    width: 4px;
}

.notification-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    transition: all var(--transition-fast);
}

.dark-mode .notification-item {
    background: rgba(255, 255, 255, 0.06);
}

.notification-item:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.01);
}

.dark-mode .notification-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-item.notification-item-removing,
.notification-item.notification-item-removing:hover {
    height: 0 !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    filter: blur(12px);
    transform: translateY(-8px) scale(0.96);
    overflow: hidden;
    pointer-events: none;
    transition:
        opacity 0.18s ease-out,
        filter 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.36s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.36s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.36s cubic-bezier(0.16, 1, 0.3, 1),
        margin 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.notification-item-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.notification-item-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.notification-item-content {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notification-item-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    opacity: 0.6;
    transition: all var(--transition-fast);
}

.notification-item-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
}

.dark-mode .notification-item-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.notification-item-close img {
    width: 14px;
    height: 14px;
}

.notification-empty {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.notification-empty img {
    width: 48px;
    height: 48px;
    opacity: 0.4;
    margin-bottom: 12px;
}

.notification-empty p {
    font-size: 13px;
    margin: 0;
}

/* ============ 模糊禁用 ============ */
.blur-disabled .notification-center {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.95);
}

.dark-mode.blur-disabled .notification-center {
    background: rgba(32, 32, 32, 0.95);
}

/* ============ 动画 - 与控制中心完全一致 ============ */
body.animations-enabled .notification-center:not(.hidden) {
    animation: controlCenterOpen 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.animations-enabled .notification-center.closing {
    animation: controlCenterClose 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}
