/* Mitteilungs-Hub (Navbar Glocke) */
.nav-notifications-wrap {
    position: relative;
    display: none;
    align-items: center;
}

.nav-notifications-wrap.is-visible {
    display: flex;
}

.nav-notifications-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.nav-notifications-btn.has-unread {
    border-color: rgba(255, 179, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 179, 0, 0.12);
}

.nav-notifications-btn:hover,
.nav-notifications-btn[aria-expanded="true"] {
    background: rgba(255, 179, 0, 0.15);
    border-color: rgba(255, 179, 0, 0.35);
    color: #ffb300;
}

.nav-notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff3b30;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(18, 18, 22, 0.95);
    pointer-events: none;
}

.notifications-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(380px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    background: linear-gradient(165deg, rgba(28, 28, 32, 0.98), rgba(16, 16, 20, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
    z-index: 10050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notifications-panel[hidden] {
    display: none !important;
}

.notifications-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notifications-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.notifications-panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.notifications-mark-all,
.notifications-clear-all {
    background: none;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    white-space: nowrap;
}

.notifications-mark-all {
    color: rgba(255, 179, 0, 0.92);
}

.notifications-mark-all:hover:not(:disabled) {
    color: #ffc44d;
    text-decoration: underline;
}

.notifications-mark-all:disabled,
.notifications-clear-all:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: none;
}

.notifications-clear-all {
    color: rgba(255, 140, 140, 0.9);
}

.notifications-clear-all:hover:not(:disabled) {
    color: #ffb3b3;
    text-decoration: underline;
}

.notifications-panel-body {
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.notifications-section-label {
    padding: 10px 16px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.notification-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    padding-left: 13px;
}

.notification-item.unread:hover {
    background: rgba(59, 130, 246, 0.14);
}

.notification-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.notification-avatar--user {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.35), rgba(255, 120, 0, 0.25));
    border: 1px solid rgba(255, 179, 0, 0.25);
}

.notification-avatar--like {
    background: linear-gradient(135deg, rgba(255, 90, 120, 0.35), rgba(255, 40, 80, 0.2));
    border-color: rgba(255, 90, 120, 0.25);
}

.notification-avatar--comment {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.28), rgba(0, 122, 255, 0.18));
}

.notification-avatar--message {
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.32), rgba(255, 140, 0, 0.18));
}

.notification-avatar--follow {
    background: linear-gradient(135deg, rgba(120, 220, 160, 0.28), rgba(40, 180, 100, 0.18));
}

.notification-avatar--coins {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.28), rgba(255, 160, 0, 0.18));
}

.notification-message .notification-actor {
    color: #ffb300;
    font-weight: 700;
}

.notification-message .notification-target {
    color: #7ec8ff;
    font-weight: 700;
}

.notification-subtitle {
    display: block;
    margin: 0 0 4px;
    font-size: 0.78rem;
    color: rgba(126, 200, 255, 0.85);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    margin: 0 0 4px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
}

.notification-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

.notification-unread-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    margin-top: 6px;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.55);
}

.notifications-empty,
.notifications-loading,
.notifications-error {
    padding: 28px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
}

.notifications-loading i {
    color: #ffb300;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .notifications-panel {
        position: fixed;
        top: 56px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: calc(100vh - 72px);
    }
}
