/* ===== Notification Center — Naver Style ===== */
.notif-center {
    max-width: 1078px;
    margin: 0 auto;
    min-height: 80vh;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Apple SD Gothic Neo', sans-serif;
    font-size: 15px;
    line-height: 18px;
    color: #000;
    word-break: break-all;
    letter-spacing: -.4px;
    -webkit-text-size-adjust: none;
}

/* ===== Header ===== */
.notif-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 4px solid #e8e8e8;
    padding: 16px 20px 0;
}
.notif-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.notif-header-title {
    font-size: 20px;
    font-weight: 700;
    color: #080808;
    margin: 0;
    letter-spacing: -.5px;
    flex: 1;
    text-align: center;
}
.notif-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.notif-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    -webkit-tap-highlight-color: rgba(0,0,0,.1);
}
.notif-action-btn:hover {
    background: rgba(0,0,0,.05);
}

/* ===== Settings Layer (Dropdown) ===== */
.notif-settings-layer {
    position: absolute;
    top: 44px;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    min-width: 180px;
    z-index: 200;
    overflow: hidden;
}
.notif-settings-layer .layer-btn {
    display: block;
    width: 100%;
    padding: 13px 18px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    letter-spacing: -.3px;
    transition: background 0.1s;
    -webkit-tap-highlight-color: rgba(0,0,0,.1);
}
.notif-settings-layer .layer-btn:hover {
    background: #f5f5f5;
}
.notif-settings-layer .layer-btn + .layer-btn {
    border-top: 1px solid #f0f0f0;
}

/* ===== Tabs (알림 / 대화) ===== */
.notif-tabs {
    display: flex;
}
.notif-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 400;
    color: #888;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: -.4px;
}
.notif-tab.active {
    color: #080808;
    font-weight: 700;
    border-bottom-color: #080808;
}

/* ===== Filters (전체 / 회원·인증 / 활동·소식 / ...) ===== */
.notif-filters {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    overflow-x: auto;
    border-bottom: 1px solid #f0f0f0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.notif-filters::-webkit-scrollbar { display: none; }
.notif-filter {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 18px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    letter-spacing: -.3px;
    -webkit-tap-highlight-color: rgba(0,0,0,.1);
}
.notif-filter.active {
    background: #080808;
    color: #fff;
    border-color: #080808;
}
.notif-filter:hover:not(.active) {
    background: #f7f7f7;
}

/* ===== Section Title (이전 알림) ===== */
.notif-section-title {
    padding: 16px 20px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    letter-spacing: -.3px;
}

/* ===== Notification Card ===== */
.notif-card {
    position: relative;
    display: block;
    padding: 16px 17px;
    cursor: pointer;
    transition: background 0.12s;
    text-decoration: none;
    color: inherit;
    letter-spacing: -.5px;
}
.notif-card + .notif-card {
    border-top: 1px solid #f2f2f2;
}
.notif-card:hover {
    background: #f9f9f9;
}

/* Read state */
.notif-card.is-read {
    opacity: 1;
}
.notif-card.is-read:hover {
    opacity: 1;
}

/* 카드 전체 클릭 비활성화 (system 알림은 버튼으로만 이동) */
.notif-card--static {
    cursor: default;
}
.notif-card--static:hover {
    background: transparent;
}

/* Source row: thumb + title + time */
.notif-card-source {
    display: flex;
    align-items: center;
    gap: 0;
}
.notif-card-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eee;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    margin-right: 8px;
}
.notif-card-source-name {
    font-size: 13px;
    font-weight: 700;
    color: #000;
    letter-spacing: -.3px;
    flex-shrink: 0;
}
.notif-card-read-label {
    margin-left: 8px;
    font-size: 11px;
    font-weight: 500;
    color: #000;
    letter-spacing: -.2px;
    flex-shrink: 0;
}
.notif-card-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.notif-card-time {
    font-size: 12px;
    color: #000;
    letter-spacing: -.2px;
    white-space: nowrap;
}

/* Content area */
.notif-card-body {
    margin-top: 8px;
}
.notif-card-content {
    font-size: 14px;
    color: #000;
    line-height: 20px;
    letter-spacing: -.4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* System action button (바로가기) */
.notif-card-action {
    margin-top: 10px;
}
.notif-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #222;
    background: #f4f4f4;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.notif-card-btn:hover {
    background: #ebebeb;
    border-color: #d0d0d0;
}
html.dark-mode .notif-card-btn {
    color: #ddd;
    background: #2a2a2a;
    border-color: #3a3a3a;
}
html.dark-mode .notif-card-btn:hover {
    background: #333;
    border-color: #4a4a4a;
}

/* Unread dot */
.notif-card-unread-dot {
    position: absolute;
    left: 6px;
    top: 24px;
    width: 6px;
    height: 6px;
    background: #03c75a;
    border-radius: 50%;
}

/* More / Delete button */
.notif-card-more {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #c0c0c0;
    border-radius: 50%;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}
