/* 알림 종 아이콘 + 드롭다운 — 8-bit / NES 테마 (index.php / view_post.php 공통) */

.notif-bell-wrap {
    position: relative;
}

.notif-bell {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.4rem 0.65rem !important;
    color: var(--nes-yellow, #f8d800) !important;
}

.notif-bell svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: square;
    stroke-linejoin: miter;
    image-rendering: pixelated;
    transition: none;
}

.notif-bell:hover svg {
    color: var(--nes-cyan, #58d8d8);
    transform: none;
}

.notif-bell.has-unread svg {
    color: var(--nes-red, #e60012);
    animation: notif-bell-ring 1.6s steps(2) 1;
}

/* 픽셀 깜빡임 + 좌우 흔들림 (steps() 로 NES 느낌) */
@keyframes notif-bell-ring {
    0%, 100% { transform: translate(0, 0); }
    20%      { transform: translate(-2px, 0); }
    40%      { transform: translate(2px, 0); }
    60%      { transform: translate(-2px, 0); }
    80%      { transform: translate(2px, 0); }
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 0;
    background: var(--nes-red, #e60012);
    color: #fff;
    font-family: 'Galmuri11', 'Press Start 2P', monospace;
    font-size: 10px;
    font-weight: normal;
    line-height: 18px;
    text-align: center;
    border: 2px solid var(--nes-bg-deep, #000);
    box-shadow: 2px 2px 0 var(--nes-shadow, #000);
}

.notif-badge[hidden] { display: none; }

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--nes-bg-soft, #1a1a2e);
    border: 4px solid var(--nes-border, #fff);
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--nes-shadow, #000);
    z-index: 1080;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-dropdown[hidden] { display: none; }

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-bottom: 4px solid var(--nes-border, #fff);
    font-family: 'Galmuri14', 'Galmuri11', 'Press Start 2P', monospace;
    font-size: 14px;
    font-weight: normal;
    color: var(--nes-yellow, #f8d800);
    background: var(--nes-bg-deep, #000);
    text-shadow: 2px 2px 0 var(--nes-shadow, #000);
}

.notif-header::before {
    content: '★ ';
    color: var(--nes-yellow, #f8d800);
}

.notif-header .notif-count-text {
    font-family: 'Galmuri11', monospace;
    font-size: 12px;
    font-weight: normal;
    color: var(--nes-fg-muted, #b0b0c0);
    text-shadow: none;
}

.notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* NES 픽셀 스크롤바 */
.notif-list::-webkit-scrollbar { width: 12px; }
.notif-list::-webkit-scrollbar-track {
    background: var(--nes-bg-deep, #000);
    border-left: 2px solid var(--nes-border, #fff);
}
.notif-list::-webkit-scrollbar-thumb {
    background: var(--nes-yellow, #f8d800);
    border-radius: 0;
    border: 2px solid var(--nes-bg-deep, #000);
}

.notif-item {
    display: block;
    padding: 0.7rem 1rem;
    border-bottom: 2px solid var(--nes-border, #fff);
    color: var(--nes-fg, #fff) !important;
    text-decoration: none !important;
    transition: none;
    cursor: pointer;
    font-family: 'Galmuri11', 'VT323', monospace;
}

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

.notif-item:hover {
    background: rgba(248, 216, 0, 0.1);
}

.notif-item .notif-post-title {
    font-family: 'Galmuri14', 'Galmuri11', 'Press Start 2P', monospace;
    font-size: 13px;
    font-weight: normal;
    color: var(--nes-cyan, #58d8d8);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item:hover .notif-post-title {
    color: var(--nes-yellow, #f8d800);
}

.notif-item .notif-excerpt {
    font-family: 'Galmuri11', 'VT323', monospace;
    font-size: 15px;
    color: var(--nes-fg, #fff);
    line-height: 1.4;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.notif-item .notif-meta {
    display: flex;
    gap: 0.5rem;
    font-family: 'Galmuri11', monospace;
    font-size: 12px;
    color: var(--nes-fg-muted, #b0b0c0);
}

.notif-item .notif-nick {
    color: var(--nes-pink, #f878f8);
    font-weight: normal;
}

.notif-item.is-reply .notif-post-title::before {
    content: "↳ ";
    color: var(--nes-fg-muted, #b0b0c0);
    font-weight: normal;
}

.notif-empty {
    padding: 2rem 1rem;
    text-align: center;
    font-family: 'Galmuri11', monospace;
    color: var(--nes-fg-muted, #b0b0c0);
    font-size: 14px;
}

.notif-empty::before {
    content: '◌ ';
    color: var(--nes-fg-dim, #6b6b80);
}

.notif-empty[hidden] { display: none; }

.notif-loading {
    padding: 1.5rem;
    text-align: center;
    font-family: 'Galmuri11', monospace;
    color: var(--nes-fg-muted, #b0b0c0);
    font-size: 13px;
}

.notif-loading::before {
    content: '◉ ';
    color: var(--nes-yellow, #f8d800);
    animation: nes-blink 0.8s steps(2) infinite;
}

/* 모바일/태블릿: viewport 기준 가로 꽉 차게 */
@media (max-width: 991.98px) {
    .notif-dropdown {
        position: fixed;
        top: 64px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
}