.notif-card-more:hover {
    background: rgba(0,0,0,.06);
    color: #666;
}

/* ===== Empty State ===== */
.notif-empty {
    text-align: center;
    padding: 80px 20px;
    color: #b0b0b0;
}
.notif-empty svg {
    margin-bottom: 16px;
    color: #ddd;
}
.notif-empty p {
    font-size: 14px;
    margin: 0;
    letter-spacing: -.3px;
}

/* ===== Loading ===== */
.notif-loading {
    text-align: center;
    padding: 24px;
    color: #b0b0b0;
    font-size: 13px;
}

/* ===== Settings Page ===== */
.notif-settings-page {
    padding: 0 20px;
}
.notif-settings-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: #080808;
    background: none;
    border: none;
    cursor: pointer;
}
.notif-settings-group {
    margin-bottom: 28px;
}
.notif-setting-highlight {
    border: 2px solid #000;
    border-radius: 6px;
    padding: 8px 12px;
    animation: notifSectionPulse 1s ease-in-out 6;
}
@keyframes notifSectionPulse {
    0%, 100% { border-color: #000; box-shadow: 0 0 0 rgba(0,0,0,0); }
    50%      { border-color: transparent; box-shadow: 0 0 0 rgba(0,0,0,0); }
}
html.dark-mode .notif-setting-highlight {
    border-color: #fff;
}
html.dark-mode .notif-setting-highlight { animation-name: notifSectionPulseDark; }
@keyframes notifSectionPulseDark {
    0%, 100% { border-color: #fff; }
    50%      { border-color: transparent; }
}
.notif-settings-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
    padding-top: 8px;
}
.notif-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f2f2f2;
}
.notif-setting-label {
    font-size: 15px;
    color: #080808;
    letter-spacing: -.4px;
}
.notif-setting-desc {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 3px;
    letter-spacing: -.2px;
}

/* ===== Toggle Switch ===== */
.notif-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.notif-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.notif-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 12px;
    transition: 0.2s;
}
.notif-toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.notif-toggle input:checked + .notif-toggle-slider {
    background: #000;
}
.notif-toggle input:checked + .notif-toggle-slider:before {
    transform: translateX(20px);
}

/* ===== Dark Mode ===== */
html.dark-mode .notif-center { background: #1a1a1a; color: #e0e0e0; }
html.dark-mode .notif-header { background: #1a1a1a; border-color: #333; }
html.dark-mode .notif-header-title { color: #f0f0f0; }
html.dark-mode .notif-action-btn { color: #bbb; }
html.dark-mode .notif-action-btn:hover { background: rgba(255,255,255,.08); }
html.dark-mode .notif-settings-layer { background: #2a2a2a; border-color: #444; }
html.dark-mode .notif-settings-layer .layer-btn { color: #ddd; }
html.dark-mode .notif-settings-layer .layer-btn:hover { background: #333; }
html.dark-mode .notif-settings-layer .layer-btn + .layer-btn { border-color: #3a3a3a; }
html.dark-mode .notif-tab { color: #777; }
html.dark-mode .notif-tab.active { color: #f0f0f0; border-bottom-color: #f0f0f0; }
html.dark-mode .notif-filters { border-color: #333; }
html.dark-mode .notif-filter { border-color: #444; color: #bbb; background: #1a1a1a; }
html.dark-mode .notif-filter.active { background: #f0f0f0; color: #111; border-color: #f0f0f0; }
html.dark-mode .notif-filter:hover:not(.active) { background: #2a2a2a; }
html.dark-mode .notif-card + .notif-card { border-color: #2a2a2a; }
html.dark-mode .notif-card:hover { background: #222; }
html.dark-mode .notif-card.is-read { opacity: 1; }
html.dark-mode .notif-card.is-read:hover { opacity: 1; }
html.dark-mode .notif-card-source-name { color: #e0e0e0; }
html.dark-mode .notif-card-content { color: #bbb; }
html.dark-mode .notif-card-time { color: #666; }
html.dark-mode .notif-card-more { color: #555; }
html.dark-mode .notif-card-more:hover { background: rgba(255,255,255,.08); color: #aaa; }
html.dark-mode .notif-section-title { color: #666; }
html.dark-mode .notif-setting-item { border-color: #2a2a2a; }
html.dark-mode .notif-setting-label { color: #e0e0e0; }
html.dark-mode .notif-setting-desc { color: #666; }
html.dark-mode .notif-settings-back { color: #f0f0f0; }
html.dark-mode .notif-toggle-slider { background: #000; }

/* ===== Group Count Badge ===== */
.notif-card-count {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #03c75a;
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0;
}
html.dark-mode .notif-card-count {
    background: #03c75a;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .notif-center { max-width: 100%; }
    .notif-header { padding: 12px 16px 0; }
    .notif-filters { padding: 12px 16px; }
    .notif-card { padding: 14px 16px; }
}
